Hi everybody,
I am trying to make my cine screen smart. Based on my existing 433 MHz ruleset for my power_plugs and this thread about Rollershutters, which is approx the same I like to do, moving screen up and down.
I used 433 utils to send decimal code which is working with openhabian fine.
My issue is at the moment that the rule is not working proper I assume.
My thing:
Thing exec:command:remote-codesend[
command="/opt/rc-switch/433Utils/RPi_utils/codesend %2$s",
interval=0,
autorun=true]
My items:
// for 433MHz Leinwand via ./codesend
Switch Remote_CodeSend { channel="exec:command:remote-codesend:run"}
String Remote_CodeSend_Args { channel="exec:command:remote-codesend:input"}
String Remote_CodeSend_Out { channel="exec:command:remote-codesend:output"}
Rollershutter Leinwand_Remote <cinemascreen>
for the rule I tried to different approaches, but both did not work:
// Leinwand_Remote
rule "Leinwand"
when
Item Leinwand_Remote received command
then
switch (receivedCommand){
case UP: Remote_CodeSend_Args.sendCommand("11....13")
case STOP: Remote_CodeSend_Args.sendCommand("11....14")
case DOWN: Remote_CodeSend_Args.sendCommand("11....16")
}
logInfo("Leinwand", "Results are: \n" + Remote_CodeSend_Out.state )
end
//zweiter Versuch
rule "Leinwand"
when
Item Leinwand_Remote received command
then
if(receivedCommand == UP){
Remote_CodeSend_Args.sendCommand("11....13")
}else if (receivedCommand == STOP) {
Remote_CodeSend_Args.sendCommand("11....14")
}else if (receivedCommand == DOWN) {
Remote_CodeSend_Args.sendCommand("11....16")
}
logInfo("Leinwand", "Results are: \n" + Remote_CodeSend_Out.state )
end
Before optimizing the code with sleep time etc. I first would like the command to be executed from the openhab system as it is currently working for openhabian ./codesend 11…13. When sending the command with ./codesend by openhabian my openhab MQTT sniffer is getting the correct information in the log-9001. While using my openhab configuration, I only receive the classical Item Leinwand_Remote received command DONW (STOP or UP).
Does anybody has an idea, where my logical bug could be?