So I have this rule:
rule "Portão exterior a abrir/fechar com comando"
when
Item Sensor_Portao_Exterior received update
then
switch Sensor_Portao_Exterior.state {
case "OFF": {
sendBroadcastNotification("Portão exterior aberto.")
}
case "ON": {
sendBroadcastNotification("Portão exterior fechado.")
}
}
end
And it’s not working when the update comes directly from JSONPATH, it only works when I change the item directly.
Already tried with received command “OFF” and with changed, without the switch cases as well and it did not worked.
Already tried to logInfo and it seems that the rule is simply not triggered at all when the item changes due to JSONPATH.
Again, if I change the item directly in Paper UI or in APP, it works flawlessly.
So nothing logged in openhab.log but in my events.log it properly receives the changes from JSONPATH:
2020-11-24 11:31:10.108 [vent.ItemStateChangedEvent] - Sensor_Portao_Exterior changed from ON to OFF
2020-11-24 11:31:14.272 [vent.ItemStateChangedEvent] - Sensor_Portao_Exterior changed from OFF to ON
So… yeah, I’m stuck!