Hello all,
I have an issue with a rule triggered after some time round about 2h.
I have an esp8266 dash button which send via mqtt a mesage to a item. If this item is changed it should trigger a rule but after around 2 hours silence of this button the item is changed but the rule is not triggered
here is the code
MQTT
Thing mqtt:topic:button (mqtt:broker:mosquitto) {
Type string : JSONstate_value "JSONstate_value" [stateTopic="button/state/json", transformationPattern="JSONPATH:$.value"]
}
String string_button_statejsonvalue "button JSON State Value" <mobile> {channel="mqtt:topic:button:JSONstate_value"}
rule "Handle button"
when
Item string_button_statejsonvalue changed
then
is there a better way or any issues with my code???
2020-06-03 16:00:51.992 [vent.ItemStateChangedEvent] - string_button_statejson changed from {"event":"p[6].b[4].val", "value":0} to {"event":"p[6].b[4]", "value":"ON"}
2020-06-03 16:00:51.994 [vent.ItemStateChangedEvent] - string_button_statejsonvalue changed from 0 to ON
and the rule
rule "Handle Master"
when
Item string_button_statejsonvalue changed
then
logInfo ("Handle ", "triggerd")
//parse out data from JSON string (page, button, value)
var String eventpage = string_button_statejsonevent.state.toString.split("\\[").get(1).split("\\]").get(0)
var String eventbutton = string_button_statejsonevent.state.toString.split("\\[").get(2).split("\\]").get(0)
end
the loginfo is not written that’s why i know it is not triggerd
Easy way probably to disable other rules by renaming files xxx.rules to xxx.rules.bak or something. You’d then need to restart openHAB to kill any rules already running and looping.