Skip to content
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

Home Assistant state changes aren't correctly sent to diyhue #835

Open
2 tasks done
foxy82 opened this issue Jul 1, 2022 · 8 comments
Open
2 tasks done

Home Assistant state changes aren't correctly sent to diyhue #835

foxy82 opened this issue Jul 1, 2022 · 8 comments

Comments

@foxy82
Copy link
Contributor

foxy82 commented Jul 1, 2022

Describe the bug

Lights in diyhue should update when the light state is updated from Home Assistant. The state should also load correctly on start up / discovery.

Steps to Reproduce

Connect to Home Assistant and discover devices. All are discovered as off even if they are on.

Expected behavior

States should be correctly discovered.

Logs

Docker Info (please complete the following information):

  • Architecture (Ex: x86, ARM):
  • Docker image version (Ex: latest, arm-05f043b, 128):
  • OS (Ex: Windows 10, Ubuntu Buster):
  • Hardware (Ex: PC, Raspberry Pi 1/2/3/Zero):

Checklist

  • I confirm that this is a bug report
  • I confirm that I have completed this template to the best of my ability

Additional context

I am looking into this issue with the other Home Assistant ones.

@foxy82
Copy link
Contributor Author

foxy82 commented Jul 1, 2022

Now I've done the other fixes the state does work - but it is slow and waits for syncs. We can do better than that by pushing changes as soon as they happen.

@YellowNest
Copy link

This issue seems to be the same as #795
I don’t know what the progress is on this one.

@joeblack2k
Copy link

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

Lights are managed with zigbee2mqtt and homeassistant.

any update on this?

@YellowNest
Copy link

still not fixed, tried to ask on slack no response.. installed in in a new environment but nothing..

conclusion: this project doesnt work.

Yeah, I also think this issue has been stale for a long time now. Maybe @Koenkk (the great dev of zigbee2mqtt) can help us with this? 😊

@joeblack2k
Copy link

That would be awesome!

@mariusmotea
Copy link
Member

mariusmotea commented Aug 19, 2022

Please use MQTT Explorer and show me the message you receive when you turn a light on/off from zigbee2mqtt web interface and also what appear in diyhue logs. For me this is working as expected since it is implemented

https://github.com/diyhue/diyHue/blob/master/BridgeEmulator/services/mqtt.py#L321

GitHub
Main diyHue software repo. Contribute to diyhue/diyHue development by creating an account on GitHub.

@nuggie
Copy link

nuggie commented Aug 19, 2022

I also have to issue that every change from diyHue is reflected correctly in HomeAssistant but not the other way around.
For example: I change the brightness of one light in HomeAssistant - these are the logs in diyHue for this event:

2022-08-19 22:53:45,368 - services.mqtt - DEBUG - MQTT: got state message on zigbee2mqtt/HueEsszimmerTresen
2022-08-19 22:53:45,369 - services.mqtt - DEBUG - b'{"brightness":254,"color":{"x":0.4743,"y":0.4133},"color_mode":"color_temp","color_temp":394,"linkquality":94,"state":"ON","update":{"state":null},"update_available":null}'
2022-08-19 22:53:45,369 - services.mqtt - DEBUG - Cache Hit for HueEsszimmerTresen
2022-08-19 22:53:45,371 - services.mqtt - DEBUG - MQTT: got state message on zigbee2mqtt/HueEsszimmerTresen
2022-08-19 22:53:45,372 - services.mqtt - DEBUG - {
"brightness": 254,
"color": {
"x": 0.4743,
"y": 0.4133
},
"color_mode": "color_temp",
"color_temp": 394,
"linkquality": 94,
"state": "ON",
"update": {
"state": null
},
"update_available": null
}
2022-08-19 22:53:45,397 - services.eventStreamer - DEBUG - {'creationtime': '2022-08-19T21:53:45Z', 'data': [{'id': '46ee1bd0-74cd-4228-850d-038b2d858cbd', 'type': 'light', 'on': True, 'owner': {'rid': '33951852-721c-59db-afb3-4342643f5448', 'rtype': 'device'}}], 'id': 'b9aefdd1-4196-4338-8dd2-9be13375283e', 'type': 'update', 'id_v1': '/lights/2'}
2022-08-19 22:53:45,398 - services.eventStreamer - DEBUG - {'creationtime': '2022-08-19T21:53:45Z', 'data': [{'id': '46ee1bd0-74cd-4228-850d-038b2d858cbd', 'type': 'light', 'brightness': 100.0, 'owner': {'rid': '33951852-721c-59db-afb3-4342643f5448', 'rtype': 'device'}}], 'id': '4e2e6856-786d-427e-9535-fe4a8658f9c9', 'type': 'update', 'id_v1': '/lights/2'}

but diyHue and also the HueApp shows:

image

The status in HomeAssistant:

image

And I can also say: Yes, the lamp is at 100% brightness

This is the log-entry in zigbee2mqtt:

2022-08-19 23:58:24MQTT publish: topic 'zigbee2mqtt/HueEsszimmerTresen', payload '{"brightness":254,"color":{"x":0.4743,"y":0.4133},"color_mode":"color_temp","color_temp":394,"linkquality":54,"state":"ON","update":{"state":null},"update_available":null}'

Also changed the name in diyHue to the exact same name (without whitespaces), but this doesn't help,

@YellowNest
Copy link

Should it matter if whether Home Assistant or Homebridge is used? Personally I use Homebridge and the light state is not working as it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants