[PLUGIN] IR Remote Controller feedback thread

Does the UI display an error message when you select another remote profile and click “Save”? If so, what does it tell?

Also please start logging with

journalctl -f | grep ir_controller

just before saving the newly selected remote control’s profile and post the output.

Hi, thank you for your help and sorry for the long delay to your question.

When I installed the software the first time, weeks ago and selected the Apple remote control A1294, I did not got an error message. Now, as you asked me, I selected another remote and did not get an error, but when I switched back to the Apple remote control A1294, I do get an error message, like “Settings can’t be saved”.

Switching to another remote control:

Feb 03 16:51:06 volumio-hifi volumio[860]: info: CALLMETHOD: system_hardware ir_controller saveIROptions [object Object]
Feb 03 16:51:06 volumio-hifi volumio[860]: info: CoreCommandRouter::executeOnPlugin: ir_controller , saveIROptions
Feb 03 16:51:06 volumio-hifi volumio[860]: info: ir_controller: LIRC correctly updated.
Feb 03 16:51:08 volumio-hifi volumio[860]: info: ir_controller: systemctl restart lircd.service succeeded.
Feb 03 16:51:08 volumio-hifi volumio[860]: info: ir_controller: systemctl restart irexec.service succeeded.

switching back to the Apple A1294:

eb 03 16:51:37 volumio-hifi volumio[860]: info: CALLMETHOD: system_hardware ir_controller saveIROptions [object Object]
Feb 03 16:51:37 volumio-hifi volumio[860]: info: CoreCommandRouter::executeOnPlugin: ir_controller , saveIROptions
Feb 03 16:51:37 volumio-hifi volumio[860]: error: ir_controller: Error copying configurations: Error: Missing “lircrc” and / or “lircd.conf” files.

In Terminal, when I give the command: “journalctl -f | grep ir_controller” I get no replay, no answer.

Thank you again for your help!

Does switching to another remote control lead to the same error?

The error only comes when I switch to Apple A1294 remote control.

That’s odd.

Please post the output of

ls -al "/data/plugins/system_hardware/ir_controller/configurations/Apple Remote A1294/"

After that you may also download Apple Remote A1294.zip (1,1 KB) and copy the extracted folder and its content to /data/INTERNAL/ir_controller/configurations

“INTERNAL” should be accessible as a samba share so you can easily access its subfolders via samba, too. A configuration in “/data/INTERNAL/ir_controller/configurations” gains priority over an identically named profile in the factory profiles folder (“/data/plugins/accessory/ir_controller/configurations”).

Now select another remote and click “Save”. Then select “Apple Remote A1294” and click “Save” again to check if the error has vanished.

Turn your display on/off using a remote (in combination with Touch Display)

cd ~
nano togglescreen.sh

copy paste:

#!/bin/bash

# Set XAUTHORITY and DISPLAY environment variables
export XAUTHORITY=~volumio/.Xauthority
export DISPLAY=:0

# Run the xset q command to get DPMS information
output=$(xset q)

# Check each line of the output for DPMS status
if [[ $output == *"Monitor is On"* ]]; then
    echo "Monitor is ON => Turning OFF"
    xset dpms force off
elif [[ $output == *"Monitor is Off"* ]]; then
    echo "Monitor is OFF => Turning ON!"
    xset dpms force on
else
    echo "Unable to determine monitor status"
fi

chmod 755 togglescreen.sh

To make sure no strange EOL are added:
sed -i -e 's/\r$//' togglescreen.sh

Test script manual:
bash /home/volumio/togglescreen.sh

image

add to the lircrc file (choose your button):

begin
prog = irexec
button = KEY_D
config = /home/volumio/togglescreen.sh &
repeat = 0
end
1 Like

Nice!

It works, really useful. I might now have a go making a toggle for USB power using uhubctl -p 1 -a on

Though I now need to buy a remote with more buttons!

Yeah I got a perfect one for these purposes.
sudo apt-get install xdotool
7,8,9,0 to control different layouts for mpd_oled

  • only spectrum bar in 126x64
  • std play layout
  • std stop layout
  • MPD_OLED off

Dimmer to turn LCD on/off (see script)
Arrow and OK act as mouse to navigate

  • up: XAUTHORITY=~volumio/.Xauthority DISPLAY=:0 xdotool mousemove_relative -- 0 -20
  • down: XAUTHORITY=~volumio/.Xauthority DISPLAY=:0 xdotool mousemove_relative 0 20
  • left: XAUTHORITY=~volumio/.Xauthority DISPLAY=:0 xdotool mousemove_relative -- -20 0
  • right: XAUTHORITY=~volumio/.Xauthority DISPLAY=:0 xdotool mousemove_relative 20 0
  • OK: XAUTHORITY=~volumio/.Xauthority DISPLAY=:0 xdotool click 1

1,2,3 to control the randomize plugin

  • 1: node /data/plugins/user_interface/randomizer/randomTracks
  • 2: node /data/plugins/user_interface/randomizer/randomAlbum
  • 3: node /data/plugins/user_interface/randomizer/trackToAlbum
    mode => random
    power => shut down
    info => open system info plugin
    menu => toggle between now playing and queue
    and the default multimedia keys.
    image
1 Like

Hi @Wheaten
In the end, to get the most out of the few keys available on my Odroid remote, I piggy-backed on on your toggle screen code to turn off the screen and the USB port that’s running my Topping DAC that stays on when not in use. It look like this:

#!/bin/bash
 
# Set XAUTHORITY and DISPLAY environment variables
export XAUTHORITY=~volumio/.Xauthority
export DISPLAY=:0
 
# Run the xset q command to get DPMS information
output=$(xset q)

# Check each line of the output for DPMS status
if [[ $output == *"Monitor is On"* ]]; then
     echo "Monitor is ON => Turning OFF"
     xset dpms force off
     uhubctl -p 1 -a off
elif [[ $output == *"Monitor is Off"* ]]; then
     echo "Monitor is OFF => Turning ON!"
     xset dpms force on
     uhubctl -p 1 -a on
else
     echo "Unable to determine monitor status"
fi

Already updated your code. :slight_smile:
If you toggle the USB port, the DAC is still recognized by Volumio?

Yes, it restarts the player and recognises the DAC.

Added one last tweak to openbox.
Since I am using my IR-remote to mimic the mouse, It bothered me that that the cursor kept being present on the screen. So I created a startup script for the Kiosk using unclutter.
Now the disappearing delay is set to 1 second. And as soon as I operate the cursor knobs, it appears again.
sudo apt-get install unclutter

mkdir /home/volumio/.config/openbox

cat >> /home/volumio/.config/openbox/autostart <<EOL
@unclutter -idle 1
EOL

Via software it’s possible, you just need to add your own logic to the script.

1 Like

Thank you

Can you write this again as CODE,
and name your source of supply

Yup
I should put on my glasses, sorry
Thank you

One more question, which IR remote controller can you recommend?

Hard to advice, as it all depends on your needs. And IMHO lirc ain’t the most stable part of linux. I have some test RC laying arround to support questions, but I run my devices using a BT remote.

My requirements for this are rather low.
So fast forward, rewind, play and stop and maybe display dimming

These are the remotes that work without problems in Volumio.
Since the topic shifted from LCD to IR I will move it to the correct topic.

1 Like