I’ve noticed on occasion that when pressing a particular button on one of my wall mote quads, there is no response from the target device. I added a log statement to the associated rule and in the logs, not only do I see the wrong value sent (I get 255), but every tap of that button is sent twice:
Here is the rule:
rule "Desk Mote received update"
when
Item desk_scene received update
then
val sceneval = desk_scene.state
logInfo("desk", sceneval.toString)
if(sceneval == 2.0 ){
val desklightstate = Desk_Light_Switch.state
if(desklightstate == ON){
Desk_Light_Switch.sendCommand(OFF)
Desk_Light_Switch.postUpdate(OFF)
}
else{
Desk_Light_Switch.sendCommand(ON)
Desk_Light_Switch.postUpdate(ON)
}
end
Here is the log output:
First tap:
2018-12-06 01:12:28.967 [INFO ] [.eclipse.smarthome.model.script.desk] - 255
2018-12-06 01:12:29.738 [INFO ] [.eclipse.smarthome.model.script.desk] - 255
Second tap:
2018-12-06 01:12:45.311 [INFO ] [.eclipse.smarthome.model.script.desk] - 2.0
2018-12-06 01:12:45.337 [INFO ] [.eclipse.smarthome.model.script.desk] - 0
This time is even stranger. Instead of repeating 2.0, I got a 0.
After another press or two, the correct value is sent and the target device behaves correctly. So what might be the problem?
Thanks