Jesus H. Christ on a bicycle!!!

I happened to be reading Terry Pratchett's Small Gods when my new Elite was delivered, which makes it very handy to steal these curses from the Great God Om and direct them at anyone responsible for the setup software for Harmony remotes:

“The devils of infinity fill your living bones with sulphur!”
“How would you like to be an abomination in the nethermost pit of chaos?”
“Turn into a mud leech and wither in the fires of retribution!”
“Your eyeballs will be spitted on shafts of fire for this!”
“Smite you with thunderbolts!”
“Writhe on the spikes of damnation!”
“Your hand to wither and drop off!”
“Your sexual organs to sprout wings and fly away!”
“Your ankles to be crushed in the jaws of giants!”
“Your intestines to be wound around a tree until you are sorry!”
“The worms of revenge to eat your blackened nostrils!”
“Hawks to peck your liver!”
“Afflict you with a thousand cuts!”
“Your teeth to abscess with red-hot heat!”
“Your legs to swell to tree trunks!”
“Your feet to fly from your body and be buried in a termite mound!”
“May all your wine turn to water!”

Years ago I wrote my harmony 628 review. If anything, the software to setup the new model Elite has only gotten worse since then. A $300 remote still trying to tell me I'm an idiot and I should learn to live with whatever restrictions the mental defective Logitech programmers choose to impose.

My first use case seems simple enough to me, though perhaps not wildly common: I use my TV as a computer monitor when not watching TV or DVDs, etc. Therefore, I don't want the TV off when I'm done with an activity, I want it set to the input where the PC is connected.

On the antique Harmony 628, this was reasonably simple. I told it never to turn the TV off, and added a command at the end of any activity that used the TV to set the input to HDMI2 (the PC connection).

When I tried to do the same thing on the latest and greatest Elite, the command to set the input source wasn't in the available commands I'm allowed to add at the end of an activity. I thought maybe there was some kind of bug, so I imported the old 628 setup from the old account to the new Elite. After the import, still no input setting command. It just threw the command away. The discrete input setting codes exist in the device definition, and work when I send them from the devices screens on the remote, but it just won't let me use them in the one place I need them. Brilliant!

I asked about this in the Logitech forums: Elite can't switch input on activity end?. The helpful folks on the Logitech forum revealed the true depth of contempt Logitech programmers have for their users and also provided a workaround which I proceeded to adopt (learn the same dadgum command under a new name that doesn't contain the string Input.)

The simplest way to make sure I learn the absolute identical command is to use my phone's Harmony app to tell the hub to send the command while having the Elite connected to the USB on the computer in the IR learning mode (with the IR port on the bottom of the Elite facing at the hub).

This seemed to work. I learned the InputHDMI2 command under the new name Moron2. As long as I was sitting at the Windows computer anyway, I went ahead and used the computer interface to add the Moron2 command to the end activity (which it was now willing to let me do).

Miracle of miracles! That worked. Hitting the off button while watching TV now sends the TV back to the computer.

However, that led to my next adventure: While away from the Windows computer and back over at the TV, I noticed another defect in the setup that was sending the TiVo into standby, which I didn't want to do. So I pulled out the phone and used the android app to fix the TiVo setting to be always on.

The next thing I know, the TV stopped returning to the HDMI2 input. Apparently nothing in all the brilliant Logitech software attempts to sync up changes made via different interfaces (or at least doesn't sync them frequently enough to be useful). The true genius of Logitech programmers on display once again!

Fortunately enough stuff was synced up that the android app knew about the Moron2 command, so I fixed the end activity one more time to add the input change. So far, it has stayed there. (But my expectations are not high :-). I've asked PC and Android app not in sync? in the forums again, but haven't gotten an answer yet. No doubt there is something “obvious” about information stored in the hub versus information stored in the remote or the app that makes this all perfectly clear (as mud :-).

AAAUGH! I did get an answer, and it is a ridiculous one: Apparently the hub is the center of the universe. It is more important than any other device you own. If the hub is power cycled, then all other devices must be power cycled as well, even if they are marked as never to be turned off.

In that same forum thread, the claim was made that using the "remote has no power buttons" setting will really and truly tell the Harmony to never power cycle the device, but that is apparently not the case. I just swapped in a new TV and tried using that option for it, but every time I exit an activity that uses the TV, it gets powered off by the Harmony.

I finally decided the only way to fix this was with the big hammer: I punched the VCR button on my cheesy universal remote so it would generate IR codes for a device I don't have anywhere in the house, then re-learned the Power/On/Off/Toggle commands for the new TV as Record/Stop/Pause from a random VCR. That showed it who was boss! It can try as hard as it likes to power on or off the TV now, but the codes it sends will be utterly ignored!

Another annoyance croped up while I was working on adding the new TV. The 10 second power up delay for the Onkyo receiver (which is the default in the Logitech device database) came back. When first setting up all my devices, I redefined it to be 1.5 seconds. When adding the new TV I never touched the Onkyo definition, yet when the remote was re-synced after adding the TV, the 10 second delay for the Onkyo came back. I never got around to trying to fix it, but when I modified the power buttons and re-synced again, it was back to my 1.5 second delay. So the useless setup software apparently gets randomly confused about things you have redefined. More brilliant programmers at work I guess.

Computer Control

Having gotten an expensive Elite remote, I decided I wanted to be able to control my computer with it, so I bought this USB External Infrared (IR) Media Center Receiver with Cable. I picked it because I found a comment saying it worked with Linux. And my Linux box does seem to recognize it.

The lsusb command calls it:

Bus 003 Device 009: ID 1934:5168 Feature Integration Technology Inc. (Fintek) F71610A or F71612A Consumer Infrared Receiver/Transceiver

The udevadm monitor command generates this gibberish (with various hopeful mentions of lirc) when I plug it in:

KERNEL[23157.052352] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12 (usb)
KERNEL[23157.052816] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0 (usb)
UDEV  [23157.064755] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12 (usb)
KERNEL[23158.073058] add      /module/rc_core (module)
KERNEL[23158.073078] add      /class/rc (class)
UDEV  [23158.073404] add      /module/rc_core (module)
UDEV  [23158.073596] add      /class/rc (class)
KERNEL[23158.074897] add      /module/mceusb (module)
UDEV  [23158.075031] add      /module/mceusb (module)
KERNEL[23158.076732] add      /module/rc_rc6_mce (module)
UDEV  [23158.076870] add      /module/rc_rc6_mce (module)
KERNEL[23158.097079] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0 (rc)
KERNEL[23158.097151] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0/input19 (input)
KERNEL[23158.097168] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0/input19/event16 (input)
KERNEL[23158.099251] add      /module/lirc_dev (module)
KERNEL[23158.099263] add      /class/lirc (class)
UDEV  [23158.099413] add      /module/lirc_dev (module)
UDEV  [23158.099439] add      /class/lirc (class)
KERNEL[23158.100413] add      /module/ir_lirc_codec (module)
KERNEL[23158.100453] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0/lirc0 (lirc)
UDEV  [23158.100554] add      /module/ir_lirc_codec (module)
KERNEL[23158.196065] add      /bus/usb/drivers/mceusb (drivers)
UDEV  [23158.196131] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0 (usb)
UDEV  [23158.196444] add      /bus/usb/drivers/mceusb (drivers)
KERNEL[23158.201877] add      /module/ir_rc6_decoder (module)
UDEV  [23158.202164] add      /module/ir_rc6_decoder (module)
UDEV  [23158.235247] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0 (rc)
UDEV  [23158.236224] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0/lirc0 (lirc)
UDEV  [23158.236731] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0/input19 (input)
UDEV  [23158.254591] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0/input19/event16 (input)

And even the Xorg log file notices it:

[ 23158.253] (II) config/udev: Adding input device Media Center Ed. eHome Infrared Remote Transceiver (1934:5168) (/dev/input/event16)
[ 23158.253] (**) Media Center Ed. eHome Infrared Remote Transceiver (1934:5168): Applying InputClass "evdev keyboard catchall"
[ 23158.253] (**) Media Center Ed. eHome Infrared Remote Transceiver (1934:5168): Applying InputClass "libinput keyboard catchall"
[ 23158.253] (**) Media Center Ed. eHome Infrared Remote Transceiver (1934:5168): Applying InputClass "system-keyboard"
[ 23158.253] (II) Using input driver 'libinput' for 'Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)'
[ 23158.253] (**) Media Center Ed. eHome Infrared Remote Transceiver (1934:5168): always reports core events
[ 23158.253] (**) Option "Device" "/dev/input/event16"
[ 23158.253] (**) Option "_source" "server/udev"
[ 23158.254] (II) input device 'Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)', /dev/input/event16 is tagged by udev as: Keyboard
[ 23158.254] (II) input device 'Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)', /dev/input/event16 is a keyboard
[ 23158.270] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-12/3-12:1.0/rc/rc0/input19/event16"
[ 23158.270] (II) XINPUT: Adding extended input device "Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)" (type: KEYBOARD, id 13)
[ 23158.270] (**) Option "xkb_layout" "us"
[ 23158.270] (II) input device 'Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)', /dev/input/event16 is tagged by udev as: Keyboard
[ 23158.270] (II) input device 'Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)', /dev/input/event16 is a keyboard

So the odds are good that it will work, but the first step seems to be keeping X from grabbing it so I can dedicate it to lirc. A web search found this hint. Following the instructions, I added the /etc/X11/xorg.conf.d/10-quirks.conf file with this content:

Section "InputClass"
        Identifier "Ignore IR remote as keyboard"
        MatchProduct "Media Center Ed. eHome Infrared Remote Transceiver"
        Option "Ignore" "on"

That seems to work. After a reboot to make sure everything was initialized from scratch, plugging in the gadget only generates this in the Xorg log:

[    75.413] (II) config/udev: Adding input device Media Center Ed. eHome Infrared Remote Transceiver (1934:5168) (/dev/input/event16)
[    75.413] (**) Media Center Ed. eHome Infrared Remote Transceiver (1934:5168): Ignoring device from InputClass "Ignore IR remote as keyboard"

After installing lirc-compat from the Fedora repos, and doing lots and lots of googling, I finally found I could define a new device with manufacturer Microsoft and model MCE Keyboard.

On the lirc remotes page, I downloaded the mceusb.lircd.conf file.

If I run this command to start the lirc daemon for testing:

lircd --device /dev/lirc0 --driver default ~tom/Downloads/mceusb.lircd.conf

I can then run the irw utility and press keys in the new device definition, and get output like this:

000000037ff07bf3 00 KEY_POWER mceusb
000000037ff07bf3 01 KEY_POWER mceusb
000000037ff07be7 00 KEY_PAUSE mceusb
000000037ff07be7 01 KEY_PAUSE mceusb
000000037ff07be9 00 KEY_PLAY mceusb
000000037ff07be9 01 KEY_PLAY mceusb

So it is certainly looking like it is all going to work.

Time to try to configure lirc to run as a daemon:

cd /etc/lirc/lircd.conf.d
mv devinput.lircd.conf devinput.lircd.dist
mv ~tom/Downloads/mceusb.lircd.conf .
chown root:root mceusb.lircd.conf

Now edit the /etc/lirc/lirc_options.conf file to say driver = default (not devinput).

Now start it up.

systemctl enable lircd.socket
systemctl start lircd.socket

And, it seems to work! I can run irw as a normal user and see info about button presses when I use the device in the android app. A lot of device keys in the app don't show up in irw, but all the useful ones I want to use in mplayer are there.

Setting up one key for testing, I defined this in my ~/.lircrc file:

    button = KEY_PAUSE
    prog = mplayer
    config = pause

And like magic, it works. I can pause mplayer using the remote. Almost certainly the pause button is the one I'll use 99% of the time with mplayer, but I should probably figure out some other things to define that might be useful.

Page last modified Tue Nov 8 07:22:58 2016