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

Add Home Assistant Lights support #918

Closed
satgit62 opened this issue Aug 4, 2024 · 6 comments · Fixed by #1014
Closed

Add Home Assistant Lights support #918

satgit62 opened this issue Aug 4, 2024 · 6 comments · Fixed by #1014

Comments

@satgit62
Copy link

satgit62 commented Aug 4, 2024

Feature request

I think implementing a native Home Assistant API LED hardware would be a great addition for Home Assistant users. Especially for those that have registered RGB LED lamps, via ZigBee USB sticks, and don't have a Philips Hue Bridge. Yes, I know that you can address Hue lamps in HyperHDR as separate instances directly via the Hue Bridge, but not everyone uses the Hue, but ZigBee USB adapters.

What problem does this feature solve?

This would make it possible to use all ZigBee RGB LED lamps registered in Home Assistant in HyperHDR. This would also solve the problem of using workarounds such as emulating the Hue Bridge in Home Assistant.

What does the proposed API look like?

The REST API of Home Assistant is well described. It can be found at: https://developers.home-assistant.io/docs/api/rest/

How should this be implemented in your opinion?

For each instance, it should be possible to select an entity for a single lamp in the LED hardware setup, taking into account the IP address, port, and authorization token of the Home Assistant.

Homeassistant

Are you willing to work on this yourself?

I could test everything and compile it for other platforms like webOS and post the results here.

I mention all this because a first Home Assistant implementation in Hyperion.NG I could successfully compile for LG webOS and the results are acceptable for first try. See: hyperion-project/hyperion.ng#1763

Since most of the users I know are HyperHDR users, I decided to ask them if they would also make it available for HyperHDR.

Thank you in advance.

@thomastunc
Copy link

I would be willing to work on this. Since there is already an implementation for Hyperion.NG, it shouldn't be too difficult to implement it for HyperHDR.
I just need to know how to contribute to the project, I haven't seen any info about that in the readme.

@awawa-dev
Copy link
Owner

awawa-dev commented Nov 27, 2024

Hi @thomastunc
You create a HyperHDR fork, implement new functionality and when it's ready you submit a PR. I just want to note that HyperHDR currently has a different LED driver model, which you can see from Skydimo's implementation: c2e3524 This should give you an idea which files you need to create/update. But the fact that Hyperion.NG copied Skydimo as a separate device later (as it was in HyperHDR from the beginning and not as it was as a subtype of Adalight in their first implementation) does not mean that we want to have a clone of their solutions in HyperHDR.

@awawa-dev
Copy link
Owner

The feature has been implemented and merged. Here are the specific unique features of the HyperHDR implementation for which you can choose it:

  • Proper web wizards including scanning of devices & lamps capabilities
  • Support for dynamic and constant brightness
  • Support for RGB and HSL model
  • Support for saving & restoring state of lamps

Manual:
https://github.com/awawa-dev/HyperHDR/wiki/Home-assistant-lights

It would be nice to get feedback on how it works for you.

@satgit62
Copy link
Author

Hello @awawa-dev,
Thank you for implementing the Home Assistant.
They must have come up with this as a Christmas present for the users. 🎅👍 I will test it and report back on my findings.

@develnets
Copy link

This is a great feature, but in my case I encounter huge delay - the latency between the image and lights updating color is at least 5 seconds. This is for both wifi and zigbee lights added to Home Assistant, all 5 added lights just changes color instantly after ca. 5 seconds after the color on screen changes. Tested by using full color screen video and pausing. Does it come from home assistant limitations, or is there a way to optimize it?

@awawa-dev
Copy link
Owner

usually a zigbee controller such as zigbee2mqtt is written with the intention of having a guarantee that the message will be delivered and not at maximum efficiency counting with some losses. At the same time they have to control the state of the network because usually communication is more sporadic and so different than in the case of streaming. In addition, in the case of zigbee2mqtt there are other problems resulting from the architecture that reduce performance (e.g. only one thread in Type Script), but as I already mentioned they have different priorities so from this point of view it is not a bug.

you can try our slightly optimized direct communication using our zigbee2mqtt fork: #1024 where queued colors shouldn't grow infinitely. it's still experimental.

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

Successfully merging a pull request may close this issue.

4 participants