Variable Reports null in Some Cases - Need Help Diagnosing Issue

Hi everyone,

I'm encountering an issue where the variable PT_RETE sometimes shows a null value, while at other times it is correctly updated with numeric values. I've attached some screenshots of my setup, including:

  1. The trigger events and conditional actions in Rule Machine.
  2. The logs showing the variable updates (both null and numeric values).
  3. The list of variables configured in my system.

Here’s a summary of the situation:

  • The rule is triggered when the variable PT_RETE changes.
  • Conditional actions are set to turn on/off a device based on specific thresholds for PT_RETE.
  • In the logs, I see updates where PT_RETE is correctly assigned numeric values (e.g., -1310.0), but there are also instances where it shows null.
  • The variable is set up as a global variable.

I’m not sure what could be causing this behavior. Could it be related to the initialization of the variable, an issue with my rule configuration, or something else?

Any advice or insights into why this might be happening would be greatly appreciated! Let me know if additional details are needed.

Thank you in advance!

image
image
image

What is dev:116?

Specifically, what is assigning the value to the PT_RETE hub variable? - I'm assuming that's some device? - What is the driver? - And can you turn on debug logging for that device, so you can see a bit more detail on what the device is doing when this value is assigned...

1 Like

Hi thanks for the answer
dev:116 is the connector variable himself


is written by a MAKER API

[
{
"name": "PT_RETE",
"label": "PT_RETE",
"type": "Connector Variable",
"id": "116",
"date": "2024-11-27T16:57:47+0000",
"model": null,
"manufacturer": null,
"room": null,
"capabilities": [
"Actuator",
"Variable",
"Sensor"
],
"attributes": {
"variable": "320.0",
"dataType": "STRING",
"values": null
},
"commands": [
{
"command": "parse"
},
{
"command": "setVariable"
}
]
},
{
"name": "H_CASA",
"label": "H_CASA",
"type": "Connector Humidity Sensor",
"id": "124",
"date": "2024-11-27T16:57:47+0000",
"model": null,
"manufacturer": null,
"room": null,
"capabilities": [
"RelativeHumidityMeasurement",
"Sensor"
],
"attributes": {
"humidity": "45.0",
"dataType": "NUMBER",
"values": null
},
"commands": [
{
"command": "parse"
},
{
"command": "setHumidity"
}
]
},
{
"name": "PT_SOLE",
"label": "PT_SOLE",
"type": "Connector Variable",
"id": "117",
"date": "2024-11-27T16:57:47+0000",
"model": null,
"manufacturer": null,
"room": null,
"capabilities": [
"Actuator",
"Variable",
"Sensor"
],
"attributes": {
"variable": "0.0",
"dataType": "STRING",
"values": null
},
"commands": [
{
"command": "parse"
},
{
"command": "setVariable"
}
]
},
{
"name": "T_CASA",
"label": "T_CASA",
"type": "Connector Temperature Sensor",
"id": "125",
"date": "2024-11-27T16:57:47+0000",
"model": null,
"manufacturer": null,
"room": null,
"capabilities": [
"TemperatureMeasurement",
"Sensor"
],
"attributes": {
"temperature": "19.2",
"dataType": "NUMBER",
"values": null
},
"commands": [
{
"command": "parse"
},
{
"command": "setTemperature"
}
]
}
]