HID Remotes

Do you want advice about what hardware to buy for use with MythTV? Ask here.

Moderator: Forum Moderators

Post Reply
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

HID Remotes

Post by kbocek »

I'm setting up a new front end and have a HID style remote

Code: Select all

# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 04f2:0402 Chicony Electronics Co., Ltd Genius LuxeMate i200 Keyboard
Bus 001 Device 003: ID 05a4:9881 Ortek Technology, Inc. IR receiver [VRC-1100 Vista MCE Remote Control]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I get output from ir-keytable with the keys already mapped. But I see two devices /dev/input/event10 and /dev/input/event11. I assume one is the mouse interface and the other is the keyboard.

Will Myth work with two devices and accept codes from both? Or do I need to do some other magic?

I see the wiki page
https://www.mythtv.org/wiki/HID_Remotes

But that talks about /dev/rc devices. This receiver does not create /dev/rc entries.

Thanks
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: HID Remotes

Post by wesnewell »

It will work with as many input devices you have. I got one with a ps2 remote KB, a usb remote KB, and a usb ir remote. They can all work at the same time.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

Groovy. Thanks.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

And there's this page
https://www.mythtv.org/wiki/VRC-1100_Or ... one_Remote

For this IR setup
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: HID Remotes

Post by wesnewell »

Plug in your usb receiver. Type ir-k and hit tab key. If you have ir-keytable on your system, it should display the command. If not, then install it. Then just press the enter key to get the info about your receiver. here's one of mine.
wes@mythfe0:~$ ir-keytable
Found /sys/class/rc/rc3/ (/dev/input/event17) with:
Name: Media Center Ed. eHome Infrared Remote Transceiver (0471:0815)
Driver: mceusb, table: rc-rc6-mce
lirc device: /dev/lirc3
Supported protocols: other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
Enabled protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
bus: 3, vendor/product: 0471:0815, version: 0x0000
Repeat delay = 500 ms, repeat period = 125 ms
..............
As you can see, I've got all the protocols enabled. yours may not. If you use LIRC, then you don't need any protocols enabled as it receives the raw ir data and you have to have an lircd.conf to interpret the signals. I don't use lirc any longer.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

Yes, I've been using ir-keytable:

Code: Select all

$ ir-keytable
/sys/class/rc/: No such file or directory
But

Code: Select all

# ir-keytable -d /dev/input/event0
Name: HID 05a4:9881
bus: 3, vendor/product: 05a4:9881, version: 0x0110
And running with -t gives me output.

My issue is using third-party generic remotes with this receiver. And I think it would be good to run this through LIRC but the instructions out there are confusing.
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: HID Remotes

Post by wesnewell »

Do you have the mceusb driver loaded?
wes@mythfe0:~$ lsmod|grep mceusb
mceusb 36864 0
rc_core 49152 17 ir_kbd_i2c,mceusb,ir_rc6_decoder,ir_sanyo_decoder,ir_jvc_decoder,ir_nec_decoder,rc_rc6_mce,ir_sharp_decoder,cx23885,ir_rc5_decoder,ir_mce_kbd_decoder,ir_xmp_decoder,rc_fusionhdtv_mce,ir_sony_decoder
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

No I do not have mceusb loaded. Again, this is a HID only device. There are no /dev/rc* entries created. Only /dev/input/* is created. ir-keytable will work on the /dev/input entries and will display keypresses. LIRC I think works through it's devinput driver but I'm not sure.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

I am abandoning this stupid Ortek. I've tried a bunch of remotes and a bunch of codes. I can't get a generic remote to work with it.

Fortunately I have another sitting around and mceusb recognizes it just fine:

Code: Select all

[163572.977293] usb 1-1: New USB device found, idVendor=1784, idProduct=0008
[163572.977307] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[163572.977317] usb 1-1: Product: eHome Infrared Transceiver
[163572.977326] usb 1-1: Manufacturer: Topseed Technology Corp.
[163572.977335] usb 1-1: SerialNumber: TS00098N
[163573.080154] Registered IR keymap rc-rc6-mce
[163573.080346] input: Media Center Ed. eHome Infrared Remote Transceiver (1784:0008) as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/rc/rc0/input13
[163573.080836] rc rc0: Media Center Ed. eHome Infrared Remote Transceiver (1784:0008) as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/rc/rc0
[163573.083970] lirc_dev: IR Remote Control driver registered, major 248
[163573.086486] rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
[163573.086490] IR LIRC bridge handler initialized
[163573.088267] IR RC6 protocol handler initialized
[163573.296319] mceusb 1-1:1.0: Registered Topseed Technology Corp. eHome Infrared Transceiver with mce emulator interface version 1
[163573.296327] mceusb 1-1:1.0: 2 tx ports (0x0 cabled) and 2 rx sensors (0x1 active)
[163573.296436] usbcore: registered new interface driver mceusb
/dev/lirc0 is there and ir-keytable sees it just fine:

Code: Select all

# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event0) with:
        Driver mceusb, table rc-rc6-mce
        Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
        Enabled protocols: lirc rc-6
        Name: Media Center Ed. eHome Infrared
        bus: 3, vendor/product: 1784:0008, version: 0x0101
        Repeat delay = 500 ms, repeat period = 125 ms
I also ordered the Inteset receiver that I linked to earlier. I'll report on that after I get it.
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: HID Remotes

Post by wesnewell »

You shouldn't have a problem with that receiver. Looks like the Ortek receiver is either defective or isn't a real ir receiver. If you need the receiver to support all the protocols it's capable of you need to include them in the first line of the rc_keymaps file you use.
As it is above it only supports the rc-6 protocol
wes@mythfe0:~$ cat /etc/rc_keymaps/myremotes|grep table
# table *, type:rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

Well crap, this receiver doesn't work either. ir_keytable actually segfaults when a key is pressed. Irrecord just times out with no input. Mceusb driver loads just fine and the lirc config is installed but nothing from irw. The LED flashes on keypresses but again, nothing.

I see old complaints regard this device (1784:0008) and now that I think about it I believe I tried working with this receiver years ago with the same results.

I'll get the Inteset receiver tomorrow. Comments on Amazon are positive and mention success with Kodi. So I'm sure it'll be good here.
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: HID Remotes

Post by wesnewell »

Note that this only works with ir-keytable in distros 18.04 and earlier. The format of the keymap file changed in 20.04.

If you are going to use ir-keytable, you should remove lirc, or at least while trying to use ir-keytable, make sure you stop lircd from running. I completely removed lirc from all my machines. To ir-keytable to work with my remote, I had to add this line to /etc/rc_maps.cfg pointing to my remotes key map.
wes@mythfe0:~$ cat /etc/rc_maps.cfg|grep myremotes
mceusb * /etc/rc_keymaps/myremotes
And this in that file, enabling all supported protocols on first line.
# table *, type:rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
# CODE KEY BUTTON RCRP05B
0x0f KEY_F12 :POWER
0x2b KEY_L :LIVE
0x29 KEY_T :LIST
0x26 KEY_B :JUMP START
0x21 KEY_COMMA :SKIP BACK
0x22 KEY_DOT :SKIP FWD
0x11 KEY_X :SKIP FWD-RIGHT ARROW|BAR
0x24 KEY_R :RECORD
0x23 KEY_Z :STOP RECORDING
0x20 KEY_P :PAUSE
0x1f KEY_P :PLAY
0x13 KEY_M :MENU
0x14 KEY_G :GUIDE
0x2a KEY_I :INFO
0x25 KEY_ESC :EXIT
0x19 KEY_ENTER :OK
0x15 KEY_UP ;UP ARROW
0x16 KEY_DOWN :DOWN ARROW
0x17 KEY_LEFT :LEFT ARROW
0x18 KEY_RIGHT :RIGHT ARROW
0x0a KEY_VOLUMEUP :VOL+
0x0b KEY_VOLUMEDOWN :VOL-
0x0d KEY_PAGEUP :CH+
0x0e KEY_PAGEDOWN :CH-
0x12 KEY_O :LAST
0x01 KEY_1 :1
0x02 KEY_2 :2
0x03 KEY_3 :3
0x04 KEY_4 :4
0x05 KEY_5 :5
0x06 KEY_6 :6
0x07 KEY_7 :7
0x08 KEY_8 :8
0x09 KEY_9 :9
0x00 KEY_0 :0
0x28 KEY_SEMICOLON :DASH
0x1c KEY_W :ASPECT
0x1a KEY_V :PG+
0x2d KEY_HOME :DAY-
0x2c KEY_END :DAY+
0x10 KEY_S :PG-
0x35 KEY_C :ON DEMAND
0x0c KEY_Y :MUTE
0x2e KEY_SLASH :FAV
0x1b KEY_Q :PIP
0x1d KEY_N :SWAP
0x1e KEY_E :MOVE
0x33 KEY_K :PIPCH+
0x34 KEY_J :PIPCH-
0x27 KEY_H :INPUT
0x2f KEY_F :A YELLOW
0x30 KEY_U :B BLUE
0x31 KEY_A :C RED
0x32 KEY_D :D GREEN
Last edited by wesnewell on Wed Aug 26, 2020 12:43 am, edited 1 time in total.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

So I did as you say. I stopped lircd, created /etc/rc_keymaps/myremotes and hurrah! I got clear output from ir-keytable. However, after a handful of key presses the *host* crashed and required a hard boot. I repeated the test. Same thing. ir-keytable would display a bunch of key presses and then the system would hang.

I think this receiver is broken in some way.

BTW, I see you like the RCA RCRP05B remote. My favorite too. Unfortunately the version I have all over the house isn't being made any more. Fortunately I bought some backups. I just did my testing with a RCRN05BHZ which I think is it's replacement. The 4-device version seems to work too.

So you don't use LIRC? My problem is I have some applications that use IRExec to do stuff outside of MythTV. Don't I need LIRC for that?
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: HID Remotes

Post by wesnewell »

ir-keytable is the same as a KB input, so you don't need a translation table like you do with lircrc for each app. So if your apps will work with a Kb, they'll work with the ir-keytable, and I'm pretty sure all of them will work with a KB.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: HID Remotes

Post by kbocek »

I spoke too soon. I got the new receiver and it's working with ir-keytable:

Code: Select all

~# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event7) with:
        Driver mceusb, table rc-rc6-mce
        Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
        Enabled protocols: lirc rc-6
        Name: Media Center Ed. eHome Infrared
        bus: 3, vendor/product: 1934:5168, version: 0x0001
        Repeat delay = 500 ms, repeat period = 125 ms
What I realized was I was pressing the power button which comes across as KEY_SLEEP and I was putting the host to sleep. A bit of googling and:

Code: Select all

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
systemctl restart systemd-logind.service 
And now ir-keytable displays KEY_SLEEP without the system shutting down.

Oddly, all the keys display except for the volume keys and mute. Maybe I should try a different remote code.

Update: duh, it's what RCA calls "Volume Punch Through". The volume keys are sending for the TV or Audio. No way to disable it. But I don't need the volume keys anyway.

I'm still not getting anything with LIRC and IRW though. I've tried both the MCEUSB and DevInput config files. Nothing. IRRecord does work but I don't really want to have to go through mapping every key.

Update2:
I used the quickie conf file I generated with with IRRecord but with only two keys. Those keys show up in IRW. So the keys defined in lircd.conf.mceusb do *not* match the codes being sent by the remote. I see a whole bunch of remotes using the same key programming code for the RCA. I've just gotta match one of those to the LIRC conf.

Update3:
I shoulda listened to you wesnewell, The answer was Lirc's DevInput conf file. Which is installed by default. With that and the device code on the remote that is used by many devices, I am getting output now from IRW including the color buttons. Yay, this will let me use irexec!
Post Reply