New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for transitions #113
Comments
Just to make sure I'm on the same page: a "transition" just means that you slowly fade from the previous state state to the new state? I agree that it makes sense for that to be implemented by the controller rather than HASS or whatever else. That is blocked by esp8266_milight_hub being stateful. It currently has no memory for states -- it just sends commands as it gets them, and doesn't keep track of what state bulbs are in. |
Yes, we're on the same page about transitions: configurable fades. 👍 But it doesn't have to be a really stateful solution, as in that the hub knows the state exactly for each node. It can e.g. also be implemented using a queue, or by only saving the state of the transition instead of the state of all nodes. |
Oh, does the transition command include both the original state and the desired state? That wasn't clear to me. If it does, then you're right. Not strictly necessary to keep track of bulb state. |
Ok, sorry, didn't think of that. |
Cool, makes sense. Thanks for confirming! |
It looks like v1.6 will be stateful, does that mean that transitions will be possible in the future? That would be awesome! 👍 |
Yes, will enable transitions. Transitions will probably not be in v1.6, but this is probably about half of the hard part. Other hard part is having some kind of pipeline for queued work. |
Should say that this sounds like a fun feature to work on, so it'll probably happen at some point :) |
As a easy feature to add would be to make the OFF command send brightness to 0 wait for X ms depending on current brightness and then send OFF. And ON command send ON then Brightness 255 if no other brightness was given. Easy way to get a smooth on/off atleast. The only downside to transitions by the "hub" is that we get alot of radiotraffic, say swapping from one color to another. That would take like atleast 100 radio commands to get a smooth transition. This would be alot easier if the bulb had built in transitions. |
Transitions work fine with the Gateway Server emulation, yeah? I just switched to mqtt_json lights and noticed the transitions are missing from my scenes. Unless I am mistaken and they were broken before.... would love to have this feature as well. |
In gateway simulation you are using a python library that has support for transitions. |
@bhaap - that's a good idea. My only hesitation is that most of my bulbs from more recent lines (FUT105, FUT015) already behave this way. @oakbrad - bhaap said it. The UDP integration in HomeAssistant supports transitions. It's queueing and sending a bunch of UDP packets. |
Ok. I only have RGBW and a CCT Ledstrip driver. Have not tested the ledstrip driver but my RGBW works as it always remembers its last state so if it was 255 brightness and you want to turn it on to 150 brightness it turns on instantly to 255 brightness and then dims down to 150. I was not aware that newer bulbs behaved any other way. So you might only want to implement this for the bulbs that behave like I described above. Or for all bulb. I mean does it matter that you send the brightness commands to your FUT105 and FUT015 bulbs aswell? :) |
Ah I see what you're saying. Nah, newer bulbs do the same thing. The transition is just a lot smoother -- it fades from full brightness to off over a second rather than it being roughly instantaneous. It probably makes sense to expose this behavior as an option, but I think it's orthogonal to the ask in this ticket. Could you open a new issue? |
Yes I will. |
@sidoh Can you maybe provide some pointers on where how/where you would implement the queue/pipeline for transitions. I'm not sure yet, but I might have time to work a bit on this in the near future... |
Hey @corneyl, sorry for the late response here. The notification I got for your comment slipped through the cracks. Honestly the hardest part about this effort is going to be figuring out how to design the pipeline and where the different pieces fit in to the existing stuff. |
any updates on this? |
maybe this code can give a clue, it also runs on an ESP8266 ans supports transitions |
No, no updates. I'd have updated the issue if I had any. I hope this is obvious, but this is a project I work on in my spare time. I don't always have the time to work on it, nor do I always have the interest. I doubt it was your intention, but I want to point out that the tone of your last message in particular is sort of naggy and entitled. This is an open source project. If you're eager to see this feature included, I encourage you to try to add it yourself, and contribute your work back to the project if you so choose. |
You are right that was not my intention, I am already working on adding this feature but i'm more familiar with python than C++ so it may take some time... |
@sidoh Thank you for this great project. Please consider me a +1 for this feature when you have time. :) |
Will be added in 1.10. There's a feature branch that is code-complete, but I need to add tests and documentation before merging. |
Support is live in 1.10.0-dev.7. I somehow lost the documentation I added to the README. Think I forgot to commit it and nuked my local branch or something. Will get around to re-writing soon. There are RESTful create/read/list/delete transitions under You can also create transitions using the syntax HASS uses -- by including a |
Thank you very much, Sidoh. I look forward to trying this out and hopefully can this week. :) |
Can’t wait to try transitions! I really want to thank you for putting so much effort in this project. Is there a way to add a practical example to the readme using home assistant so everyone can start using the new feature? { |
I think it should support using transitions using whatever interfaces HomeAssistant has. It's not its own special thing in that way. You toss a Makes sense to list (or link to) a simple example, I'll look into that before releasing 1.10. |
First, thanks for this package, works perfect!
I couln't find any mentions of this before, but would it be possible to support transitions?
mqtt_json
in Home Assistant already sends this parameter in the MQTT messages, but I do not know whether this is feasible to implement.In my opinion this should be implemented in the bridge, and not in Home Assistant, as timing can be done a lot more precise on a ESP (realtime vs OS), and MQTT messages have more overhead opposed to RF messages.
The text was updated successfully, but these errors were encountered: