-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
[FEATURE REQUEST] Use move instead of stepping value with transition #168
Comments
Hi @jeroenvansch, Thank you for opening this issue. First of all, ControllerX was first created to do such behaviour, so it is able to support different integrations and different lights. What you are mentioning is related to Zigbee2MQTT, is that correct? deCONZ also has its way of doing so, but not ZHA as far as I know. So since each integration is different, I came up with a solution that would work for everyone - send requests periodically to HA and let HA handle the requests. If you are having issues with your network, I would recommend you tweaking the Having said this, I love your idea, in fact, this is related to #118, which propose to send MQTT requests rather than sending call services to HA. However, this is not an easy change, to do, but it is something I will be adding, so ControllerX with Zigbee2MQTT can be used without the need of HA, therefore, improving the performance and the overall experience. What I did not consider is that Zigbee2MQTT has the I will keep this ticket open, but it will be handle by #118. Cheers, |
Hi @xaviml, You are correct in assuming my setup uses Z2M. Being able to directly send commands to MQTT would indeed be a major improvement! regards, |
Hi @jeroenvansch, An example of your current automation would be indeed helpful, thank you :) Regards, |
Hi @jeroenvansch, I have been playing today with the current code of ControllerX to achieve what we aim for this ticket: exampe_app:
module: controllerx
class: E1810Controller
controller: livingroom_controller
integration:
name: z2m
listen_to: mqtt
light: light.livingroom_lamp
smooth_power_on: true
multiple_click_delay: 250
merge_mapping:
brightness_up_hold:
service: mqtt.publish
data:
topic: zigbee2mqtt/livingroom_light/set
payload: '{"brightness_move": 60}'
brightness_down_hold:
service: mqtt.publish
data:
topic: zigbee2mqtt/livingroom_light/set
payload: '{"brightness_move": -60}'
brightness_up_release:
service: mqtt.publish
data:
topic: zigbee2mqtt/livingroom_light/set
payload: '{"brightness_move": 0}'
brightness_down_release:
service: mqtt.publish
data:
topic: zigbee2mqtt/livingroom_light/set
payload: '{"brightness_move": 0}' I overwrote the brightness hold and release actions to call MQTT topic you mentioned, and this works as expected. This is just a proof of concept for me to know it is viable, the idea now is do this calls internally and through the MQTT integration with AppDaemon, so without communicating to HA. I will keep you updated with my advancements. Regards, |
Hi' @jeroenvansch & @xaviml Just stumbled over this feature request by accident. Have tested with completely default setting for an E1810 controller and only tweaked bringtness_move from 60 to 80. This is as smooth as with proprietary Hue bridge and Hue dimmers. We need this, Xavi !! 😁😆🎄🎁🎉😉 Merry Christmas guys and stay safe 🎄🎉🍻🍻 |
Hey @htvekov, I am glad it worked really well. I would love to implement this in ControllerX as you know, but it is not an easy task since ControllerX deeply depends on HA call services and calling it periodically with hold actions. I was thinking that the same way we have a Another solution I thought was to ad a new attribute for light controller to define the strategy of the hold-release actions:
And more to come when needed. Probably this second option is cheaper in time, but it will still give the results we want. Regards, |
Hi' @xaviml As ControllerX from the very beginning was build with HA as core integration, I wouldn't suggest to start all over and build yet another complete parallel MQTT integration from scratch. Neither, I don't believe there's an actual need for a full MQTT integration (non HA dependant) now or in future ? A MQTT 'light' light entity integration 😉 as you've scheduled, would in my opinion be sufficient and add great value to ControllerX. On, off, toggle and use of move and step commands for color/brightness control directly from ControllerX as MQTT commands (single entitys or groups) would be awesome ! 😉😎 Ciao ! |
Hi Henning, Thank you for your input. I totally agree with you, it would be time-consuming to start all over again to add this functionality, so I will be adding the MQTT functionality to the light controller as I described earlier. This way we can define how we want the light controller to work. Regards, |
Awesome, Xavi 👍😊 Let me know when there's something to test and I'll gladly assist. |
hi @xaviml Can you provide an example for the E1744LightController? Following does not work for me:
|
FYI,
sample config of controllerx in
|
Leaving this link here for reference: https://www.zigbee2mqtt.io/devices/LED1545G12.html |
@xaviml |
Hi @Bascht74, I have some working code already and it works quite well, but I still have to make some adjustments. The approach for this ticket is to create a new type controller. The same as we have Light controller, Media Player controller, Switch controller, etc. I create a new Z2MLight controller. I realised that the functionalities that z2m offers are quite limited to what ControllerX offers with the LightController, so I decided to make it as a separate controller type. I will keep you all updated once I have PR and beta release for you guys to test. Regards, |
Hi all :) After a very (very very...) long time, I have been able to tackle this issue. I know I have said that I would be integrating this as part of the Light Controller, however, I realized that there would be so many incompatibilities that it made more sense to create a new controller type, Zigbee2MQTT Light Controller ( You can now read the documentation for this functionality here, and you can try it out if you get the code and put it in your instance. Otherwise, I will be releasing a beta version soon, so people can try it. Regards, |
Hi all, I just released a beta version v4.21.0b0 with the support of Z2M Light Controller as described in my previous comments. You can download from HACS enabling beta versions on ControllerX. Please, let me know if you find any problems. I will be releasing the non-beta version next week or the next. You can read more about it here. Regards, |
This feature has been added to ControllerX v4.21.0 with the addition of Zigbee2MQTT Light Controller. |
Feature Request
Is your feature request related to a problem?
I noticed that the brightness hold funtion doesn't dim smoothly with my Tradfri lights. And also quite a lot of traffic on the zigbee network during Hold functions.
Describe the solution / feature you'd like
Instead of sending a new brightness value to the lights with a transition time every second you could just send the
"brightness_move": [value]
command upon the "Hold" action and the"brightness_move" : 0
command upon the "release" action.this results in smooth dimming and less traffic.
I don't know if all lights support this, Tradfri and Hue do, but maybe offer it as an alternative in the config so the current way is still available.
Describe alternatives you've considered
Not using ControllerX, but thats not really a good alternative ;)
Additional context
The text was updated successfully, but these errors were encountered: