25. November 2015 at 9:20 #17016
I am in search of a infrared remote solution for my raspberry pi Squeezebox installation.
– raspberry pi 2
– HifiBerry DAC+ Pro
– 7″ Touchscreen
Max2Play plugin: Hifiberry, SqueezeboxServer, Audioplayer (Squeezelite activated), RPi Display, Jivelite.
Everything is working as expected, esp. the Touchscreen with Jiverlite.
My question: I would like to add a infrared remote (like a lirc solution) to control Squeezelite/Jivelite in case I can not use the touch functionality of the Touchscreen; is it possible? What to do? Is there a plugin for this problem?
By the way: Initially I wanted to install a DLNA audio client solution, because I have up and running a DLNA audio server (MinimServer on a Linux PC). Anyhow I was not able to use MinimServer via the DLNA client solution in the Max2Play Audioplayer plugin. Any idea what went wrong?
Regards Rainer25. November 2015 at 16:30 #17020
Regarding the infrared, the Raspberry Pi does not have a native infrared receiver. Thus, a hardware component would have to be added. Thus, we are not planning on implementing such a solution in the near future.
Regarding the DLNA Audio Player, did your server not recognize the Player in the network or was the playback problematic? Please try running just the gmediarender as an Audioplayer to rule out interference with the opther players (tick off autostart at Squeezelite).25. November 2015 at 18:04 #17021
For a cheap and working IR receiver: http://powerpi.de/jede-infrarot-fernbedienung-am-raspberry-pi-2-nutzen-so-installierst-du-guenstig-einen-ir-empfaenger-teil-1/ (only in German)
Works for me like a charm with Harmony 88526. November 2015 at 11:24 #17036
thanks for your input.
Regarding the infrared remote Solution:
The solution Manfred2k mentions is not possible for my system because I have installed the HifiBerry board and the GPIO pins are not available for the IR Receiver. So I will have to use a USB solution like Flirc. Can I control the Jivelite/Squeezebox interface on my RPi Touchscreen with a Flirc based IR Receiver solution (together with a remote like Logitech Harmony)? How to install? Is there a how-to available?
I know, a lot of „beginner questions“ …
Regards Rainer29. November 2015 at 10:07 #17060
I have exactly the same bundle than you and my system is working perfectly with a hifiberry dac+ and a homemade IR receiver explained in Manfred2k webpage (I don’t speak german but command line are understoodable:) ).
But there is one trick to do: default lirc port (19?) is not possible because it is already used by the DAC. You have to change it in /boot/config.txt file on your raspi like this:
dtoverlay=lirc-rpi,gpio_in_pin=<your pin number>
And of course solder new pins on your DAC.
And it works like a charm 🙂29. November 2015 at 12:03 #17062
Thanks a lot for your inputs.
But I will implement a solution with the Flirc USB stick. My son told me this is the easiest way to go… a little bit more expensive but idiot proof. Because Flirc emulates a standard keyboard. I put a keyboard on the RPi and viola I could find out the relevant keys to control Squeezelite/Jivelite.
So I ordered a Flirc and will give you a feedback as soon as the product has arrived.
Regards Rainer14. Dezember 2015 at 12:18 #17318
did you install lirc manually (can’t find lirc folders anywhere)? I did this, but when I started following he tutorial with the „killall“ command, no lirc process was found. I also changed the GPIO-IN pin to 24 like you (I hope I got this right and connected the cable to PIN#18 on the board?).
Can you remember the steps to get there? Got a bit frustrated here 😉14. Dezember 2015 at 12:19 #17319
btw this is the receiver i bought: https://www.conrad.de/de/ir-empfaenger-sonderform-axial-bedrahtet-38-khz-950-nm-vishay-tsop4838-171115.html14. Dezember 2015 at 13:26 #17321
sudo apt-get install lirc lirc-x liblircclient-dev
another tutorial in German http://www.vdr-wiki.de/wiki/index.php/Raspbian_VDR_Streaming_Client_-_LIRC17. Dezember 2015 at 0:18 #17381
Thanks for that excellent tip. I got i kinda working. Whenever i run irw i get results like this in the command line:
000000004be0b946 00 KEY_RIGHT /root/lircd.conf
000000004be039c6 00 KEY_LEFT /root/lircd.conf
000000004be0d926 00 KEY_DOWN /root/lircd.conf
000000004be059a6 00 KEY_UP /root/lircd.conf
000000004be07986 00 KEY_A /root/lircd.conf
000000004be0e916 00 KEY_Q /root/lircd.conf
000000004be09966 00 KEY_H /root/lircd.conf
But no reaction in jivelite…
Is there another key-mapping file for jivelite that has to be adjusted?
I did all steps in the tutorial as the root user, maybe it has got something to do with this as it says /root/lircd.conf?
Any help is appreciated, as I got so far now 🙂17. Dezember 2015 at 9:10 #17382
In the meantime I got a Flirc infrared USB stick (https://flirc.tv/more/flirc-usb). A little bit more expensive than the solutions you are discussing (I had to pay 25 Euro for the stick) but working out of the box.
No problems to get it up and running. The stick emulates a standard keyboard so you only have to put a keyboard at your RPi and check the keystrokes you need in the application you are using.
I use an old remote from an now unused BluRay player and it now controls Max2Play Squeezelite. May be an alternative for those who get frustrated with their diy solutions…
Regards Rainer21. Dezember 2015 at 19:52 #17451
Hi again. I tried to install everything again using the tutorial on vdr-wiki and everything worked (this time not as root user… don’t know if this makes a difference)… I pasted the terminal code when hitting buttons on the remote control. And I think at least with KEY_RIGHT, left, down and so on somethin should happen in jivelite right? Do you have an idea what might have to be done here to make jivelite understand/receive those keyboard commands? Automatic startup of lirc seems to work.
Any help would really be appreciated!
[email protected] ~ $ irw
000000004be0b946 00 KEY_RIGHT /home/pi/lircd.conf
000000004be039c6 00 KEY_LEFT /home/pi/lircd.conf
000000004be07986 00 KEY_A /home/pi/lircd.conf
000000004be0e916 00 KEY_Q /home/pi/lircd.conf
000000004be09966 00 KEY_H /home/pi/lircd.conf7. Januar 2016 at 11:35 #17601
I’ve nearly the same configuration (7″ touch + jive lite + [email protected] + XBOX one remote clone) for both of my kids very stable and nearly indestructible.
At first I played around with some default key mappings like „KEY_RIGHT“ this worked – but the remote has a lot of more keys 😉
Since Jive Lite has no native IR/lirc support, I had to use irxevent:
1.) complete lircd.conf for all keys you wanted to use (for such a much-used remote like the XBOX one just download it somewhere ;-))
2.) take the whole needed mapping from IR-keys to the keyboard control of jive lite (reference: InputToActionMap.lua) in the lircrc config file
# Remote: VolumeUp # Jivelite '+' begin remote = XBOX-ONE prog = irxevent button = VolumeUp config = Key plus jivelite end
or for multiple keyboard action just double the block:
# Remote: big green button # jivelite at first stop playback 'C' begin remote = XBOX-ONE prog = irxevent button = XboxFancyButton config = Key shift-c jivelite end # Remote: big green button # jivelite second power off for display backlight 'q' begin remote = XBOX-ONE prog = irxevent button = XboxFancyButton config = Key q jivelite end
jiveliteyou may use
CurrentWindowas target for the keyboard emulation and control even other applications with the mapped keys in the lircrc.
3.) On startup you need a script which waits for the successfull start of lircd and jivelite to start finally irxevent e.g.
Always check lircd for running correctly (e.g. via irw) – otherwise thee hardware.conf may be not correct…11. Januar 2016 at 14:14 #17721
If you just want to use the lircrc in the described irxevent for jivelite scenario just put it in the /etc/lirc/ folder (it’s even the default folder for an global irexec-configuration which based this file too) – or anywhere else.
You have to start irxevent with the target file as paramter to get the solution to work:
irxevent /etc/lirc/lircrc20. Januar 2016 at 22:30 #18031
Here is the script I start via crontab @reboot
#!/bin/bash # Nur ausführen, wenn jivelite im Autostart autostart=$(grep -a "jivelite=1" /opt/max2play/autostart.conf | wc -l) if [ $autostart -eq 0 ]; then echo "Jivelite nicht im Autostart - irxevent wird nicht gestartet!" exit 0 fi # Warten bis jivelite gestartet ist while [ -z "$(pidof jivelite)" ]; do sleep 1 done # Warten bis Lircd gestartet ist while [ -z "$(pidof lircd)" ]; do sleep 1 done if [ -z "$(pidof irxevent)" ]; then echo "Starte irxevent!" echo 'DISPLAY=:0 irxevent -d /etc/lirc/lircrc' else echo "Starte irxevent neu!" echo 'sudo kill “$(pidof irxevent)“' sleep 1 echo 'DISPLAY=:0 irxevent -d /etc/lirc/lircrc' fi exit 026. Januar 2017 at 19:53 #26350
thanks for sharing this Bort!
If anyone interested in IR-Support: we now have an easy installer for the Justboom Remote in our Justboom-Soundcard Plugin for Max2Play that supports Jivelite, Squeezlite (direct) and MPD. It comes with preconfigured IR-Codes for the Justboom Remote and has the button configuration ready for Jivelite, Squeezelite and MPD.
You may also override existing settings with your own and replace IR-Codes or button configuration. There might come a even more powerful standalone IR-Addon for Max2Play in the future with more preconfigured remotes.
All the Best,
Stefan25. Juli 2017 at 20:42 #30153
everything with my remote control works fine, if I wrote in the shell of the remote session this:
DISPLAY=:0 irxevent -d /home/pi/lircrc
but after a reboot of the Raspberry PI3, I have to do it every time again.
My Problem is, to do that string anywhere in the boot sequence.
I try it as a script whit crontab like follow:
### BEGIN INIT INFO
# Provides: fb.sh
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts & Stops fb.sh
# Description: Starts & Stops fb.sh
### END INIT INFO
# Nur asuführen wenn jivelite im Autostart
autostart=$(grap -a „jivelite=1“ /opt/max2play/autostartconf | wc -l)
if [ $autostart -eq 0 ];
echo „Jivelite nicht im Autostart – irxevent wird nicht gestartet!“
# Warten bis jivelite gestartet ist
while [ -z „$(pidof jivelite)“ ];
# Warten bis Lircd gestartet ist
while [ -z „$(pidof lircd)“ ];
if [ -z „$(pidof irxevent)“ ];
echo „Starte irxevent!“
echo ‚DISPLAY=:0 irxevent -d /home/pi/lircrc‘
echo „Starte irxevent neu!“
echo ’sudo kill „$(pidofirxevent)“‚
echo’DISPLAY=:0 irxevent -d /home/pi/lircrc‘
The script name is fb.sh and that is the crontab config:
I don’t know what is wrong in my script.
26. Juli 2017 at 14:28 #30167
- This reply was modified 5 years, 2 months ago by relgi.
yes the LIRC implementation is checked, but I modify the config.txt in /boot.
I change it to GPIO=17 and remove the GPIO OUT. I use a Hifiberry Digi+.
I told that everything works fine if I use this command in a shell:
DISPLAY=:0 irxevent -d /home/pi/lircrc, so my problem know is, that after a reboot of the raspbian OS,
i have todo it every time. I need help for a implementation of this command that it works after any reboot without my doing in the shell.
26. Juli 2017 at 14:44 #30168
- This reply was modified 5 years, 2 months ago by relgi.
it works now.
What I change:
copy the file lircrc from /home/pi to /etc/lirc
change my script from echo’DISPLAY=:0 irxevent -d /home/pi/lircrc’ to echo’DISPLAY=:0 irxevent -d /etc/lirc/lircrc’
after that everything works as I like.
thx for support.
You must be logged in to reply to this topic.