What is ItemStatePredictedEvent?

Hmm, looks like this clever autoUpdate feature outsmarts me. :grin:

I have a lot of Hue lights but somehow one of them is always reported as ON in OH. I can visually and in the official Hue App confirm that the light as actually off, so basically it works just fine outside OH (e.g. triggering it via the Hue built-in sunset/sunrise sensor state).
When trying to turn of in OH, the following two messages are logged in events.log:

[ome.event.ItemCommandEvent] - Item ‘SW_ChairLight’ received command OFF
[nt.ItemStatePredictedEvent] - SW_ChairLight predicted to become ON

And the status in OH and on the sitemap returns back to ON (nothing happens to the physical light).

The Thing definition:

Bridge hue:bridge:1 [ipAddress="...", userName="..."]
{
    // Livingroom chair standing light
    0220 bulb_chair [lightId="1"]
    ...

The Item involved:

// Livingroom chair light
Switch SW_ChairLight "Staandelamp stoel" (gLivingroom) {channel="hue:0220:1:1:brightness"}
Dimmer DM_ChairLight "Staandelamp stoel dimmer" (gLivingroom) {channel="hue:0220:1:1:brightness"}
Dimmer CT_ChairLight "Staandelamp stoel kleurtint" (gLivingroom) {channel="hue:0220:1:1:color_temperature"}

On startup of OH, the following is logged:

[.ItemChannelLinkAddedEvent] - Link 'DM_ChairLight-hue:0220:1:1:brightness' has been added.[.ItemChannelLinkAddedEvent] - Link 'SW_ChairLight-hue:0220:1:1:brightness' has been added.
[.ItemChannelLinkAddedEvent] - Link 'CT_ChairLight-hue:0220:1:1:color_temperature' has been added.
[hingStatusInfoChangedEvent] - 'hue:bridge:1' changed from UNINITIALIZED to INITIALIZING
[hingStatusInfoChangedEvent] - 'hue:0220:1:bulb_chair' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
[vent.ItemStateChangedEvent] - SW_ChairLight changed from NULL to ON
[vent.ItemStateChangedEvent] - DM_ChairLight changed from NULL to 24
[vent.ItemStateChangedEvent] - CT_ChairLight changed from NULL to 82
[hingStatusInfoChangedEvent] - 'hue:bridge:1' changed from INITIALIZING to ONLINE
[hingStatusInfoChangedEvent] - 'hue:0220:1:bulb_chair' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
[me.event.ThingUpdatedEvent] - Thing 'hue:0220:1:bulb_chair' has been updated.
[me.event.ThingUpdatedEvent] - Thing 'hue:0220:1:bulb_chair' has been updated.
[me.event.ThingUpdatedEvent] - Thing 'hue:0220:1:bulb_chair' has been updated.
[hingStatusInfoChangedEvent] - 'hue:0220:1:bulb_chair' changed from INITIALIZING to ONLINE

Doing a GET on the Hue API with:

/api/<whitelisted_user>/lights/1

shows that the light is actually OFF according to the Hue bridge:

{
	"state": {
		"on": false,
		"bri": 48,
		"ct": 451,
		"alert": "none",
		"colormode": "ct",
		"mode": "homeautomation",
		"reachable": true
	},
    ...

Neither restart of Hue Bridge device, restart of OH or clear OH cache and tmp fixed it. Currently running OH 2.4.0-SNAPSHOT Build #1389, btw.

1 Like