I am stuck trying to receive IR commands via lirc binding and reacting on it in rules.
I’m running OH2 v2.3.0-snapshot (#1227) on raspberry pi 3 with a TSOP4838 IR receiver attached.
Lirc itself seems to work, at least I can see commands coming in when running $ mode2 -d /dev/lirc0
In PaperUI I installed the lirc binding and when searching for new things, the remote (in my case a Panasonic_TV) get’s listed and is shown as ONLINE.
Based on the oh2 doc I tried to create a simple rule for testing, but when pressing “KEY_VOLUMEUP” I don’t get the expected Info in /var/log/openhab2/openhab2.log…
rule “LIRC test”
when
Channel ‘lirc:remote:bd5cc655:PANASONIC_TV:event’ triggered KEY_VOLUMEUP
then
logInfo(“lirc”, “LIRC Test triggered KEY_VOLUMEUP”)
end
From what I read I cannot create an item for this but should be able to use the Channel directly in my rules file.
Any suggestions how I can further debug this issue?
rule “LIRC Test”
when
Channel ‘lirc:remote:local:Samsung:event’ triggered KEY_DVD
then
// Toggle base boost on the AV Receiver
sendCommand(Remote_AVReceiver, “KEY_BASEBOOST”)
// Increase the volume by 5.
sendCommand(Remote_AVReceiver, “KEY_VOLUMEUP 5”)
end
Then at this point there is either something wrong with your Thing definition, binding configuration, or they device that is sending the event. I don’t know this binding so won’t be if much more help.
install lirc binding in oh2
–> if lircd is running properly you should see the LIRC server in oh2 as online
Make sure you have a suitable .lircd.conf in /etc/lirc/lircd.conf.d/
–> you can test this by running $ irw
–> pressing buttons on the remote should result in a sensible message
When searching for new thing in oh2, the should get listed
–> pressing buttons on the remote should result in events within oh2 (see e.g. /var/log/openhab2/event.log)