Hue Bindung: identical Bulbs with different results / maybe binding to bridge communication issue

UPDATE - see last post / 2018-11-10: manually created items aren’t linked with the thing-channel using config-files - not a problem of the hue binding as fa as I can see.

Hello all,
I run openhabian with openhab 2.4.0-Snapshot Build 1369, hue-binding 0.10.0.201809111909 (bundle:list) with hue, zwave, homematic and so on - no problem so far.
Since months I use an philips hue iris and an ikea tradfri - also: no problem so far.
A few days ago I connected in step 1 another three hue bulbs (hue ambiance). The bulbs updated their software and after that I added them to openhab.

I got the bridge id’s (hue-api) and configured the bulbs in things/hue.things:

Bridge hue:bridge:1 [ ipAddress="192.168.99.34", userName="<username-hidden-for-post>" ] {
        0200 Hue-Iris-1  [ lightId="2" ]
        0220 Hue-Tradfri-1 [ lightId="3" ]
        0220 Hue-Ambiance-25cm-1  [ lightId="4" ]
        0220 Hue-Ambiance-20cm-1  [ lightId="9" ]
        0220 Hue-Ambiance-15cm-1  [ lightId="8" ]
}

I organized the id’s 4,8,9 at hue-bridge-side as a group (“Terasse”) and do this also at openhab-item-side:

Group:Switch:OR(ON,OFF) gTerasse "Terassenlicht" <light>
Switch  Light4_Toggle "Terasse 25cm Kugel [MAP(switch.map):%s]" <light> (gTerasse)      { channel="hue:0220:1:Hue-Ambiance-25cm-1:brightness" }
Switch  Light9_Toggle "Terasse 20cm Kugel [MAP(switch.map):%s]" <light> (gTerasse)      { channel="hue:0220:1:Hue-Ambiance-20cm-1:brightness" }
Switch  Light8_Toggle "Terasse 15cm Kugel [MAP(switch.map):%s]" <light> (gTerasse)      { channel="hue:0220:1:Hue-Ambiance-15cm-1:brightness" }

Group:Dimmer gTerasse_Dimmer "Terasse hell/dunkel" <light>
Dimmer  Light4_Dimmer "Terasse 25cm Kugel Hell/Dunkel" <light> (gTerasse_Dimmer)        { channel="hue:0220:1:Hue-Ambiance-25cm-1:brightness" }
Dimmer  Light8_Dimmer "Terasse 20cm Kugel Hell/Dunkel" <light> (gTerasse_Dimmer)        { channel="hue:0220:1:Hue-Ambiance-20cm-1:brigthness" }
Dimmer  Light9_Dimmer "Terasse 15cm Kugel Hell/Dunkel" <light> (gTerasse_Dimmer)        { channel="hue:0220:1:Hue-Ambiance-15cm-1:brigthness" }

Group:Dimmer gTerasse_Color_Temp "Terasse Temperatur" <light>
Dimmer  Light4_Color "Terasse 25cm Kugel - Temperatur" <light> (gTerasse_Color_Temp)    { channel="hue:0220:1:Hue-Ambiance-25cm-1:color_temperature" }
Dimmer  Light8_Color "Terasse 20cm Kugel - Temperatur" <light> (gTerasse_Color_Temp)    { channel="hue:0220:1:Hue-Ambiance-20cm-1:color_temperature" }
Dimmer  Light9_Color "Terasse 15cm Kugel - Temperatur" <light> (gTerasse_Color_Temp)    { channel="hue:0220:1:Hue-Ambiance-15cm-1:color_temperature" }

With the group I add this to the sitemap:

 Switch item=gTerasse mappings=[OFF="Aus", ON="Ein"]
 Selection item=gTerasse_Dimmer label="Terasse Helligkeit" mappings=[0="Aus", 3="3%", 33="33%", 66="66%", 100="100%"] icon="light" visibility=[gTerasse == ON]
 Selection item=gTerasse_Color_Temp label="Terasse Lichtfarbe" mappings=[85="Entspannen", 56="Hell", 28="Tageslicht"] icon="light" visibility=[gTerasse == ON]

What worked using the sitemap as shown:

  • I can swith the group on and off and all three bulbs got switched
  • I also can change the color (85, 28, 56) for all three bulbs

What not will work is the dimmer: only Light4 (ID 4) reacts to the command.

So I deleted the other two ambiance bulbs (the first try was with ID 5 and 6, after deleting in openhab and the hue bridge and re-adding them the id’s changed to 8 and 9) and re-added them - no change (except the IDs)
I configured the Light8* and Light9* inside the sitemap and removed them from the group - no change.
I checked the event.log:

018-11-09 15:48:05.259 [ome.event.ItemCommandEvent] - Item 'Light4_Toggle' received command ON
2018-11-09 15:48:05.262 [ome.event.ItemCommandEvent] - Item 'Light9_Toggle' received command ON
2018-11-09 15:48:05.265 [ome.event.ItemCommandEvent] - Item 'Light8_Toggle' received command ON
2018-11-09 15:48:05.268 [nt.ItemStatePredictedEvent] - Light4_Toggle predicted to become ON
2018-11-09 15:48:05.275 [vent.ItemStateChangedEvent] - Light4_Toggle changed from OFF to ON
2018-11-09 15:48:05.283 [nt.ItemStatePredictedEvent] - Light9_Toggle predicted to become ON
2018-11-09 15:48:05.313 [nt.ItemStatePredictedEvent] - Light8_Toggle predicted to become ON
2018-11-09 15:48:05.350 [vent.ItemStateChangedEvent] - Light9_Toggle changed from OFF to ON
2018-11-09 15:48:05.356 [vent.ItemStateChangedEvent] - Light8_Toggle changed from OFF to ON
2018-11-09 15:48:09.380 [ome.event.ItemCommandEvent] - Item 'Light4_Dimmer' received command 33
2018-11-09 15:48:09.407 [ome.event.ItemCommandEvent] - Item 'Light8_Dimmer' received command 33
2018-11-09 15:48:09.413 [ome.event.ItemCommandEvent] - Item 'Light9_Dimmer' received command 33
2018-11-09 15:48:09.423 [nt.ItemStatePredictedEvent] - Light4_Dimmer predicted to become 33
2018-11-09 15:48:09.435 [vent.ItemStateChangedEvent] - Light4_Dimmer changed from 0 to 33
2018-11-09 15:48:09.439 [nt.ItemStatePredictedEvent] - Light8_Dimmer predicted to become NULL
2018-11-09 15:48:09.444 [GroupItemStateChangedEvent] - gTerasse_Dimmer changed from 33 to UNDEF through Light4_Dimmer
2018-11-09 15:48:09.447 [nt.ItemStatePredictedEvent] - Light9_Dimmer predicted to become NULL

Always “predicted to become NULL” for Light8 and Light9 (and Light5 and Light6 before I deleted and re-added them). There are no other errors (not in event.log and not in openhab.log)

I switched the logging to DEBUG for the hue-binding and there I can see that in all working cases the ip of the hue-bridge got three commands with the IDs of the three bulbs (4,8,9) - when I try to let the dimmer reduce the light there’s only ONE command to the hue bridge that speeks to the id 4.

Any suggestions are welcome.

(What did I forgot to tell you?)

Greetings.

Please use the code fences

Sorry… corrected.

Here some logging-output with level DEBUG:

grep for “Light” in openhab.log

2018-11-10 11:49:32.495 [DEBUG] [o.client.mqttv3.internal.ClientState] - OpenHAB2: pending publish key=241 qos=0 message=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light4_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.505 [DEBUG] [ient.mqttv3.internal.CommsTokenStore] - OpenHAB2: key=241 message=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light4_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.530 [DEBUG] [o.client.mqttv3.internal.ClientState] - OpenHAB2: pending publish key=242 qos=0 message=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light9_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.531 [DEBUG] [ient.mqttv3.internal.CommsTokenStore] - OpenHAB2: key=242 message=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light9_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.557 [DEBUG] [o.client.mqttv3.internal.CommsSender] - OpenHAB2: network send key=241 msg=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light4_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.563 [DEBUG] [qttv3.internal.wire.MqttOutputStream] - null: Attempting to reconnect client: PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light4_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.572 [DEBUG] [o.client.mqttv3.internal.ClientState] - OpenHAB2: pending publish key=243 qos=0 message=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light8_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.575 [DEBUG] [ient.mqttv3.internal.CommsTokenStore] - OpenHAB2: key=243 message=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light8_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.587 [DEBUG] [o.client.mqttv3.internal.CommsSender] - OpenHAB2: network send key=242 msg=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light9_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.603 [DEBUG] [qttv3.internal.wire.MqttOutputStream] - null: Attempting to reconnect client: PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light9_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.617 [DEBUG] [o.client.mqttv3.internal.CommsSender] - OpenHAB2: network send key=243 msg=PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light8_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]
2018-11-10 11:49:32.622 [DEBUG] [qttv3.internal.wire.MqttOutputStream] - null: Attempting to reconnect client: PUBLISH qos:0 retained:false dup:false topic:"/openHAB/out/Light8_Dimmer/command" payload:[hex:3636 utf8:"66" length:2]

grep for hue ip in openhab.log
(only one PUT with the ID of that bulb that can be controlled with a dimmer-item):

2018-11-10 11:49:55.966 [DEBUG] [.www.protocol.http.HttpURLConnection] - sun.net.www.MessageHeader@c1790a6 pairs: {GET /api/"api-key" HTTP/1.1: null}{Content-Type: application/json}{User-Agent: Java/1.8.0_152}{Host: 192.168.99.34}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
2018-11-10 11:50:05.147 [DEBUG] [.www.protocol.http.HttpURLConnection] - sun.net.www.MessageHeader@10a2da7 pairs: {PUT /api/"api-key"/lights/4/state HTTP/1.1: null}{Content-Type: application/json}{User-Agent: Java/1.8.0_152}{Host: 192.168.99.34}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}{Content-Length: 21}
2018-11-10 11:50:06.032 [DEBUG] [.www.protocol.http.HttpURLConnection] - sun.net.www.MessageHeader@1bc04966 pairs: {GET /api/"api-key" HTTP/1.1: null}{Content-Type: application/json}{User-Agent: Java/1.8.0_152}{Host: 192.168.99.34}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}

Maybe there’s more - but in that case I need some hints for what to look for (especially how to identify the correct hue-parameter-name for setting DEBUG only for that binding)

Thanks again.

Klaus

It’s me again…
Problem detected - but not solved as expected:
I took a look inside the thing-config for the working Light4 at Paper UI for Light4 and there I detected two linked items for the Channel “Helligkeit”: the Light4_Toggle-Item and the Light4_Dimmer-Item.
I compared that with the Ligh8-Thing, Channel “Helligkeit” and the Light8_Dimmer-Item was not linked.
So I linked that Item using the Paper UI (that’s not what I wanted because the whole OH-Config is based on config-files linke .thing, .items and so on) - but it works.

I try to find out WHY the manually configured items didn’t got linked.

Klaus