Hi,
I finally got my Flirc working with Hassio, so thought I’d share my findings hoping it will save time for others.
I did all the things the op and others mentioned doing, but no matter what, I couldn’t get my Flirc working. Because others reported they got their Flirc working, it motivated me to put some extra effort into this.
My Docker BaseOS is Debian10 so I installed ‘evtest’ on it. I ran evtest and it showed my flirc device on serial event3. I selected event3 for evtest to monitor traffic from that device. When I tried it gave me an error that my flirc was already grabbed by another process.
This took me quite awhile, but finally figured out it was being grabbed by libinput at startup. I found that this is done in a configuration file for libinput. The config file is /usr/share/x11/xorg.conf.d/40-libinput.conf. Flirc is a keybord device so in the configuration file this section is causing libinput to grab my flirc at startup:
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
To tell libinput to ignore my fllirc, I added this section to the libinput config file and rebooted:
Section "InputClass"
Identifier "Ignore Fllirc USB Keyboard"
MatchDevicePath "/dev/input/event3"
Option "Ignore" "on"
EndSection
After rebooting I ran evtest and this time successfully entered monitor mode!! So I grabbed my remote and started pressing buttons expecting evtest to display them on the terminal. But nothing… nada.
After yet more google research, I found that the Flirc was designed years ago to support a Windows MCE (media center entertainment) remote. The flirc has a built-in key map matrix. If a valid Windows MCE remote key is not received, it tosses it away to bit landia.
If your remote is not MCE compatible, you’ll need to remap the flirc to recognize your remote. To to this I had to install the flirc_utility for linux program, and use the record function to create the new key map.
After doing that I ran evtest again, this time evtest displayed every key I pressed!! Yay
So then I added to my configuration.yaml file:
keyboard_remote:
device_name: 'flirc.tv flirc Keyboard'
type: 'key_down'
Then I went to the developers tools panel for events and started the event listener for the event: ‘keyboard_remote_command_received’
Now when I press a key on my remote, I get an event found reply for each key, like so:
Event 0 fired 8:33 PM:
{
"event_type": "keyboard_remote_command_received",
"data": {
"key_code": 3,
"device_descriptor": null,
"device_name": "flirc.tv flirc Keyboard"
},
"origin": "LOCAL",
"time_fired": "2019-09-20T03:33:03.796183+00:00",
"context": {
"id": "a23c89777ab64db1b3d8797270c1a702",
"parent_id": null,
"user_id": null
}
}
HOORAY, my Flirc now works!!!