diyhue / diyHue

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

DIY HUE + Zigbee2MQTT + HomeAssistant + Ambilight only one light synchronizes #1044

Open Hufenbacke opened 2 months ago

Hufenbacke commented 2 months ago

Issue does not already exist?

I have searched and found no existing issue

Select Environment

Docker

Home Assistant related?

Yes

Description

Hey guys,

I got diyhue up and running. Well kind of. But first my setup: Zigbee lamp(as of now all hue) <--> Zigbee2MQTT <-->Mosquito (MQTT) <--> Home Assistant <--> DIY HUE <--> Philips Ambilight The light are showing up in DIY HUE. I can link my TV to DIY HUE and I can configure the lights on the TV. But than something strange happens. Only one of the lights actually gets synchronized. Is this a limitation of the Home Assistant implementation or just simply a bug?

Errorlog:

This can be downloaded from the webUI.
DiyHue > Bridge > Brdige Control > Download debug > Log tar
This is also included in Full debug
If diyHue does not start upload from normal log

Steps to reproduce

-Use DIY HUE with the Home Assistant integration -get your lights -pair Ambilight TV with DIY HUE -configure you lamps -play some movie, youtube, TV or whatever to get some ambilight action going

Please enter your operating system details here

If diyHue does not star use "uname -mrs" Hue-Emulator Version: 2024-09-02 21:04:00.000000000 +0200 Architecture: x86_64 OS: Linux Linux version: #44-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 13 13:35:26 UTC 2024 Linux release: 6.8.0-44-generic Hardware: %Hardware%

Upload debug tar


This can be downloaded from the webUI.
DiyHue > Bridge > Brdige Control > Download debug > Full debug
Do not upload from Force config dump, Force config dump contains sensitive information
``
[hue-emulator.zip](https://github.com/user-attachments/files/17002931/hue-emulator.zip)

### What DiyHue version(branch) are you using?

master (latest)
hendriksen-mark commented 2 months ago

hi, in the groups.yaml i can see you have 3 Entertainment groups. 2 of them only contain 1 light, the other only 2. i suggest that you remove the Entertainment groups in the hue app(settings> Entertainment) and try again setting up ambilight.

Hufenbacke commented 2 months ago

hi, in the groups.yaml i can see you have 3 Entertainment groups. 2 of them only contain 1 light, the other only 2. i suggest that you remove the Entertainment groups in the hue app(settings> Entertainment) and try again setting up ambilight.

Hmm, it seems that you are on to something. It is indeed the case that removing those groups results in a working ambilight + diyhue experience. The problem is that I didn´t create those groups in the first place. And this is were it becomes a little bit strange because those groups get auto created by the tv I guess?

hendriksen-mark commented 2 months ago

Yes these groups are created by the tv.

Hufenbacke commented 2 months ago

Yes these groups are created by the tv.

So, if the groups are created by the tv but by doing so, the lights don´t work, i am kind of in a loop right? Well, how do I escape this loop?

hendriksen-mark commented 2 months ago

Can you try to manually make a entertainment group and in the hue essentials app active the cop lights?

Hufenbacke commented 2 months ago

Can you try to manually make a entertainment group and in the hue essentials app active the cop lights?

I think it is working now. The loop can be broken by doing the following:

  1. Install DIY HUE and configure/add the lamps
  2. Delete all entertainment groups
  3. Configure Ambilight + DIY HUE on all of your TVs
  4. Shut down those TVs
  5. Delete the auto created entertainment groups

After doing it this way. It is working and no group is created. A group will be created again if you modify the Ambilight + DIY HUE settings on a TV. So care!

hendriksen-mark commented 2 months ago

so now its working? be aware that only 1 stream can be active, so only 1 tv can stream to diyhue at a time. this is not a limitation of diyhue.

Hufenbacke commented 2 months ago

so now its working? be aware that only 1 stream can be active, so only 1 tv can stream to diyhue at a time. this is not a limitation of diyhue.

Sorry for the late reply. I am testing right now. It seems like the system is working. But I have an issue with two lamps that seem to have an Zigbee issue. I will give an update the moment I know more. And yes, I am aware of the 1 tv 1 bridge limitation. I could spin up another container and deploy an additional diyhue bridge, right?

hendriksen-mark commented 2 months ago

yes you can deploy more then 1 hue services, in the logs you will find something about multiple devices with the same mdns name, this is a know issue and will be solved in the near future. i dont know how z2m will react to that much info at once, one way to find out, please let us know how it goes.