Hello Community,
I have some problems with my rules (or maybe some other part of the system). I have some rules which fire when a Z-Wave PIR is activated and switch on certrain lights. The rules themselves are working, but after the system is up for some time, they cause an error in openhab.log. Sometimes they work a few days, sometimes only some hours. Here is one example:
rule "Bewegungsmelder Keller Flur PIR1 an"
when
Item PIR_Sensor_1 changed from OFF to ON then
KG_Flur_Licht_Timer.sendCommand(ON)
sendTelegram("bot1", "Flur Licht Keller Timer aktiv (PIR1)!")
end
rule "Keller Licht Automatik"
when
Item KG_Flur_Licht_Timer changed
then
KG_Flur_Licht.sendCommand(KG_Flur_Licht_Timer.state)
sendTelegram("bot1", "Flur Licht Keller aktiv!")
end
The rule usually works fine, but after some time, this error appears when it fires:
events.log:
2020-05-23 19:54:36.227 [vent.ItemStateChangedEvent] - PIR_Sensor_1 changed from OFF to ON
2020-05-23 19:54:36.239 [ome.event.ItemCommandEvent] - Item 'KG_Flur_Licht_Timer' received command ON
2020-05-23 19:54:36.246 [vent.ItemStateChangedEvent] - KG_Flur_Licht_Timer changed from OFF to ON
openhab.log
2020-05-23 19:54:36.250 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Keller Licht Automatik': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(org.eclipse.smarthome.core.items.Item,java.lang.Number) on instance: null
I first thought it’s an issue with the MQTT broker (since KG_Flur_Licht is a Tasmota), but the Tasmota responds to commands when switched with Sitemap for example, as you can see from events.log it works fine when switched "manually:
2020-05-23 20:17:22.646 [ome.event.ItemCommandEvent] - Item 'KG_Flur_Licht' received command ON
2020-05-23 20:17:22.650 [nt.ItemStatePredictedEvent] - KG_Flur_Licht predicted to become ON
2020-05-23 20:17:22.705 [vent.ItemStateChangedEvent] - KG_Flur_Licht changed from OFF to ON
The error also occurs with other rules which control Z-Wave devices.
BTW, the problem occured in various versions of OH2 since 2.2 I think and it feels it gets worse with every release, at the moment I am on 2.5.5.
Any hints what can be the problem?