hass-emulated-hue / core

Hue Emulation for Home Assistant
Apache License 2.0
332 stars 56 forks source link

Hue Entertainment - Lights not responding #69

Closed Kh3nsu closed 3 years ago

Kh3nsu commented 3 years ago

Describe the bug

Hello, I just tried to set up the Hue entertainment areas. It works fine so far, you can set it up and save it. While arranging the lights, they react, but as soon as you get to the part about testing the synchronisation, the lights stay exactly as they were before. No change whatsoever. The lights can be controlled otherwise. (I have tried it with different lights, but the same thing happened with all of them).

Steps to Reproduce

  1. Go To Settings
  2. Click on Entertainment-Areas
  3. Create Area
  4. Select a Light
  5. Arrange the light
  6. Click on Next 2x

Expected behavior

The light symbols should light up in different colours in the app, but the lights remain the same as when they were arranged.

Logs

Hardware Info:

Additional context

I'm trying to connect it to Razer Synapse, the lights are also recognised perfectly there, but none of the lights change no matter what I set.

alexyao2015 commented 3 years ago

We've added a temporary fix for this issue in the latest stable build.

Kh3nsu commented 3 years ago

We've added a temporary fix for this issue in the latest stable build.

You mean in 2.0 ?

alexyao2015 commented 3 years ago

The stable addon has a new update which should fix it.

Kh3nsu commented 3 years ago

I tried it :OOOO Its working damn fine :D Very responsive but a little delayed but otherwise good (When too many commands come in at once) But I think thats a problem of the hardware ^^

alexyao2015 commented 3 years ago

The delay is very dependant on the type of lights you're using. Esphome lights would have the lowest latency. Other lights may or may not be as fast.

Kh3nsu commented 3 years ago

Well Im using WLED, is there a setting I should change (By the way WLED is supporting UDP Stream maybe this is useful?)

alexyao2015 commented 3 years ago

Maybe? That would be up to you to research/ask elsewhere. The latency you are seeing is between Hass and the lights. Ask the integration developer to provide a low latency connection.

Kh3nsu commented 3 years ago

Ohhhh Alex, I found another thing. Like I changed the behaviour what should happen when the stream stops. I changed it to "Turn Off" but nothing happens when I stop the stream. Like the lettering under the name of the Entertainment Area disappears an reappears again when I start or stop the stream but the lights wont turn off :(

alexyao2015 commented 3 years ago

Yeah that's a feature that isn't currently supported yet

Kh3nsu commented 3 years ago

Ok :D Is there any way to intercept HomeAssistant when the entertainment stream stops? It is noted in the logs of the addon, is there an event which is sent to HomeAssistant?

And I wanted to thank you guys so much for developing this addon :D

Kvanr23 commented 3 years ago

I am using Esphome for my led strip and it does connect and setup/works correctly, with no delays when using it as 1 light. However, I partitioned my led strip into 5 lights as well, and when I try to create an entertainment zone with those 5 instead of the 1 strip, I get the same delays as WolfsWelpe.

marcelveldt commented 3 years ago

We will look into addressing esphome lights directly on UDP but for now we'll have to do with the current implementation. Entertainment mode sends a very high load of light commands to the lights and both HA as lights have to cope up with that. In the emulated_hue.json you can set the throttle setting for each light. For example set it to 500 (=500ms) for your lights and see if that makes a difference

Kh3nsu commented 3 years ago

Ok I will give it a try. So maybe could you send an event to HomeAssistant when the Entertainment Stream start or stop? That would help me to do a few automations without the indirect way through the addon logs if it is not too much effort.

marcelveldt commented 3 years ago

OK, I'll add an event.

alexyao2015 commented 3 years ago

There is an open request for an event in #64 btw

Kh3nsu commented 3 years ago

I just got a new Error: https://pastebin.com/3Rh4YPB5

Well I did this: I connected Razer Synapse and all worked fine, I restarted my PC so maybe Razer Synapse didnt disconnect properly from the Hue Bridge, now Razer Synapse is not able to connect again (Or maybe it connects but the entertainment thing cannot startup again idk), only if I restart the Addon it is able again.

If I disconnect the Hue Bridge in Razer Synapse it is working fine and it is able to connect again.

alexyao2015 commented 3 years ago

As of 0.2.1, this issue is now fixed! 🎉

If you have any other issues, please open a new issue/discussion.