I having difficulty getting what I think should be a very simple rule to execute. Here are the relevant items from my items file default.items:
Switch photon1_sentinal {mqtt="<[rpiMQTTbroker:/home/photon1/sentinal:state:default]"}
Switch mySwitch {mqtt=">[rpiMQTTbroker:/home/photon1/input:command:ON:D0_ON],>[rpiMQTTbroker:/home/photon1/input:command:OFF:D0_OFF]"}
And here is my entire default.rules file:
rule “photon1_watchdog”
when
item photon1_sentinal received update
then
logInfo("default.rules", "In rule photon1_watchdog")
sendCommand(mySwitch, ON)
end
Sending MQTT commands changes the state of the “photon1_sentinal” item, but the rule never seems to execute: I don’t see the ON command being sent in the terminal, and I don’t see anything being written to the openhab.log file in the log folder.
Does anyone see any obvious problems with my code?