Uses a zigbee USB dongle (hub)
My Philips Hue lamp with zigbee2MQTT goes to zero brightness also
Uses a zigbee USB dongle (hub)
My Philips Hue lamp with zigbee2MQTT goes to zero brightness also
That will work to talk to the lights directly? Can I use the hub I already have (Hue hub)
Last I heard of it the Hue lights used some sort of encryption on zigbee and while yes you could use them as part of a mesh network to help boost the range of non hue products you could not use a 3rd party dongle/radio to control hue lights via zigbee
Are you able to share the function code you use? I am keen to see how you interact with the API
I use the Sonoff zigbee dongle and a Philips 9290018216A control via MQTT | Zigbee2MQTT lamp with no trouble
here's the code, hope it helps
if (msg.payload == true){
msg = {
payload: {"state":"on","brightness":100},
state: "on",
}
}
if (msg.payload == false) {
msg = {
payload: { "state": "off", "brightness": 0 },
state: "off",
}
}
node.status({ fill: "red", shape: "ring", text: msg.state });
return msg;
Ohh that is neat, Im guessing you have that plugged into a server and don't use/own a hub?
I am curious as to how well that works with other Hue products like downlights, Play bars, Led strips and acessories (Motion sensor and dimmer switch). I may get one of those dongles for myself or my brother at some point. Do they have simialr or better range then the hub?
How have you wired that one up? is it an inject that triggers it or status from the light (needing to light nodes/a loop). I cannot get the code to work.
The dongle just plugs into a USB port. See Getting started | Zigbee2MQTT for more information on how it works. I have never had a Hue hub nor any other Hue products.
You said that changing the colour temperature in the Hue app turns the lights off (which seems very strange) , does the same thing happen if you just send the colorTemp
in NodeRED?
I do have two hubs in my system and the only devices I run are light bulbs and smart outlets so cannot speak about anything else, the brightness 0 part was because of just what you are seeing, sometimes when they turned on and the brightness was up I'd get weird things happening so I always set brightness to 0 , set whatever else then turn brightness up.
Dropping the "Brightness" part (using {"colorTemp":"hot"}
) still does exactly the same without needing to query the state it was in, Just that if it is off, It turns back on at the last state then changes (which is better then it not doing it at all). The only other option I see is that NR itself holds a variable/last state that it was in and the lights query NR when they turn back on, But that seems too hard.
Ignoring the motion sensor and dimmer switch (as they are designed to purely go to "last state" when they trigger). Why set the brightness to 0 when change? Won't that alwasy make the lights fade off when changing colour. That's part of the issue Im trying to fix, when I sit at my table (where all the lights are) and it comes time for the lights to change, they fade off to change then I or the motion sensor triggers them back on
I just finised testing this by triggering a colour change while the lights were off (still powered) and only send {"colorTemp":"hot"}
, After about 10 mins of the lights being off and my lightbars fading off due to inactivity from the motion sensor (Intended action). When I trigered the motion sensor again the lights turnt on for less then a second before turning off again, When I turnt them on manually they went to the wrong colour