0

Logitech Harmony Bluetooth Remote on HiFiBerryOS

I am trying to configure my remote to control the volume on HiFiBerryOS. To control playback would be cool too. But I am mainly after the volume. When I plug in a USB keyboard into the Pi, I can control the volume with the volume up/down buttons on the keyboard while connected via Spotify Connect and paired via Bluetooth. This is both with my phone and my computers.

When I try to use my Harmony remote however, it is non responsive. I have it connecting to the pi as a Bluetooth keyboard. When I use the showkey command, I can see it sending key codes to the terminal. But, the volume slider on the web interface does not move and the volume does not change. I can do it with the USB keyboard and see the same thing in the terminal. But, the slider will move and it controls the volume. 115 and 114 are the key codes that show up if you need to know that.


Looking through the log files I noticed that the keyboard.py file actually runs before the bluetooth keyboard is actually initalized on the system. When I pull the usb keyboard off and boot. the keyboard listener fails to load. Here is a snippet from the log:

With usb keyboard attached:

kernel: input: Virtual Keyboard as /devices/virtual/input/input8
python3[295]: DEBUG: keyboard - keyboard listener started
python3[295]: INFO: audiocontrol2 - started controller keyboard

Without usb keyboard:

kernel: input: Virtual Keyboard as /devices/virtual/input/input0
python3[286]: ERROR: keyboard - could not start Keyboard listener, no keyboard detected or no permissions
python3[286]: INFO: audiocontrol2 - started controller keyboard

Then later in the log file:

kernel: input: Harmony Keyboard Mouse as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0000:0000.0001/input/input1
kernel: input: Harmony Keyboard Keyboard as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0000:0000.0001/input/input2
kernel: input: Harmony Keyboard Consumer Control as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0000:0000.0001/input/input3
kernel: input: Harmony Keyboard System Control as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:0000:0000.0001/input/input4
kernel: hid-generic 0005:0000:0000.0001: input,hidraw0: BLUETOOTH HID v0.00 Mouse [Harmony Keyboard] on dc:a6:32:1d:93:22

In both cases it does start open the http connection.

Now that I have bored you with a few details. The question is how do if fix it here? Or can you fix it on your end?

Thanks for the help and the cool sound system!

Rob

1 comment

Please sign in to leave a comment.