hello,
after every time i restart ma RPI, i can’t use my MQTT Commands.
i got this error Messsage
12:17:35.899 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'RF Subwoofer': Instance is not an MQTTActions class.
After i save my *.rule again, everything works fine.
val mqttActions = getActions("mqtt","mqtt:broker:pibroker")
rule "RF Subwoofer"
when
Item RF_Subwoofer received update
then
if (RF_Subwoofer.state == ON) {
mqttActions.publishMQTT("home/OpenMQTTGateway/commands/MQTTtoPilight", "{\"message\":\"{\\\"systemcode\\\":1,\\\"programcode\\\":4,\\\"on\\\":1}\",\"protocol\":\"rsl366\"}")
createTimer(now.plusSeconds(1), [|
mqttActions.publishMQTT("home/OpenMQTTGateway/commands/MQTTtoPilight", "{\"message\":\"{\\\"systemcode\\\":1,\\\"programcode\\\":4,\\\"on\\\":1}\",\"protocol\":\"rsl366\"}")
])
createTimer(now.plusSeconds(1), [|
mqttActions.publishMQTT("home/OpenMQTTGateway/commands/MQTTtoPilight", "{\"message\":\"{\\\"systemcode\\\":1,\\\"programcode\\\":4,\\\"on\\\":1}\",\"protocol\":\"rsl366\"}")
])
}
else {
mqttActions.publishMQTT("home/OpenMQTTGateway/commands/MQTTtoPilight", "{\"message\":\"{\\\"systemcode\\\":1,\\\"programcode\\\":4,\\\"off\\\":1}\",\"protocol\":\"rsl366\"}")
createTimer(now.plusSeconds(1), [|
mqttActions.publishMQTT("home/OpenMQTTGateway/commands/MQTTtoPilight", "{\"message\":\"{\\\"systemcode\\\":1,\\\"programcode\\\":4,\\\"off\\\":1}\",\"protocol\":\"rsl366\"}")
])
createTimer(now.plusSeconds(1), [|
mqttActions.publishMQTT("home/OpenMQTTGateway/commands/MQTTtoPilight", "{\"message\":\"{\\\"systemcode\\\":1,\\\"programcode\\\":4,\\\"off\\\":1}\",\"protocol\":\"rsl366\"}")
])
}
end