Rules not running

Hello I have the same issue that some rules are sporatically not running anymore…

I can’t give you a hint which one is running and which not and why…If i fire them once they are running…

If the maintainer needs a system to test I can grant you access via wireguard and a webcam so you can check if the rules are firing…

maybe a hint…
The only odd behavior during Startup is that this log is happening for all devices

2022-12-29 23:30:52.233 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'network:pingdevice:pingdevice_homestatusdisplay' changed from ONLINE to UNINITIALIZED
2022-12-29 23:30:52.271 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'network:pingdevice:pingdevice_homestatusdisplay' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

And after a certain time the thing came online…

My thinking is a run time/synchronisation error of several phases…

After some more hours running an cleaning the cache and several restarts I have the feeling everything which is configured via the file is not properly loaded or updated if I change the file during running.

I also realized I don’t hve ny mqtt connection anymore even if it is displayed “green” and marked as online…Anyone have the same issue?

MQTT works fine for me.

But I noticed from my logfiles, that depending on the load sequence of config files (things, items, etc.), I got some entries like this:

2022-12-27 20:49:46.047 [WARN ] [dule.handler.ItemStateTriggerHandler] - Item 'carport_light_outdoor_east_direct' needed for rule 'light-5' removed. Trigger '0' will no longer work.
2022-12-27 20:49:46.049 [WARN ] [dule.handler.ItemStateTriggerHandler] - Item 'carport_light_outdoor_east_motionsensor' needed for rule 'light-6' removed. Trigger '0' will no longer work.
2022-12-27 20:49:46.108 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mqtt.items'
2022-12-27 20:49:46.996 [INFO ] [dule.handler.ItemStateTriggerHandler] - Item 'carport_light_outdoor_east_direct' needed for rule 'light-5' added. Trigger '0' will now work.
2022-12-27 20:49:47.001 [INFO ] [dule.handler.ItemStateTriggerHandler] - Item 'carport_light_outdoor_east_motionsensor' needed for rule 'light-6' added. Trigger '0' will now work.

These entries (which are affecting my MQTT config) only happens, if OH loads the thing file before the items file. If OH loads first the item file and afterward the thing file, then these situation does not occur. However, the log entries say, that OH has recognized it

My issue occurs since the change from 3.3m5 to 3.4…everything runs fine with 3.3m5 than I updated to 3.4 and I got all this errors…

The messages are just improved logging, the situation itself was the same before. If the MQTT binding(s) depends on items to be loaded, than I would say that they are buggy should be fixed.

1 Like

Please help me to find than the issue:

here is my thing file:

Bridge mqtt:broker:mosquitto "MQTT Broker: Mosquitto" [ host="xxxx", port=8883, clientID="openHAB", secure="true", username="username", password="password", lwtMessage="OFF", lwtTopic="openhab/status", lwtQos=0, lwtRetain="True" ]
Thing mqtt:topic:openhab (mqtt:broker:mosquitto) {
    Type switch : lastwilltopic "lastwilltopic" [ commandTopic="openhab/status", on="ON", off="OFF", retained=true]
}
Thing mqtt:topic:haspplate01 (mqtt:broker:mosquitto) {
    Type number : page "page" [stateTopic="hasp/plate01/command/page", commandTopic="hasp/plate01/command/page", formatBeforePublish="%.0f"]
    Type switch : lightswitch "lightswitch"   [stateTopic="hasp/plate01/light/state", commandTopic="hasp/plate01/light/switch", on="ON", off="OFF"]
    Type number : brightness "brightness" [ stateTopic="hasp/plate01/brightness/state", commandTopic="hasp/plate01/brightness/set", formatBeforePublish="%.0f"]
    Type switch : status "status" [stateTopic="hasp/plate01/status"]
    Type switch : motion "motion" [stateTopic="hasp/plate01/motion/state"]
    Type string : sensor "sensor" [stateTopic="hasp/plate01/sensor"]
    //Type string : sensor_state "sensor_state" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.status"]
    Type string : sensor_espVersion "sensor_espVersion" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.espVersion"]
    Type string : sensor_espUpdate "sensor_espUpdate" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.updateEspAvailable"]
    Type string : sensor_lcdVersion "sensor_lcdVersion" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.lcdVersion"]
    Type string : sensor_lcdUpdate "sensor_lcdUpdate" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.updateLcdAvailable"]
    Type number : sensor_espUptime "sensor_espUptime" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.espUptime"]
    Type number : sensor_signalstrength "sensor_signalstrength" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.signalStrength"]
    Type number : sensor_haspadc "sensor_haspadc" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.adc"]
    Type number : sensor_haspbme680_rawgasresistor "sensor_haspbme680_rawgasresistor" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_rawgasresistor"]
    Type number : sensor_haspbme680_rawtemperature "sensor_haspbme680_rawtemperature" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_rawtemperature"]
    Type number : sensor_haspbme680_rawpressure "sensor_haspbme680_rawpressure" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_rawpressure"]
    Type number : sensor_haspbme680_rawhumidity "sensor_haspbme680_rawhumidity" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_rawhumidity"]
    Type number : sensor_haspbme680_rawgasresistor "sensor_haspbme680_rawgasresistor" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_rawgasresistor"]
    Type number : sensor_haspbme680_iaq "sensor_haspbme680_iaq" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_iaq"]
    Type number : sensor_haspbme680_staticiaq "sensor_haspbme680_staticiaq" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_staticiaq"]
    Type number : sensor_haspbme680_iaqaccuracy "sensor_haspbme680_iaqaccuracy" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_iaqaccuracy"]
    Type number : sensor_haspbme680_co2equivalent "sensor_haspbme680_co2equivalent" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_co2equivalent"]
    Type number : sensor_haspbme680_breathvocequivalent "sensor_haspbme680_breathvocequivalent" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_breathvocequivalent"]
    Type number : sensor_haspbme680_compensatedtemperature "sensor_haspbme680_compensatedtemperature" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_compensatedtemperature"]
    Type number : sensor_haspbme680_compensatedhumidity "sensor_haspbme680_compensatedhumidity" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.bme680_compensatedhumidity"]
    Type number : sensor_hasplight "sensor_hasplight" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.lux"]
    Type string : sensor_haspIP "sensor_haspIP" [stateTopic="hasp/plate01/sensor", transformationPattern="JSONPATH:$.haspIP"]
    Type string : command "command" [commandTopic="hasp/plate01/command"]
    Type string : JSONcommand "JSONcommand" [commandTopic="hasp/plate01/command/json"]
    Type string : JSONstate "JSONstate" [stateTopic="hasp/plate01/state/json"]
    Type string : JSONstate_event "JSONstate_event" [stateTopic="hasp/plate01/state/json", transformationPattern="JSONPATH:$.event"]
    Type string : JSONstate_value "JSONstate_value" [stateTopic="hasp/plate01/state/json", transformationPattern="JSONPATH:$.value"]
    //Type string : status "status" [stateTopic="hasp/plate01/status"]transformationPattern
}

And my item file

Number:Dimensionless	number_haspplate01_page							"HASP Plate 01 Page Select [%.0f]"						<mobile>			{channel="mqtt:topic:haspplate01:page"}
Number:Dimensionless	number_haspplate01_pagecurrent					"HASP Plate 01 Current Page [%.0f]"						<mobile>			{channel="mqtt:topic:haspplate01:page"}

/* Plate Status Items */
Switch	switch_haspplate01_light						"HASP Plate 01 Backlight Switch [%s]"					<mobile>			{channel="mqtt:topic:haspplate01:lightswitch"}
Switch	switch_haspplate01_lightstatus					"HASP Plate 01 Backlight Status [%s]"					<mobile>			{channel="mqtt:topic:haspplate01:lightswitch"}
Number:Dimensionless	number_haspplate01_lightbrightness				"HASP Plate 01 Backlight Brightness [%.0f]"				<mobile>			{channel="mqtt:topic:haspplate01:brightness"}
Number:Dimensionless	number_haspplate01_lightdimmer					"HASP Plate 01 Backlight Brightness Set [%.0f]"			<mobile>			{channel="mqtt:topic:haspplate01:brightness"}
Switch	switch_haspplate01_status						"HASP Plate 01 Connection Status [%s]"					<mobile>			{channel="mqtt:topic:haspplate01:status"}
String	string_haspplate01_sensor						"HASP Plate 01 Sensor [%s]"								<mobile>			{channel="mqtt:topic:haspplate01:sensor"}
//String	string_haspplate01_sensorstatus					"HASP Plate 01 Sensor - Status [%s]"					<mobile>			{channel="mqtt:topic:haspplate01:sensor_state"}
String	string_haspplate01_sensor_espversion			"HASP Plate 01 Sensor - ESP Version [%s]"				<mobile>			{channel="mqtt:topic:haspplate01:sensor_espVersion"}
String	string_haspplate01_sensor_espupdate				"HASP Plate 01 Sensor - ESP Update Available [%s]"		<mobile>			{channel="mqtt:topic:haspplate01:sensor_espUpdate"}
String	string_haspplate01_sensor_lcdversion			"HASP Plate 01 Sensor - LCD Version [%s]"				<mobile>			{channel="mqtt:topic:haspplate01:sensor_lcdVersion"}
String	string_haspplate01_sensor_lcdupdate				"HASP Plate 01 Sensor - LCD Update Available [%s]"		<mobile>			{channel="mqtt:topic:haspplate01:sensor_lcdUpdate"}
Number:Time	number_haspplate01_sensor_espuptime				"HASP Plate 01 Sensor - ESP Uptime [%d s]"			<mobile>			{channel="mqtt:topic:haspplate01:sensor_espUptime"}
Number:Power	number_haspplate01_sensor_signalstrength		"HASP Plate 01 Sensor - Signal Strength [%d dbm]"		<mobile>			{channel="mqtt:topic:haspplate01:sensor_signalstrength"}
String	string_haspplate01_sensor_ip					"HASP Plate 01 Sensor - HASP IP [%s]"					<mobile>			{channel="mqtt:topic:haspplate01:sensor_haspIP"}
Number:ElectricPotential	number_haspplate01_sensor_adc					"HASP Plate 01 Sensor - Voltage [%.2f V]"					<mobile>			{channel="mqtt:topic:haspplate01:sensor_haspadc"}
Number:Illuminance	number_haspplate01_sensor_light             	"HASP Plate 01 Sensor - Light [%.2f lux]"	                <mobile>	  {channel="mqtt:topic:haspplate01:sensor_hasplight"}
Switch	switch_haspplate01_refresh						"HASP Plate 01 Refresh"									<mobile>
Switch	switch_haspplate01_motion						"HASP Plate 01 Motion Status [%s]"						<mobile>	(group_timeline)		{channel="mqtt:topic:haspplate01:motion"}
String	string_haspplate01_command						"Hasp Plate 01 Command"									<mobile>			{channel="mqtt:topic:haspplate01:command"}
String	string_haspplate01_commandjson					"Hasp Plate 01 JSON Command"							<mobile>			{channel="mqtt:topic:haspplate01:JSONcommand"}
String	string_haspplate01_statejson					"HASP Plate 01 JSON State"								<mobile>			{channel="mqtt:topic:haspplate01:JSONstate"}
String	string_haspplate01_statejsonevent				"HASP Plate 01 JSON State Event"						<mobile>			{channel="mqtt:topic:haspplate01:JSONstate_event"}
String	string_haspplate01_statejsonvalue				"HASP Plate 01 JSON State Value"						<mobile>			{channel="mqtt:topic:haspplate01:JSONstate_value"}
Number:Dimensionless	number_haspplate01_sensor_humidity				"HASP Plate 01 Sensor - Humidity [%.2f %%]"				<mobile>		(group_house_humidity)	{channel="mqtt:topic:haspplate01:sensor_haspbme680_compensatedhumidity"}
Number:Temperature	number_haspplate01_sensor_temperature	"HASP Plate 01 Sensor - Temperature Celcius [%.2f °C]"		<mobile>    (group_house_temperature)			{channel="mqtt:topic:haspplate01:sensor_haspbme680_compensatedtemperature" [profile="offset", offset="0"] }
Number:Dimensionless	number_haspplate01_sensor_iaq				"HASP Plate 01 Sensor - IAQ [%.0f]"				<mobile>			{channel="mqtt:topic:haspplate01:sensor_haspbme680_iaq"}
Number:Dimensionless	number_haspplate01_sensor_co2	"HASP Plate 01 Sensor - CO2 [%.0f]"		<mobile>    			{channel="mqtt:topic:haspplate01:sensor_haspbme680_co2equivalent" [profile="offset", offset="0"] }
Number:Dimensionless	number_haspplate01_sensor_voc				"HASP Plate 01 Sensor - VoC [%.2f]"				<mobile>		{channel="mqtt:topic:haspplate01:sensor_haspbme680_breathvocequivalent"}
Number:Dimensionless	number_haspplate01_sensor_iaqaccuracy	"HASP Plate 01 Sensor - IAQ Accuracy [%.0f]"		<mobile>    	{channel="mqtt:topic:haspplate01:sensor_haspbme680_iaqaccuracy" [profile="offset", offset="0"] }
Number:ElectricResistance	number_haspplate01_sensor_gasresistor	"HASP Plate 01 Sensor - GAS Resistor [%.0f]"		<mobile>    	{channel="mqtt:topic:haspplate01:sensor_haspbme680_rawgasresistor" [profile="offset", offset="0"] }

but I don’t see any mesages in the log of openhab from my mqtt server were I see the messages…

I restarted my system several times and cleaned the cache sever times now everything is running…but the first execution of a script is delays by around 10s