View: 33249|Reply: 22

remote control with OpenELEC ?

[Copy link]

6

threads

17

posts

86

credits

Registered member

Rank: 2

credits
86
Published in 2016-2-22 17:35:19 | Show all floors |Read mode
I have a microsoft remote control, I do not have the infrared receiver.
Can tell me if the microsoft remote will work with the infrared receiver of Orange Pi PC?

Can you explain me how to do the installation for the remote?

You have to connect via SSH?
Then to write command lines?

Thank you

1

threads

90

posts

785

credits

Senior member

Rank: 4

credits
785
Published in 2016-2-22 19:10:59 | Show all floors
Edited by lymon at 2016-2-23 00:32

As the opi-pc has a built in IR-receiver it should work.

For the latest/new image versions of Openelec for the OPI you can basically use the official Openelec guide to add your own remote : http://wiki.openelec.tv/index.php/Guide_to_add_your_own_remote

For those that are not very familiar with linux, this roughly translates to the following procedure:

Make sure you have ssh enabled (you can enable ssh during the first startup or afterwards via system > Openelec > Services > ssh --> enable ssh)
(If you are on windows, I find PuTTy to be the best/easiest ssh client: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)

Now connect to your orangepi/openelec installation via ssh:
(for PuTTy, just enter the ip-address of the OPI into the host-name field, press enter and it should start a ssh session with your OPI)

user: root, password: openelec

once you are logged in, copy/paste:
(if you use putty, just use the right mouse button to paste into the ssh-window)
  1. systemctl stop eventlircd.service; systemctl stop kodi.service
Copy code
then:
  1. ir-keytable -p NEC,RC-5,RC-6,JVC,SONY,LIRC,OTHER ; ir-keytable -c ; ir-keytable -t
Copy code

now start pressing keys on your remote and you should see output similar to this:
  1. 1456137251.664522: event type EV_MSC(0x04): scancode = 0x847905
  2. 1456137251.664528: event type EV_SYN(0x00).
Copy code

the scancodes are the important numbers here.
You can use the little skeleton table below that has most of the common functions ...replace the scancodes (the 0x000000 numbers in the table) for the codes that match with the specific buttons of your remote.

NB: Remove any buttons/commands from the table that you don't use/need or that are not on your remote.
  1. 0x000000 KEY_UP
  2. 0x000000 KEY_DOWN
  3. 0x000000 KEY_LEFT
  4. 0x000000 KEY_RIGHT
  5. 0x000000 KEY_SELECT
  6. 0x000000 KEY_PLAY
  7. 0x000000 KEY_STOP
  8. 0x000000 KEY_BACK
  9. 0x000000 KEY_1
  10. 0x000000 KEY_2
  11. 0x000000 KEY_3
  12. 0x000000 KEY_4
  13. 0x000000 KEY_5
  14. 0x000000 KEY_6
  15. 0x000000 KEY_7
  16. 0x000000 KEY_8
  17. 0x000000 KEY_9
  18. 0x000000 KEY_0
  19. 0x000000 KEY_MENU
  20. 0x000000 KEY_POWER
  21. 0x000000 KEY_PAGEUP              
  22. 0x000000 KEY_PAGEDOWN
  23. 0x000000 KEY_TITLE
  24. 0x000000 KEY_INFO
  25. 0x000000 KEY_VOLUMEUP            
  26. 0x000000 KEY_VOLUMEDOWN         
  27. 0x000000 KEY_MUTE
  28. 0x000000 KEY_REWIND               
  29. 0x000000 KEY_FASTFORWARD
  30. 0x000000 KEY_NEXT
  31. 0x000000 KEY_PREVIOUS            
  32. 0x000000 KEY_CLEAR
Copy code

example:
if you press the PLAY button on your remote and it shows the scancode is 0x801001, then this translates to 0x801001 KEY_PLAY in the table.
If the UP button on your remote shows scancode 0x801002, then enter 0x801002 KEY_UP in the table
etc.


Once you have a table that suits your needs, exit out of the ir-keytable testing routine (ctrl+c) and enter:
  1. nano /storage/.config/my_remote
Copy code
copy paste the table you created into the nano window (for putty: just use the right mouse button to paste into the ssh-window)
and exit out of nano, using ctrl+x,and press y , enter to confirm to save the new file.

next we will create an autostart file:
  1. nano /storage/.config/autostart.sh
Copy code
and copy/paste the following line into nano/autostart.sh:
  1. ir-keytable -c -p NEC,RC-5,RC-6,JVC,SONY,LIRC,OTHER -w /storage/.config/my_remote
Copy code
again exit out of nano, using ctrl+x,and  press y , enter to confirm to save the new file.

now reboot/restart openelec (or just enter reboot in ssh) and after it has restarted your remote should now work.

Hope this helps

NB : for the older images use the procedure I wrote here: http://www.orangepi.org/orangepibbsen/forum.php?mod=redirect&goto=findpost&ptid=648&pid=7602&fromuid=144740 )


6

threads

17

posts

86

credits

Registered member

Rank: 2

credits
86
 Author| Published in 2016-2-22 19:58:29 | Show all floors
Thank you
Reply

Use magic report

0

threads

19

posts

518

credits

Senior member

Rank: 4

credits
518
Published in 2016-2-22 21:57:17 | Show all floors
lymon replied at 2016-2-22 19:10
As the opi-pc has a built in IR-receiver it should work.

you can use the official Openelec guide to ...

pls edit: VOLUME_UP  "_" no work,
it works:
KEY_VOLUMEUP            
KEY_VOLUMEDOWN         
KEY_PAGEUP              
KEY_PAGEDOWN  

and add:
KEY_REWIND               
KEY_FASTFORWARD



1

threads

90

posts

785

credits

Senior member

Rank: 4

credits
785
Published in 2016-2-22 23:37:09 | Show all floors
c0013r replied at 2016-2-22 21:57
pls edit: VOLUME_UP  "_" no work,
it works:
KEY_VOLUMEUP            

good call..I normally use a custom Lircmap.xml and defined some custom keys and completely forgot about that.




10

threads

55

posts

345

credits

Intermediate member

Rank: 3Rank: 3

credits
345
Published in 2016-2-27 22:42:30 | Show all floors
It works!!! With many remote controllers, but i want to complicate the situation.

I have the one controller for my tv (toshiba) and I'm able to configure it for kodi, and another one (SKY Tv remote).

The second one is able to control TV and MySky Decoder, and I wish to use it also for Kodi.

If i set this controller to "TV" (just press the TV Button) i can get some events from it (just the Numbers, Volume and Program Key).

If i switch to "SKY" (pressing the SKY button) i don't see any events.

Suggestions?

This thread contains more resources

You need to Log in to download or view,No account?    Register

x

1

threads

90

posts

785

credits

Senior member

Rank: 4

credits
785
Published in 2016-2-28 17:43:18 | Show all floors
you could try the irrecord method and see if your remote is recognized then

(see adding remote for the older images link at bottom of my post)


10

threads

55

posts

345

credits

Intermediate member

Rank: 3Rank: 3

credits
345
Published in 2016-2-28 20:05:38 | Show all floors
Solved reconfiguring my sky tv remote.

3

threads

165

posts

1203

credits

Gold member

Rank: 6Rank: 6

credits
1203
Published in 2016-2-28 22:03:58 | Show all floors
Why did you actually use the tutorial above? Didn't it work with: http://www.orangepi.org/orangepi ... amp;page=47#pid9460

10

threads

55

posts

345

credits

Intermediate member

Rank: 3Rank: 3

credits
345
Published in 2016-3-4 01:19:41 | Show all floors
Dima, I used the tutorial above because it works.

I can't set my remote with the "official" one, i don't know why, but i have some problem while recording remote controls.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list