i have upgraded OH 3.4.2 to OH 4.0.2.
i have a rule triggered by “System started”. Since the update this rule ist executed every minute. does anbody have a same Problem. there is no entry in the logfiles …
i have upgraded OH 3.4.2 to OH 4.0.2.
i have a rule triggered by “System started”. Since the update this rule ist executed every minute. does anbody have a same Problem. there is no entry in the logfiles …
Is there anything changing the rule or .items files or the like? In OH 4 we’ve returned to the old behavior where if the system has already started when the rule is loaded it will trigger the rule. That means any time that rule is loaded/reloaded it will be triggered.
No nothing, I just need to wait a minute and the rule will be executed every minute
In $OH_USERDATA/etc/log4j2.xml change the level of openhab.event.Rule* loggers to INFO. That will show all the rule related events to events.log. That can show us what the rules are doing. Maybe that will provide a clue.
Also, show the rule.
hmmm… i had a timer in my rule like this:
createTimer(now.plusSeconds(45), [|
sendHttpPutRequest("http://localhost:8080/rest/things/deconz%3Adeconz%3A00212E/enable", "text/plain", 'false', headers, 5000)
Thread::sleep(1000)
sendHttpPutRequest("http://localhost:8080/rest/things/deconz%3Adeconz%3A00212E/enable", "text/plain", 'true', headers, 5000)
logInfo("CommonRules", "Deconz restart")
])
after i deleted this part, the rule seems to be ok and only starts at startup or item reload … but what is the reason ?
Not sure if that is the reason, but I think it is a bad idea to use a Thread:sleep here.
What about nesting a second timer ?