diyhue / diyHue

Main diyHue software repo
https://diyhue.org/
Other
1.58k stars 280 forks source link

Properly update light state #795

Open Joly0 opened 2 years ago

Joly0 commented 2 years ago

Describe the bug I have some philips hue lights added to zigbee2mqtt and home assistant and have connected diyhue to home assistant (all installed through the ha addons). Changing the state of any light (turning it on or off) does update the state in diyhue, though the hue app or hue essential dont pick this up.

Steps to Reproduce Steps to reproduce the behavior:

  1. Add philips hue light to zigbee2mqtt
  2. Connect to home assistant
  3. Open hue app
  4. Change state of the light in home assistant or zigbee2mqtt
  5. State in hue app of the light doesnt update

Expected behavior The light in the app should be updated to the current state of the light

Logs

Docker Info (please complete the following information):

Checklist

Additional context

Mevel commented 2 years ago

Would you be so kind and provide more details and a description?!

Thank you

Joly0 commented 2 years ago

weird, i did this, but somehow my details and description disappeared.... i am sry

mariusmotea commented 2 years ago

I think we update just the on/off state and the brightness

YellowNest commented 2 years ago

Running latest master, tried both host and docker installations. Running all my bulbs through zigbee2mqtt. The state of the bulbs are not working at all. On/off, brightness etc..

mariusmotea commented 2 years ago

Please specify zigbee2mqtt version you are running. Any debug output when you toggle a light on/off from 3rd party app?

YellowNest commented 2 years ago

Zigbee2MQTT version 1.25.0-dev commit: ad24c4f6 Coordinator type zStack3x0 Coordinator revision 20220219

I will provide debug info when I am near a computer. In short i see this behaviour: changes within hue app is also affecting homkit. But if changes are made in homekit (on/off/brightness/color etc) nothing will change in hue app. It is as if hue app or diyhue is not checking for any state at all.

mariusmotea commented 2 years ago

If you use zigbee2MQTT web interface and toggle a light on/off it don't change? I'm unable to replicate this, for me it is updating correctly

YellowNest commented 2 years ago

Toggling bulbs through the zigbee2mqtt frontend is not doing anything in hue app.

I just want to mention that I have changed the base topic for my setup. So instead of Zigbee2mqtt (which is default) I have a custom name.

Joly0 commented 2 years ago

Additional behaviour i noticed. Setting the light to turn on again after power outtage results in the correct behaviour, so the light turns on, but the state again is not recognized by the hue app, i have to manually adjust the brightness for the app to recognize the light as being on

mariusmotea commented 2 years ago

Toggling bulbs through the zigbee2mqtt frontend is not doing anything in hue app.

I just want to mention that I have changed the base topic for my setup. So instead of Zigbee2mqtt (which is default) I have a custom name.

This is the issue, we have the domain hardcoded. https://github.com/diyhue/diyHue/blob/master/BridgeEmulator/services/mqtt.py#L268

Additional behaviour i noticed. Setting the light to turn on again after power outtage results in the correct behaviour, so the light turns on, but the state again is not recognized by the hue app, i have to manually adjust the brightness for the app to recognize the light as being on

This is known bug, will be fixed in future updates.

Joly0 commented 2 years ago

This is the issue, we have the domain hardcoded. https://github.com/diyhue/diyHue/blob/master/BridgeEmulator/services/mqtt.py#L268

Though this seems not to be the case for me, i havent changed the base topic (or atleast i think so)

GitHub
diyHue/mqtt.py at master · diyhue/diyHue
Main diyHue software repo. Contribute to diyhue/diyHue development by creating an account on GitHub.
almostserious commented 2 years ago

I see the same behaviour in my install with a deconz connection. Hue app is all over the place. Light states not reflected correctly. Sometimes when changing a light in the Hue App it reports suddenly that all lights are on, while this is nit the case.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not been verified. If this is still an issue, please provide the more information so that we are able to understand the issue. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

Joly0 commented 2 years ago

Still a problem

YellowNest commented 2 years ago

Can we maybe pin this issue since there's alot of users experiencing the same problem?

YellowNest commented 2 years ago

Any progress regarding this issue? I have tried to change the base topic back to default but still the light state is wrong in hue app. Can someone confirm if this issue is specifically regarding zigbee2mqtt?

mjdiamond commented 2 years ago

I'm having the same issue but i don't use zigbee2mqtt at all

When i change the state of a light (color, brightness, on/off) using its default app, or from Home Assistant, the state on the Hue App doesn't update, this happens with non-Hue lights and Hue lights too (connected via DiyHue, of course)

Just to be sure, i created a fresh install of Home Assistant with no lights at all, I installed the DiyHue add-on, and added a Wiz bulb, but same thing, if i change the light state in the Wiz app, nothing happens on the Hue app

Also, sometimes if i close the Hue app and open it again, the state of the DiyHue lights gets messed up, usually showing the same color in all lights, despite the actual lights being at different colors

joeblack2k commented 2 years ago

Same here, opening the app shows a different state the the actual state.

Lights are managed with zigbee2mqtt and homeassistant.

any update on this?

joeblack2k commented 2 years ago

This is fixed @T-IOOO you can close it

YellowNest commented 2 years ago

This is fixed @T-IOOO you can close it

No it’s not fixed!

joeblack2k commented 2 years ago

Did you pull latest? Could you join the slack channel and help debugging?

YellowNest commented 2 years ago

Did you pull latest? Could you join the slack channel and help debugging?

I have the latest version (host install). I have already joined Slack but since I hardly get any replies there I comment here instead.