Smanar / Domoticz-deCONZ

deCONZ plugin for Domoticz (Zigbee application)
GNU General Public License v3.0
36 stars 27 forks source link

Group brightness and color is not report by plugin #85

Closed vsaugey closed 3 years ago

vsaugey commented 3 years ago

Hello,

If you have a group of hue lights that permit to control the brithness, domoticz display a slidder to adjust brigthness. If you change value with the slidder everything work well, but if your refresh the page, domoticz will indicate 0% of brightness. The same problem existe for colors. But, that status of the light (on/off) seems to be good.

Regards,

Vincent

Smanar commented 3 years ago

Hi, it s normal, I can't do nothing here. You can send command to a group, but return values are not reliable. For exemple you can have a bulb in 2 differents groups, if you set the group 1 "on" and the group 2 "off", the bulb will be "off" but all bulbs are not in same state on group 1.

So the status seem working, but it s just because it stay in last state, it s not more reliable than the slider that return to 0.

vsaugey commented 3 years ago

Yes, I understand that you can have groups with crossing references to the same light that provide could inconsistent state. Or a simpler exemple, you could configure individually the lights in a group and seen that the brightness of the group didn't change ... the conbee's api seems to return the last value set to the group. I saw that the mobile application "Hue Essentials" solved the problem by calculate an average value of the brigthness of all lights of the group (Also, it displays icons of each lights with right color, it's smart).

To come back to your subject, the problem of sending back zero value is that you cannot use some dashboard application like Dashticz. Dashticz read the value just after the update and when you try to slide with your finger for change the brightness, it became very hazardous because the the slidder go back to zero during a slide ...

Smanar commented 3 years ago

Can you try the beta version ? I have do something fir the slider, tell me if it s better pls.

https://github.com/Smanar/Domoticz-deCONZ/commit/16b49843ca33c1dca7bbee77584d5a0ea753e36c#diff-08655555cc53ca79554ba180d1ae7e6ebe5c9b0a25e1772ce248fdd8b83dab34

vsaugey commented 3 years ago

I just tested and it works perfectly with the test branch, thank you a lot. If I quibble a bit, when the group is update to off, we can probably update probably update the value of the brigthness to 0. If I found time, I will try to code it by myself and propose you a patch.

Thank you again for the improvement.

Vincent

Smanar commented 3 years ago

Np, but if you update the value to 0, when you set the group to "on", bri will be still 0, I think it s better if it memorise last value.

vsaugey commented 3 years ago

I checked again behavor with light and with the change we now have the same behavor. You have right, it's better the group keep in memory the last value. Thank you again for the change.