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

slow reaction time for light changes #21

Closed
vangoft opened this issue Mar 22, 2024 · 5 comments
Closed

slow reaction time for light changes #21

vangoft opened this issue Mar 22, 2024 · 5 comments
Assignees

Comments

@vangoft
Copy link

vangoft commented Mar 22, 2024

I am using groups of lights. When I reduce the brightness of those groups there is a notable and tbh kinda annoying delay in dimming/turning on/off the lights using this add on. When I use the IKEA Home Smart app the lights react almost with no noticeable latency.

Is there some kind of delay coded into the HA addon to not stress the hub with too fast incoming requests? If so, is it possible to reduce it somehow? I believe the hub can handle requests much faster than that.

Here's a video of the reaction time:
https://github.com/sanjoyg/dirigera_platform/assets/12232058/f733279b-8db9-4854-8f3e-af99a283107a

@sanjoyg
Copy link
Owner

sanjoyg commented Mar 23, 2024

There is no throttling in the code or the downstream library. The challenge I think is that all the functions are sync functions. I will start working on the async and then release which should hopefully fix this issue.

@sanjoyg
Copy link
Owner

sanjoyg commented Apr 9, 2024

@slajob would you be kind enough to try the new branch async_calls to test if the integration is working. I would then merge it to the main branch. It switches to async calls to fix this issue

@slajob
Copy link
Collaborator

slajob commented Apr 9, 2024

Hey I reviewed it and it works better! Some video for comparison with similar setup like @acces90. I created group for kitchen main light and hood light and the differences are visible to the naked eye (And synchronous movie had to be trimmed due to big latency and video exceed allowed 10MB file 😅):

Synchronous:
https://github.com/sanjoyg/dirigera_platform/assets/33373409/f9699164-1104-4600-8bba-7969caf84da8

Asynchronous:
https://github.com/sanjoyg/dirigera_platform/assets/33373409/2e68698f-0a5d-427d-bb3a-ec147a70b2a9

I didn't noticed any errors in my HA logs, so @sanjoyg you can create a PR 🥳

@sanjoyg
Copy link
Owner

sanjoyg commented Apr 9, 2024

@slajob thank you!

@acces90 do try the latest release

@vangoft
Copy link
Author

vangoft commented Apr 10, 2024

Waaaay better, difference like day and night! Thank you <3

@vangoft vangoft closed this as completed Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants