twrecked / hass-aarlo

Asynchronous Arlo Component for Home Assistant
GNU Lesser General Public License v3.0
383 stars 77 forks source link

Snapshot switches sometimes get stuck on #846

Open brenmcg57 opened 9 months ago

brenmcg57 commented 9 months ago

I have been using aarlo to do tons of things the terrible arlo dashboard cannot do, including scheduled snapshots of my several Essential Spotlight cameras. I am on the current stable of 0.7.4.2.

The method I've been using to trigger snapshots is using the switch.aarlo_snapshot_cameraname entity that appears for each camera. I messed with the other few services that have snapshot in their name, like Arlo Camera Support: camera_request_snapshot without success.

The switch defaults to the off position. When I turn it on via gui or automation, it turns on for a few seconds then turns itself off again. The snapshot image for that camera updates in my HA dashboard a few seconds after that.

Sometimes the switch does not turn itself back off. It happens inconsistently and does not seem related to any specific camera. If I try to turn it off using the gui switch object on my HA dashboard, it will slide to the off position very briefly then back on. To make it turn off, I have to run my automation again that tells the switch to turn on. It then successfully turns off a few seconds later.

Is the switch.aarlo_snapshot_cameraname entity the best way to trigger a snapshot?

twrecked commented 9 months ago

I'll take a look. It should timeout if everything goes wrong and recover. Guess that mechanism is failing.

brenmcg57 commented 9 months ago

FYI, my automation originally triggered snapshots for all 6 of my cameras at once. I speculated that Arlo's API didn't like that so I staggered them by 10 seconds. It did not seem to make a difference.

twrecked commented 9 months ago

And to answer your question, the switch is ok to use. The other services should work as well, it all ends up at the same mechanism. I'll double check that functionality as well.

I've just been working on the alpha stuff and my plan then was to tidy up the streaming/snapshot stuff. So I'll definitely look at this.

brenmcg57 commented 9 months ago

I've been reading through old threads about the challenges with snapshots and how a lot of the inconsistency is on the Arlo side. Mine randomly fail to refresh the picture in the HA dashboard. Very annoying. I'm looking for a way to detect that failure and try again.