-
Notifications
You must be signed in to change notification settings - Fork 99
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
latency for occupancy sensors? #66
Comments
What automation are you trying to use it in? I added the original implementation of occ sensor subscription, and while doing that work I found that I did, however, have issues with latency when using occupancy sensors in complex automations with conditional steps. The logs from There were some things I did to streamline and simplify the automation that improved latency and the lighting experience both for Caseta and Home Assistant (created scenes to trigger in Caseta instead of having Home Assistant set light levels for the two lights individually, use sun elevation instead of sunset/sunrise, and reduced the size of the conditionals), but it's still taking around 0.5 - 1 second. But I think the latency hit ultimately comes from HA picking up the automation on the event loop, doing template evaluations, and then triggering the events. I don't see anything pylutron_caseta can do to improve latency for occ sensors. Can you share the automation (YAML) with the unacceptable latency? I may be able to offer some suggestions for reducing latency. |
Thanks, I found a thread a few days ago about HA automation performance issues, something about the database writes but now I've lost it! I am testing with just a single automation at the moment writing to the logs:
What I need to do is timestamp the moment pylutron_caseta receives the new state. Can I set debug on this to test? |
If you configure the Home Assistant logging to output debug messages from pylutron_caseta.leap you should see all the messages as they are received. |
You can also use the In addition to turning on lutron_caseta logging as @mdonoughe recommended, this should give you plenty to investigate with. |
@mdonoughe Okay I did debugging on lutron_caseta and that didn't really show me anything, so I'll do "pylutron_caseta.leap" and see where that gets me... @swails Thanks, I think though I have good idea of the time in which the occupancy state is being recorded in HA so I need to work backward to when it is being delivered, unless you think "trigger.to_state.last_updated" would not show me the true time in which it was received? |
Hi, I'm trying to diagnose an issue where the occupancy sensor update in HA is 0-3 seconds delayed. I logged the trigger time and action time in HA and found only .03 second delay so my next thought is that the update from the smart bridge might be delayed or picked up late, is there some logging I can do to diagnose this?
Reading the docs on HA website I was under the impression this should be almost instantaneous.
The text was updated successfully, but these errors were encountered: