twrecked / hass-aarlo

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

:question: ❓ Trying to create an automation that displays a snapshot. Aarlo keeps showing previous/delayed snapshot. How do I fix? #468

Open fun4stuff opened 3 years ago

fun4stuff commented 3 years ago

Here is my automation yaml code: `alias: driveway stream to google display description: '' trigger:

What am I doing wrong? thanks!

edit:

it's weird: when i test out ' - service: aarlo.camera_request_snapshot_to_file' under developer options, it takes the snapshot immediately. But when I have it as part of an automation it's delayed,

fun4stuff commented 3 years ago

I think i got this working with the following configuration.yaml :

aarlo: username: !secret arlo_username password: !secret arlo_password user_agent: apple recent_time: 10 stream_snapshot: True refresh_devices_every: 1 stream_timeout: 120 reconnect_every: 90 stream_snapshot_stop: 3

twrecked commented 3 years ago

That might work. The problem is the Arlo back end isn't very consistent so a snapshot might take 2 seconds one time and 10 the next. I've even seen it where snapshots just stop working until I reboot the camera. The official Arlo web interface shows the same behavior and there is nothing I can do about this.

Having said that...

aarlo will fire an event, the aarlo_snapshot_ready event, after it saves the new snapshot. It has a two parameters entity_id you can use to identify the camera and file which points to the file. You could break your automation into 2 pieces, one to create the snapshot and the next one to react when the event comes in.

fun4stuff commented 3 years ago

Thanks for your awesome integration, btw.

I figured it was on their end. Yes I ended up dividing the automation into 2 steps. It's weird as it's been working perfectly for my front door camera but keeps sending the old snapshot for the driveway camera and automations are the exact same.

I was using 'aarlo_snapshot_updated' thought since it said 'aarlo_snapshot_ready' was depreciated. It's weird that the driveway camera still sends the old image even when triggered by 'aarlo_snapshot_updated'.

edit: It does appear that 'aarlo_snapshot_ready' is working better for my drivewat camera.

twrecked commented 3 years ago

I might have to hold off on that deprication for now...

I'm out and about now but I'll might have a more generic solution. I'll post it later.

Steve

On Sat., Jul. 10, 2021, 10:41 fun4stuff, @.***> wrote:

Thanks for your awesome integration, btw.

I figured it was on their end. Yes I ended up dividing the automation into 2 steps. It's weird as it's been working perfectly for my front door camera but keeps sending the old snapshot for the driveway camera and automations are the exact same.

I was using 'aarlo_snapshot_updated' thought since it said 'aarlo_snapshot_ready' was depreciated. It's weird that the driveway camera still sends the old image even when triggered by 'aarlo_snapshot_updated'.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/twrecked/hass-aarlo/issues/468#issuecomment-877648658, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHJU6RH24JDSMNN3VOT6ULTXBL2TANCNFSM5ADH6IMQ .

fun4stuff commented 3 years ago

thanks! seems to be working. I'll keep testing throughout the next couple days.