[OH2] Can't set color on bulbs from certain manufacturers

I don’t believe I said that did I? (maybe I did - I don’t recall, but I doubt it).

My point is that if we simply reverse the check, as was proposed, then we potentially fix the problem for this device, and cause a problem with other devices. It is not adding more checks for compatibility - it just changes the order.

If you have suggestions to add more checks for compatibility, then I’m more than happy to add them. Currently the binding does quite a few checks to try and work out what is supported. In this event, the device says that it supports something, so the binding uses this function, and it doesn’t work.

How do you suggest to detect this? Maybe I can try and send commands to set the colour, then read the colour back and see if it was set - that might be possible, but it adds a lot of complexity.

Are you sure? From what I read above, that’s not correct -:

This seems to suggest that the Hue hub also doesn’t work with this particular bulb?

Maybe you did not mean it as I interpreted it. Either way I have just had this issue casually for a while (with a “LIDL” led strip and e14 color light) and not really had time to look into it unfortunately. I rarely use the color modes anyway.

It seems some other people including @Georg_Kunz have started looking into solutions (e.g [hue] [zigbee] openhab does not change color on a bulb or zone, if the bulb or zone is in white mode · Issue #10159 · openhab/openhab-addons · GitHub). I first discovered the issue was mentioned both on the community forums and on Github the other day. Until then I had just accepted the issue and that it might have been something specific to my setup.

About the Philips Hue app. I can fully control the light and switch between “Color Temperature mode” and “Color Mode” without issues. However, right after I have tried to fiddle with the light via OpenHAB the official Hue app will also not be able to change mode for some time. It seems trying to set the light via OpenHAB somehow confuses the Hue app/bridge. After a minute or two or possibly restarting the Hue app, the light modes are again fully working in the official Hue app. I.e, Hue app seems to work with my LIDL lights as long as I don’t touch the OpenHAB controls.

Unfortunately I have very little time to actually making commits and tests so I try to contribute by reporting my experience with a lot of bindings since I own devices from lots of manufacturers and for many bindings. Just to make it clear it’s not meant as me coming on and “complaining” things aren’t working.

So as I said, the binding is designed to detect the devices features, and act appropriately. It detects if it support X/Y or Hue, and then uses the appropriate commands. Of course if the device supports both, it needs to decide which to use - the suggestion is to swap around what the binding currently decides and my point is that this could then expose bugs in other devices. Swapping one devices bugs for another is not an appropriate way to operate.

This doesn’t seem to be a Zigbee binding issue - it looks to be a hue issue… Again this seems to disagree with your point above It’s apparent that others such as the official Philips Hue app already have such extras in place. It seems that Hue has exactly the same problem.

Ok, but I’m also quite short of time right now. We could add functionality to work around these sort of bugs - we could have a database of bugs like the ZWave binding uses. This takes a lot of time to maintain and that’s why I tried to design the binding to detect what a device does automatically. If others want to contribute, then that’s great, but right now I’ve limited time to look at this myself as I’ve just moved from the UK the New Zealand and am trying to find somewhere to live - sorry.

Understood :+1:

Hi all,
yes, I have been trying to fix this behavior for my hue-hub/binding-based setup. I currently cannot test / contribute anything to the Zigbee binding issue.

I’d like to mention two things:
i) the hue app works fine with those bulbs. And every time I check the color mode of the bulb via the hue-hub-REST-API, the bulb is in XY mode (or CT) but never in HS mode. Moreover, according to the hue API documentation, XY seems to be preferred over HS (i.e., when sending both to a device, the hub selects XY over HS). Based on this, I am wondering, but cannot answer the question, if preferring XY over HS is a reasonable approach.

ii) I have created a PR for the hue binding. However, as I do not dare changing the default for everybody and everything, my code basically just adds an overwrite for the problematic bulbs. It is less clean and additional work to maintain, but as @Masssssy said, OpenHab should ideally should work for users.

Cheers
Georg

Hi all,

maybe we can also try to implement the following feature:
Passing the colormode in the items.xml eg.:

For XY:

Color   eg_wz_ambient_color             "Wohnzimmer Ambient"    <light>         (EG_Wohnzimmer, gLicht, gLichtWohnzimmer, gFarbeWohnzimmer) [ "Switchable" ] {channel="zigbee:device:0984a93797:842e14fffe05d30c:842E14FFFE05D30C_1_color_xy"}

For HUE:

Color   eg_wz_ambient_color             "Wohnzimmer Ambient"    <light>         (EG_Wohnzimmer, gLicht, gLichtWohnzimmer, gFarbeWohnzimmer) [ "Switchable" ] {channel="zigbee:device:0984a93797:842e14fffe05d30c:842E14FFFE05D30C_1_color_hue"}

Default:

Color   eg_wz_ambient_color             "Wohnzimmer Ambient"    <light>         (EG_Wohnzimmer, gLicht, gLichtWohnzimmer, gFarbeWohnzimmer) [ "Switchable" ] {channel="zigbee:device:0984a93797:842e14fffe05d30c:842E14FFFE05D30C_1_color"}

The default mode uses the current implementation. Passing the mode will override the default.
The advantage is that the current implementation continues to work. Anyone can override colormode if they want.
Is this an acceptable approach?

1 Like

I’m struggling with a TS0505A here …

Does this hack still work with the latest version of the ZigBee binding? Unfortunately, I cannot reproduce your result. I was able to build a new snapshot of the latest ZigBee binding and my snapshot said ‘Device supports XY color set of commands’, but the colour channel doesn’t work.

@chris
I’m sorry for hacking your source code :wink: . I do understand that the device isn’t telling us the truth. Would it be possible to implement a kind of a filter mechanism (e.g., 842E14FFFE2C2E14_quirks.xml) that enables the (gifted) end user to override what ZigBee devices are telling us?

Please can you open an issue on Github and I’ll have a think about this. I can probably (reasonably easily) add this as a channel configuration.

I’ve created a PR for this, but it’s not tested -:

If possible, can you please test this @anon71759204 . In theory you should be able to click on the link to the CI and download the KAR file which contains everything to run the binding - or just grab on the main JAR file if you prefer.

This hopefully adds an option in the color control channel to allow you to set the control mode from AUTO, HUE, or XY. If set to AUTO, it will do the same as it does now and auto select, but otherwise it should avoid the autoselect code.

@chris

3.2.0-SNAPSHOT - Build #2589

openhab> bundle:list | grep Zig
329 x Active x  80 x 3.2.0.202111190338    x openHAB Add-ons :: Bundles :: ZigBee Binding
330 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee CC2531 Bridge
331 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Console
332 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee Console Ember
333 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee Console Telegesis
334 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Ember Bridge
335 x Active x  80 x 3.2.0.202111190338    x openHAB Add-ons :: Bundles :: ZigBee Serial Driver
336 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Telegesis Bridge
337 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee XBee Bridge

openhab> bundle:update 329 https://ci.openhab.org/job/openHAB-Zigbee/lastSuccessfulBuild/artifact/org.openhab.binding.zigbee/target/org.openhab.binding.zigbee-3.2.0-SNAPSHOT.jar

openhab> bundle:list | grep Zig

329 x Active  x  80 x 3.2.0.202111230337    x openHAB Add-ons :: Bundles :: ZigBee Binding
330 x Waiting x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee CC2531 Bridge
331 x Active  x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Console
332 x Active  x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee Console Ember
333 x Active  x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee Console Telegesis
334 x Waiting x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Ember Bridge
335 x Active  x  80 x 3.2.0.202111190338    x openHAB Add-ons :: Bundles :: ZigBee Serial Driver
336 x Waiting x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Telegesis Bridge
337 x Waiting x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee XBee Bridge

openhabian@openhabian:/usr/share/openhab/addons $ sudo /bin/systemctl stop openhab.service
openhabian@openhabian:/usr/share/openhab/addons $ sudo /bin/systemctl start openhab.service

openhab> bundle:list | grep Zig
329 x Active x  80 x 3.2.0.202111230337    x openHAB Add-ons :: Bundles :: Zig
330 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: Zig
331 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: Zig
332 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: Zig
333 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: Zig
334 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: Zig
335 x Active x  80 x 3.2.0.202111190338    x openHAB Add-ons :: Bundles :: Zig
336 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: Zig
337 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: Zig

OK, update successful.

No ‘control mode’ option, but some kind of progress nevertheless:

grafik

Toggle button works (light bulb on/off), colour picker gets displayed (both UI elements didn’t work before), BUT: device seems to be stuck in colour temperature mode even if Col. picker toggle switch is on: picking a ‘colour’ changes the colour temperature (no colour at all) …

I’ll have a look at why this config isn’t showing.

I don’t think there should have been any other changes though - all I’ve done is to change the configuration. It should add the OnOff config (which I also don’t see in your image), and also the new color config.

My guess at the moment is you aren’t running the right binding. I think you’ve grabbed the overnight build based on the time and not the build associated with this PR, so you’re likely not seeing any of the changes due to this. I just closed and reopened the PR to get it to rebuild and it failed so I think you’re definitely on the main branch.

I need to work out why it fails on CI but builds ok here before we can take it forward.

@anon71759204 this is now building - here’s the JAR for testing -:

org.openhab.binding.zigbee-3.2.0-SNAPSHOT.pdf (300.3 KB)

(rename the PDF to JAR).

@chris

298 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee
299 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee.console
300 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee.console.ember
301 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee.console.telegesis
302 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee.dongle.cc2531
303 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee.dongle.ember
304 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee.dongle.telegesis
305 x Active x  80 x 1.4.2                 x com.zsmartsystems.zigbee.dongle.xbee
330 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee CC2531 Bridge
331 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Console
332 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee Console Ember
333 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee Console Telegesis
334 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Ember Bridge
335 x Active x  80 x 3.2.0.202111190338    x openHAB Add-ons :: Bundles :: ZigBee Serial Driver
336 x Active x  80 x 3.2.0.202111190340    x openHAB Add-ons :: Bundles :: ZigBee Telegesis Bridge
337 x Active x  80 x 3.2.0.202111190341    x openHAB Add-ons :: Bundles :: ZigBee XBee Bridge
352 x Active x  80 x 3.2.0.202111240424    x openHAB Add-ons :: Bundles :: ZigBee Binding

New item: Power on state OFF/ON - but no AUTO/HUE/XY selection

As before: unable to switch the light bulb to colour mode

Let’s re-check the channel settings:

All settings are gone …

Third time lucky (hopefully :slight_smile: ).

org.openhab.binding.zigbee-3.2.0-SNAPSHOT.pdf (300.3 KB)

No luck … no channel options, Delete Thing, Things +, ZigBee Binding, Scan, it doesn’t recognize the bulb anymore (tried several times):

After adding it as Thing from the Inbox:



Total known nodes in network: 6
Network  Addr  IEEE Address      Logical Type  State      EP   Profile                    Device Type                Manufacturer     Model
      0  0000  5C0272FFFE4BC7B4  COORDINATOR   ONLINE
  14589  38FD  60A423FFFE139306  ROUTER        UNKNOWN    11  ZIGBEE_HOME_AUTOMATION     ON_OFF_PLUG_IN_UNIT        _TZ3000_kdi2o9m6  TS011F
                                                         242  ZIGBEE_GREEN_POWER         0061
  17296  4390  00158D00012E5426  ROUTER        UNKNOWN     1  ZIGBEE_HOME_AUTOMATION     EXTENDED_COLOR_LIGHT       MLI              tint-ExtendedColor
                                                         242  ZIGBEE_GREEN_POWER         0061
  49993  C349  804B50FFFEE11DD7  ROUTER        ONLINE      1  ZIGBEE_HOME_AUTOMATION     ON_OFF_PLUG_IN_UNIT        _TZ3000_1obwwnmq  TS011F
                                                           2  ZIGBEE_HOME_AUTOMATION     ON_OFF_PLUG_IN_UNIT
                                                           3  ZIGBEE_HOME_AUTOMATION     ON_OFF_PLUG_IN_UNIT
                                                         242  ZIGBEE_GREEN_POWER         0061
  60641  ECE1  842E14FFFE2C2E14  ROUTER        ONLINE      1  ZIGBEE_HOME_AUTOMATION     EXTENDED_COLOR_LIGHT       _TZ3000_dbou1ap4  TS0505A
                                                         242  ZIGBEE_GREEN_POWER         0061
  63671  F8B7  00178801094009C0  ROUTER        UNKNOWN    11  ZIGBEE_HOME_AUTOMATION     DIMMABLE_LIGHT             Philips          LWA009
                                                         242  ZIGBEE_GREEN_POWER         0061

openhab> zigbee fingerprint 842E14FFFE2C2E14
|>| Node Descriptor
| |> Logical Type               ROUTER
| |> MAC Capabilities           [FULL_FUNCTION_DEVICE, MAINS_POWER, RECEIVER_ON_WHEN_IDLE]
| |> Stack Compliance           22
| |> Server Capabilities        []
| |> Buffer Size                82
| |> Incoming Transfer Size     82
| |> Outgoing Transfer Size     82
|
|>| Power Descriptor
| |> Available Power Sources    [MAINS]
| |> Current Power Source       MAINS
| |> Current Power Mode         RECEIVER_ON_IDLE
| |> Power Level                FULL
|
|>| ZDO
| |> ManagementBindRequest      SUCCESS
| |> IeeeAddressRequest         SUCCESS
| |> ManagementLqiRequest       SUCCESS
| |> ManagementRoutingRequest   SUCCESS
|
|>| Basic Information
| |> Generic Device Class
| |> Generic Device Type
| |> Manufacturer Name          _TZ3000_dbou1ap4
| |> Model Indentifier          TS0505A
| |> Product Code
| |> Product URL
| |> Date Code
| |> Application Version        80
| |> Software Build ID
| |> Hardware Version           1
| |> Zcl Version                3
| |> Stack Version              0
| |
| |>| Endpoint 1
| | |> Profile                  0104  ZIGBEE_HOME_AUTOMATION
| | |> Device Type              010D  EXTENDED_COLOR_LIGHT
| | |> Device Version           1
| | |
| | |>| Input Clusters
| | | |
| | | |>| Cluster 0000 Basic
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> 0000 ZCL Version
| | | | | |> 0001 Application Version
| | | | | |> 0002 Stack Version
| | | | | |> 0003 HW Version
| | | | | |> 0004 Manufacturer Name
| | | | | |> 0005 Model Identifier
| | | | | |> 0006 Date Code
| | | | | |> 0007 Power Source
| | | | | |> FFDE Unknown
| | | | | |> FFFD Unknown
| | | | | |> FFFE Unknown
| | | |
| | | |>| Cluster 0003 Identify
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0004 Groups
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0005 Scenes
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> 0000 Scene Count
| | | | | |> 0001 Current Scene
| | | | | |> 0002 Current Group
| | | | | |> 0003 Scene Valid
| | | | | |> 0004 Name Support
| | | | | |> FFFD Unknown
| | | |
| | | |>| Cluster 0006 On/Off
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> 0000 On Off
| | | | | |> FFFD Unknown
| | | |
| | | |>| Cluster 0008 Level Control
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> 0000 Current Level
| | | | | |> 000F Options
| | | | | |> FFFD Unknown
| | | |
| | | |>| Cluster 0300 Color Control
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 1000
| | | | |> Type                 Server [Input]
| | | | |> Manufacturer Spec.   No
| | | | |> Unsupported locally
| | |
| | |>| Output Clusters
| | | |
| | | |>| Cluster 000A Time
| | | | |> Type                 Client [Output]
| | | | |> Manufacturer Spec.   No
| | | | |> Unsupported locally
| | | |
| | | |>| Cluster 0019 Ota Upgrade
| | | | |> Type                 Client [Output]
| | | | |> Manufacturer Spec.   No
| | | | |
| | | | |>| Commands Generated
| | | | | |> FAILURE
| | | | |
| | | | |>| Commands Received
| | | | |> FAILURE
| | | | |
| | | | |>| Attributes Supported
| | | | | |> 0000 Upgrade Server ID
| | | | | |> 0001 File Offset
| | | | | |> 0006 Image Upgrade Status
| | | | | |> FFFD Unknown
| |
| |>| Endpoint 242
| | |> Profile                  A1E0  ZIGBEE_GREEN_POWER
| | |> Device Type              0061
| | |> Device Version           0

I would say: FUBAR … please note the the three Init. dev. toggle items …

Time for a complete deinstallation of the ZigBee binding and a clean re-install. Please advise how to proceed (bundle:uninstall all ZigBee bundles or remove ZigBee Bundle via UI or …).

Re-Install:
Upgrade openhabian to latest snapshot, install ZigBee Binding via UI, install ‘pdf’ snapshot via karaf?

Please can you provide a debug log so I can see what is going on. I’ve not currently got any color bulbs hooked up so maybe I need to do this, but I’ll need to find some time. Currently I’m just testing this using test cases in the compiler, which show that the options should show up, but I suspect something else is throwing an exception somewhere.

If you have a log then I can hopefully work out what…

  1. Remove bulb
  2. Things, +, ZigBee Binding, Scan

openhab.log.zip.txt (17.3 KB)

Thanks. Sorry, I forgot to post an update last night. Attached is an updated JAR with protection for this NPE.

org.openhab.binding.zigbee-3.2.0-SNAPSHOT.pdf (300.3 KB)

Thanks for your daily update. :slight_smile:

330 x Active x  80 x 3.2.0.202111260610    x openHAB Add-ons :: Bundles :: ZigBee Binding
331 x Active x  80 x 3.2.0.202111230338    x openHAB Add-ons :: Bundles :: ZigBee CC2531 Bridge
332 x Active x  80 x 3.2.0.202111230338    x openHAB Add-ons :: Bundles :: ZigBee Console
333 x Active x  80 x 3.2.0.202111230339    x openHAB Add-ons :: Bundles :: ZigBee Console Ember
334 x Active x  80 x 3.2.0.202111230339    x openHAB Add-ons :: Bundles :: ZigBee Console Telegesis
335 x Active x  80 x 3.2.0.202111230338    x openHAB Add-ons :: Bundles :: ZigBee Ember Bridge
336 x Active x  80 x 3.2.0.202111230337    x openHAB Add-ons :: Bundles :: ZigBee Serial Driver
337 x Active x  80 x 3.2.0.202111230338    x openHAB Add-ons :: Bundles :: ZigBee Telegesis Bridge
338 x Active x  80 x 3.2.0.202111230339    x openHAB Add-ons :: Bundles :: ZigBee XBee Bridge

No progress:
log_v260610.zip.txt (10.5 KB)