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

Camera only records once (and deprecated snapshot)

Open rdorys opened this issue 2 years ago • 8 comments

Hi, I'm using a Arlo 4 pro without cloud suscription and am having trouble with snapshots and recordings.

Using the service Camera : Take Snapshot, the image is never updated.

All the services :

  • aarlo.camera_request_snapshot -> : 'Device[{}] is not allowed for taking snapshot as it requires paid subscription for cloud storage'
  • aarlot.camera_request_shapshot_to_file -> Same as Camera Take Snapshot (works but image isn't updated)
  • aarlo.camera_request_video_to_file -> Unknown error (because I have no recording on cloud to download I guess)
  • aarlo.camera_start_recoding -> : 'Device[{}] is not allowed for taking snapshot as it requires paid subscription for cloud storage'

For capturing video, I'm using camera.record service.

image

It works very well (with very decent latency) but it only works once, and I need to restart HA in order to record again.

I got the following error when I try to record without restarting HA :

Logger: homeassistant.components.stream.stream.camera.aarlo_cameraterrassenord Source: components/stream/__init__.py:347 Integration: Stream (documentation, issues) First occurred: 08:18:28 (7 occurrences) Last logged: 08:24:58

Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsps://arlostreaming428-z1-prod.wowza.arlo.com:443/vzmodulelive/ABP2217CA20DE_1653568213536?egressToken=3e1ffd2f_eba4_46aa_844f_769096fd71cd&userAgent=iOS&cameraId=ABP2217CA20DE_1653568213536&txnId=be!49f8d27b-5f4c-432f-a599-0de2724dc7fe

I don't know why user agent is IOS in the request when it's supposed to be "arlo" according to the docs.

I also have a LOT of

2022-05-26 06:49:32 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-05-26 06:49:32 DEBUG (ArloEventStream) [pyaarlo] topcs= [] 2022-05-26 06:49:33 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-05-26 06:49:33 DEBUG (ArloEventStream) [pyaarlo] topcs= [] 2022-05-26 06:49:35 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-05-26 06:49:35 DEBUG (ArloEventStream) [pyaarlo] topcs=

In my log file.

I'm on "version": "0.7.2b8",

And my config is :

aarlo: username: [email protected] password: myscret refresh_devices_every: 2 stream_timeout: 120 tfa_source: imap tfa_type: email tfa_host: imap.orange.fr tfa_username: [email protected] tfa_password: mysecret save_updates_to: /config/media save_media_to: "/config/media/${T}" stream_snapshot: True snapshot_timeout: 15 user_agent: linux media_retry: - 5 - 15 - 25 snapshot_checks: - 1 - 5

alarm_control_panel:

  • platform: aarlo away_mode_name: armed home_mode_name: home night_mode_name: night trigger_time: 30 alarm_volume: 8

binary_sensor:

  • platform: aarlo monitored_conditions:
    • motion
    • sound
    • connectivity

camera:

  • platform: aarlo

light:

  • platform: aarlo

media_player:

  • platform: aarlo switch:
  • platform: aarlo siren: True all_sirens: True snapshot: True doorbell_silence: True siren_volume: 1 siren_duration: 10

logger: default: info logs: pyaarlo: debug custom_components.aarlo: debug custom_components.aarlo.camera: debug

Any Idea ?

Thx a lot !

[EDIT] I found in the log that somehow, the Stream Record service try to reach each time the same rtsps url. Is there a way to empty stream cache ? or force aarlo integration to reload from scratch ?

Restarting HA after each detection is not an acceptable workaround for me.

rdorys avatar May 26 '22 06:05 rdorys

I have the same problem. The camera.record service works one time, then no work again. First, I thought that the problem was the permissions to write the file, but I see that it is not.

SolarNeron avatar May 31 '22 21:05 SolarNeron

Sorry for the delay getting back.

First, thanks for the looking into this, I'm thinking HA re-using the URL is a big hint. I'll take a look.

twrecked avatar Jun 01 '22 12:06 twrecked

I have also recognised that my daily snapshots doesn't update and only reuses old ones. I have Arlo Ultra cameras and Im using the cloud subscription. I use the aarlo.camera_request_shapshot_to_file service for snapshoting. I dont find any error statements in the logs though. Using current version of the aarlo component and HA v2022.6.4

ismarslomic avatar Jun 11 '22 21:06 ismarslomic

@ismarslomic Thx for your message. It's really weird as I can 'hear' the Snapshot on the camera (a little 'clic'), but it does not update everytime.

You should try the 'camera.take_snaphot' service in home assistant. It could be a workaround for you.

Can you execute the camera.record service twice with the cloud subscription without the error?

rdorys avatar Jun 12 '22 07:06 rdorys

I tried using the camera.snapshot service, but same issue there. Old snapshot where used. I could trigger this service multiple times without any error (ref your last question).

ismarslomic avatar Jun 13 '22 10:06 ismarslomic

I have the same issue too. Have tried the aaro snapshot and camera snapshot service. Makes no difference. Script executes with no errors but no jpg is created or saved.

andyrowe247 avatar Jul 12 '22 02:07 andyrowe247

I am having the same issue here using wired video doorbell. Device[{}] is not allowed for taking snapshot as it requires paid subscription for cloud storage. Also live stream only works once after restarting HA. Motion detection is always "clear". Both SSE and MQTT backends are acting the same.

Edit: After showing it requires paid subscription for cloud storage when applying aarlot.camera_request_shapshot_to_file, I do see snapshot in Arlo app get updated, but the saved file from HA is still the old one.

Here is the entire log of such action: 2022-07-13 16:23:03 INFO (SyncWorker_2) [custom_components.aarlo.camera] camera_request_snapshot_to_file service called 2022-07-13 16:23:03 INFO (SyncWorker_2) [custom_components.aarlo.camera] camera.aarlo_front_doorbell snapshot(filename=Template("/config/www/tmp/snap.jpg")) 2022-07-13 16:23:03 DEBUG (SyncWorker_2) [pyaarlo] _start_stream2::reqs='set()',local='{'snapshot'}',remote='set()' 2022-07-13 16:23:04 DEBUG (SyncWorker_2) [pyaarlo] url=https://arlostreaming16364-z1-prod.wowza.arlo.com:80/stream/XXXXXXXXXXXXXXX.mpd?egressToken=XXXXXXXXXXXXXXXX&userAgent=web&cameraId=XXXXXXXXX&txnId=XXXXXXXXXXXX 2022-07-13 16:23:04 DEBUG (SyncWorker_2) [pyaarlo] waiting for stream 2022-07-13 16:23:05 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:05 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:07 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:07 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:10 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:10 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:12 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:12 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:15 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:15 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:17 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:17 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:19 DEBUG (SyncWorker_2) [pyaarlo] request_snapshot::reqs='{'snapshot'}',local='{'snapshot'}',remote='set()' 2022-07-13 16:23:19 DEBUG (SyncWorker_2) [pyaarlo] set:ArloCamera/XXXXXXXXXXXXXXX/activityState=fullFrameSnapshot 2022-07-13 16:23:19 DEBUG (SyncWorker_2) [custom_components.aarlo.camera] callback:Front Doorbell:activityState:fullFrameSnapshot 2022-07-13 16:23:19 DEBUG (SyncWorker_2) [custom_components.aarlo.camera] clearing out stream variable 2022-07-13 16:23:19 DEBUG (SyncWorker_2) [pyaarlo] streaming/recording snapshot 2022-07-13 16:23:20 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:20 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:20 WARNING (ArloBackgroundWorker) [pyaarlo] error in response={'success': False, 'data': {'error': '2027', 'message': 'The request for recordings is invalid.', 'reason': 'Device[{}] is not allowed for taking snapshot as it requires paid subscription for cloud storage', 'details': 'XXXXXXXXXXX'}} 2022-07-13 16:23:50 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:50 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:52 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:52 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:55 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:55 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:23:57 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:23:57 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:24:00 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:24:00 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:24:02 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-13 16:24:02 DEBUG (ArloEventStream) [pyaarlo] topcs= 2022-07-13 16:24:04 DEBUG (ArloBackgroundWorker) [pyaarlo] _stop_snapshot::reqs='set()',local='{'snapshot'}',remote='set()' 2022-07-13 16:24:04 DEBUG (ArloBackgroundWorker) [pyaarlo] _stop_stream::reqs='set()',local='set()',remote='set()' 2022-07-13 16:24:04 DEBUG (SyncWorker_2) [pyaarlo] finished snapshot 2022-07-13 16:24:04 DEBUG (ArloBackgroundWorker) [pyaarlo] removing streaming activity state 2022-07-13 16:24:04 DEBUG (ArloBackgroundWorker) [pyaarlo] _event::idle::reqs='set()',local='set()',remote='set()' 2022-07-13 16:24:04 DEBUG (ArloBackgroundWorker) [pyaarlo] snapshot finished, re-signal real state 2022-07-13 16:24:04 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloCamera/XXXXXXXXXXXX/activityState=fullFrameSnapshot 2022-07-13 16:24:04 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.camera] callback:Front Doorbell:activityState:fullFrameSnapshot

shangli123 avatar Jul 13 '22 22:07 shangli123

Having the same issue as everyone else in this thread. Seems the camera can stream once after reboot (I've noticed a stutter when the streamfirst starts to play). On stop, I get this log:

Logger: homeassistant.components.stream.stream.camera.aarlo_front_door Source: components/stream/init.py:416 Integration: Stream (documentation, issues) First occurred: 11:40:25 PM (1 occurrences) Last logged: 11:40:25 PM

Error from stream worker: Stream ended; no additional packets

On pressing play again, I get about one second of playback, then I get this log:

Logger: homeassistant.components.stream.stream.camera.aarlo_front_door Source: components/stream/init.py:416 Integration: Stream (documentation, issues) First occurred: 11:42:55 PM (1 occurrences) Last logged: 11:42:55 PM

Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsps://arlostreaming2235-z2-prod.wowza.arlo.com:443/vzmodulelive/XXXXXXXXXXXXXXXXXX?egressToken=XXXXXXXXXXXXXXXXXXXXX&userAgent=iOS&cameraId=XXXXXXXXXXXXXXXXXXX&txnId=be!XXXXXXXXXXXXXXXXXXXXXXX

Thanks for all of your work on this integration!

kylepyke avatar Aug 25 '22 04:08 kylepyke