zigbee2mqtt & zigbee USB for Hue bulbs

Posted on
Sun Jun 14, 2020 10:36 am
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

I also need to add a method for scaling the brightness level.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2020 5:58 am
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Morning.
good news in that its controlling it. On / Off and brightness work, albeit only up to 100 out of 255, as you expect.

The status reporting doesnt work though.

If I publish an empty payload to zigbee2mqtt/1965234729. and then use the Send Status Request button to exectute zigbee2mqtt/{{uniqueID}}/get. I do then see zigbee2mqtt/1965234729 imediately report its state back, but it doesnt get into the indigo device state, which defaults to off and dimmer 0 regardless of last input.

The full JSON back from the hue bulb is

Code: Select all
{
"state":"ON",
"brightness":84,
"color":
    {"x":0.520197971485871,
    "y":0.414169012151805},
"color_temp":484.027105517909,
"linkquality":42,"elapsed":100116,
"last_seen":"2020-06-15T08:51:20.975Z"
}


Do we need a different status request payload template? I played around with a few options but no luck.

Posted on
Mon Jun 15, 2020 6:15 am
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

and the white colour temp only bulbs report this back as status.

Code: Select all
{
"state":"OFF",
"brightness":254,
"color_temp":312.5,
"update_available":false,
"last_seen":"2020-06-15T12:13:23.160Z"
}

Posted on
Mon Jun 15, 2020 6:19 am
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Great, that helps. I've built a node-red flow that acts like a bulb simulator, so I can use those payloads to test the plugin and device configuration.

The configuration dialog for the devices has gotten so large that I'm trying to redesign it to group related items.

So far, the payload you gave me is working for state and brightness updates properly. I haven't hooked up the RGB or color temp states yet.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2020 6:21 am
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

FlyingDiver wrote:
Great, that helps. I've built a node-red flow that acts like a bulb simulator, so I can use those payloads to test the plugin and device configuration.

.


Haha. Clever. I dismissed node-red for years as too complicated and I couldn’t see the point but even with indigo it has its uses.

Posted on
Mon Jun 15, 2020 12:32 pm
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

siclark wrote:
The full JSON back from the hue bulb is

Code: Select all
{
"state":"ON",
"brightness":84,
"color":
    {"x":0.520197971485871,
    "y":0.414169012151805},
"color_temp":484.027105517909,
"linkquality":42,"elapsed":100116,
"last_seen":"2020-06-15T08:51:20.975Z"
}



Is this the status you get back even when you change the color using your current node-red RGB method? If so, this is going to be a royal pain because Indigo only does RGB but the bulb is reporting color back in XY format.

I've got everything else almost working, but this is going to be an issue.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2020 1:21 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs


Posted on
Mon Jun 15, 2020 1:48 pm
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Maybe not as bad as I thought.

Pre-release: https://github.com/FlyingDiver/Indigo-S ... /tag/0.3.0

Templates are included for zigbee2mqtt devices, including a color device one. Please create a device from the template, with the matching trigger (if needed), and give it a try.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2020 1:49 pm
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2020 2:19 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Amazingly fast turn around.

Rain has stopped play (diggin) outside, so I have some time to play at the computer.

The on and off and brightness, including scaling are working. Indigo 100 = zigbee 254 rather than 255 but cant see that mattering.

The colour temp and colour settings both set the brightness to 0 and even though state is still ON, the bulb itself then reports off, as zero brightness.

Code: Select all
{"state": "ON", "brightness": 255 }

then change colour temp
Code: Select all
{"state":"ON","brightness":0,"color_temp":200}


As the bulb received the colour or temp command in an off command, it appears to not store, it, as when I then turn the bulb on, it comes back on at the colour it was, not the updated one.
It looks like its not picking up the brightness value if its not been changed.

Also the get topic only needs a blank payload. Adding anything there doesnt seem to change the response.

Posted on
Mon Jun 15, 2020 2:23 pm
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Can you put the plugin in debug logging mode (not detailed debugging) and rerun those tests?


Also the get topic only needs a blank payload. Adding anything there doesnt seem to change the response.


I'm just going by the published spec.... ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2020 2:26 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Strangely Indigo 100 = zigbee 255 on a dimmer device, but 254 on a colour device. ...

Changing colour device does appear to be sending zero.

Code: Select all
MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> {"state": "ON", "brightness": 255 }
   MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> OFF
   MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> ON

   MQTT Shims Debug                shimColor 1965234729: actionColorVals: 'ActionProps : (dict)
     whiteTemperature : 5498 (integer)'
   MQTT Shims Debug                shimColor 1965234729: SetColorLevels, changing color temperature to: 5498.0
   MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> {"state":"ON","brightness":0,"color_temp":182}

Posted on
Mon Jun 15, 2020 2:28 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

FlyingDiver wrote:
I'm just going by the published spec.... ;)


Very true, that is what it says but doesnt seem to be what it does.. :roll:

Posted on
Mon Jun 15, 2020 2:33 pm
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

siclark wrote:
Strangely Indigo 100 = zigbee 255 on a dimmer device, but 254 on a colour device. ...

Changing colour device does appear to be sending zero.

Code: Select all
MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> {"state": "ON", "brightness": 255 }
   MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> OFF
   MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> ON

   MQTT Shims Debug                shimColor 1965234729: actionColorVals: 'ActionProps : (dict)
     whiteTemperature : 5498 (integer)'
   MQTT Shims Debug                shimColor 1965234729: SetColorLevels, changing color temperature to: 5498.0
   MQTT Shims Debug                shimColor 1965234729: publish_topic: zigbee2mqtt/1965234729/set -> {"state":"ON","brightness":0,"color_temp":182}


Do you get a status back from the device after sending a command? Or only when you specifically request a status update?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 15, 2020 2:37 pm
FlyingDiver offline
User avatar
Posts: 4308
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Also, did you filter that debug log? Seems to be missing some lines I would have expected.

Can you post a screen shot of the configuration dialog?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 1 guest