hass-aarlo icon indicating copy to clipboard operation
hass-aarlo copied to clipboard

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

Open fun4stuff opened this issue 3 years ago • 5 comments

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

  • platform: state to: 'on' entity_id: binary_sensor.aarlo_motion_driveway condition: [] action:
  • service: aarlo.camera_request_snapshot_to_file data: entity_id: camera.aarlo_driveway filename: /config/www/driveway.jpg
  • delay: hours: 0 minutes: 0 seconds: 3 milliseconds: 0
  • service: media_player.play_media data: media_content_id: http://xxx:8123/local/driveway.jpg media_content_type: image/jpg target: entity_id: media_player.kitchen_display mode: single `

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 avatar Jul 09 '21 18:07 fun4stuff

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

fun4stuff avatar Jul 10 '21 02:07 fun4stuff

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.

twrecked avatar Jul 10 '21 12:07 twrecked

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.

fun4stuff avatar Jul 10 '21 14:07 fun4stuff

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 .

twrecked avatar Jul 10 '21 15:07 twrecked

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

fun4stuff avatar Jul 10 '21 16:07 fun4stuff