I just tried this out and it works really well. Except for one thing. I use yeelights and they have a limit of 60 requests per minute (as per home assistant docs) and the dimming is stopping after a few steps (API just kills itself, lamp is unreachable for a minute). I tried changing the automatic steps variable but It doesn’t seem like it fixes anything.
Thanks for trying this out! Regarding the issue with the yeelights, I have to say that I have tried this with IKEA lights, nothing else. However, for your case, I would recommend the following configuration to reduce the requests per minute with the cost of having something less smooth.
nameYouWant: module: z2m_ikea_controller_test class: E1810Controller sensor: YOUR_SENSOR light: YOUR_LIGHT delay: 500 automatic_steps: 6
delay: It will cause the dimming feature to dim the light every half a second when the button is held.
automatic_steps: By default, it does 20 requests to the light to go from one end to the other. I recommend you to lower this down to 6. This will make the light dimming less smooth.
manual_steps: You could also change this parameter (10 by default). But these steps are the ones when the brightness/color_temp is clicked (and not long-pressed).
I hope this helps you.
v1.1.0 is now released
- Adding the possibility to add a group entity (e.g. “group.livingroom_lights”)
- Adding the possibility to add one or more sensors in the same instance.
This following configuration will control the lights on the living room from 2 different E1524/E1810 controllers:
nameYouWant: module: z2m_ikea_controller class: E1810Controller sensor: - sensor.livingroom_controller1_action - sensor.livingroom_controller2_action light: group.livingroom_lights
Note that there are no breaking changes.
Thanks, this works really well.
But couldn’t you use the transition option to only send one request every half second?
The problem with the transition is that you cannot control when to stop it, it is just the time you want the light to go to one state to another one. The
delay option I put in the example configuration, already makes the app to send 1 request every half second.
Yes but couldn’t you use transition to dim smoothly from the old brightness to the new brightness?
Instead of moving between each step instantly, just transition.
Ah sorry! I understand. That is a good idea, indeed. I will look into that and I will let you know, if you have an idea already on how to do it you can submit a PR.
The only problem I see with this is that
transition only accepts seconds. So I would not be able to make this possible with delays under 1 second, just for 1 second or more. However, I limit the delay to be 1 second or less due to the use of time.sleep(). Even so, the behavior it would be odd since the button might be released and then the light would still be dimming for more time. For this reason, I will not consider to add this on the app for the moment. If
transition ever changes to microseconds I would consider, but I don’t think this will happen. Thanks for the proposition anyway.
I think you can use 0.1 etc.
v1.2.0 is now released
- Adding transition attribute for better smoothness as @tobimori suggested. The value of the transition is the same as the delay.
- Changing the default values (Increasing delay to 350 and decreasing automatic steps).
This change will make the dimming and brightening much smoother and it will also do less request to the lights.
Note that there are no breaking changes.
Hey @tobimori. Get the latest release and let me know if it works much better. I tried my lights with the parameters I suggested you and it works much smoother. Thank very much for the suggestion!
Any future support for IKEA sound controller?
I don’t currently own one of those. However, what objective you had in mind? Control a light with one of those or the Ikea Sonos Symfonisk / any media player?
The main idea of this App was to easily give functionality to the Ikea light controllers. However, this can expand if people request it.
Thanks for your interest @pitoganzado
yes, my main idea is control the sonos sound system/or another media_player, basically is use the same approach of your Z2M with this controller and with media_players.
I will get one next time I go to Ikea.
Do you have the controller? I bought it yesterday and when I rotate it it will freeze my raspbery pi 4 for couple of seconds. Runing it trough Zigbee2mqtt.
debounce: x to your config. It will only allow 1 request per x seconds then.
Thanks @tobimori, is there a way to lower the latency anyhow?
Will there be a fix for issue?
I would like to get rid of the ikea hub. But need the controllers!