-
Hi, I would like to dim by Lifx bulbs smoothly by adopting the approach of Philips Hue. I'm using Hue internal wall modules, connected to physical momentary switches (https://www.jungstore.nl/531-41-u-multipulsdrukker-met-2x2-maakcontacten-en.html). I wanna achieve a butterly smooth dimming experience, similar to the analog world. Philips Hue tackled this with the following stragegy: So basicly, what is happening: the bulb start dimming down on its own, unitl the stop signal is received. This results is visualy very appealing dimming, and very little network traffic. I'd like to achieve the same with my Lifx bulbs. Step 1 is easy to do, but how can i do step 2? I am unable to give the light bulb the stop signal. Regards, Pim |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hello, The LIFX binary protocol doesn't have a specific Stop command as such. But sending a SetWaveformOptional message will replace whatever hsbk transition is currently happening. So you could send a SetWaveformOptional with brightness to 0 and a period of 6 seconds and then to stop it you send a SetWaveformOptional with period 0 and changing none of the hsbk fields. I assume you'd do this programmatically, but the cli equivalent is
You might be tempted to instead use SetLightPower with a duration, however the protocol doesn't expose a message for stopping a power transition. and you can't set a partial power level. One way you'd find complexity is I imagine you'd want that 6 seconds to be different depending on how bright the device is when you start this process? |
Beta Was this translation helpful? Give feedback.
-
Thank you, i got it working in Home Assistant. In configuration.yaml, i've put the rest command, including 3 variables.
In the automation/script, i can refer to this as follows:
Stop dimming down for the same 3 lights:
I think this is actually a bonus feature:
I'll implement this in an automation tomorrow and check how it works in practice. I'll let you know. |
Beta Was this translation helpful? Give feedback.
-
I've implemented it in my automation. It is very, very smooth! It is even better than i imagined.
In practice, this works exactly as i hoped for. If someone would like to make the transition time shorter when the light bulb was already dimmed down, one could use the transition_variable and multiply it by [initial brightness value / 255]. See below my automation, in which both Philips Hue and Lifx lights are dimmed up and dimmed down.
Thanks again for your help! It is awesome. PS: perhaps this methodology could be implemented as new Lifx services in Home Assistant too in the future (lifx.start_dimming , lifx.stop_dimming). I wouldn't know how, but perhaps someone would like to pick up on that. |
Beta Was this translation helpful? Give feedback.
Hello,
The LIFX binary protocol doesn't have a specific Stop command as such. But sending a SetWaveformOptional message will replace whatever hsbk transition is currently happening. So you could send a SetWaveformOptional with brightness to 0 and a period of 6 seconds and then to stop it you send a SetWaveformOptional with period 0 and changing none of the hsbk fields.
I assume you'd do this programmatically, but the cli equivalent is
You might be tempted to instead use SetLightPower with a duration, however the protocol doesn't expose a mes…