Lastupdated =NULL and colortemperature=NULL

openhab 2.5.6-2 on raspberry pi 4
strange but probably “normal” behaviour: I have several aqara sensors (binding deconz) and a hue sensor and button (hue binding). I just wrote a script to check the lastupdated values. Suddenly my script failed, and the reason was that the value of lastupdated was NULL.
I guess the reason is that those sensors (and the button) use a battery, and only connect from time to time. And, if openhab checks, while not connected, the value changes to NULL ?
What is more strange is that I have lightbulbs who gave this in the logging:
“GV_Woonkamer_Ceiling_Spot_1_ColorTemperature changed from 1 to NULL” while they are ON. And I see they are on. Since they are of course don’t use batteries, I don’t know what is the reason of this.
Someone any idea?

It should not, no. Bindings do have the option of updating linked Items to UNDEF state, meaning “no idea”, in case of problems. I wouldn’t expect the binding to do that for battery devices that normally sleep anyway.

This is strange, yes. Items get set to NULL at system boot time, or when reinitialized like editing.
Rules can update to NULL, but hardly anyone does that.

I’d have a close look in the logs for other indications of stuff reinitializing at this time - Things in events.log, binding messages in openhab.log

What is your script written in?

I had trouble in the past using dsl rules and checking online status of my zigbee devices. At the time I was using hue and tradfri binding. I was routinely getting reports of offline(seem to remember nulls also) when they were not. I turned that code off and have not tried it since I moved everything to deconz conbee setup.

ok, (I use JYTHON)
the “lastupdated” that became NULL, I guess it was because I added the Item to a groupitem. (so, actually edited it). I hope this is the reason.
about the colortemperature… no idea… This item is only used in a sitemap, not in any rule…
The color item of that same thing is keeping it’s value… so… I’ll have to keep an eye on it …

1 Like

If you are using .items files, all the Items in any file that you edit will become reinitialized to NULL. Are these two in the same file?

I use paperui.
In hue app, you can create rooms and zones.
This morning I saw the that the colortemperature for a zone came from NULL to 1. It seems always to be the colortemperature…
About lastupdated: for the sensors (aqara): the lastupdated values is refreshed within the hour.
but, the Hue button seems only to update the lastupdated value, when the button is used. (maybe useful info for other users)

That is ordinary enough. But I suppose the problem is that it mysteriously changed from a valid state to NULL in the night?

When an Item does get reinitialized, the change to NULL is not normally logged. Which is why I was surprised by the report in your first post.
if you are not actually seeing
changed from xxx to NULL
messages, it’s a good clue that we are looking for an unexpected reinitializing problem.

So, with no Item level logging, we’ll have to look for other clues about what happened when.
Find out the time of last “good” update and “changed from NULL”, so that you have a time window.
I would examine your openhab.log for evidence of a binding reconnecting or similar, and your events.log looking particularly for Thing events.