Skip to content
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

Cannot start stream on Wireless Video Doorbell 2k #1014

Open
Deltus7529 opened this issue Nov 21, 2024 · 5 comments
Open

Cannot start stream on Wireless Video Doorbell 2k #1014

Deltus7529 opened this issue Nov 21, 2024 · 5 comments

Comments

@Deltus7529
Copy link

Deltus7529 commented Nov 21, 2024

Hello,

I've got the Wireless Video Doorbell 2k without a subscription. I tested it for 2 weeks and everything seems to be working fine but not the live stream view.
I didn't find my device in the compatibility list, so I hope I can help you to support this new model.

I tried various configuration to start the stream on the glance card, but it never start. The card is able to get the lastIlmage if I start the stream from the Android or Web App. I don't have the paid subscription so I cannot test the recording or snapshots.

Home Assistant version

  • Home Assistant : 2024.11.2
  • Aarlo : 0.8.1.9

Arlo Model info :

  • Wireless Video Doorbell 2k
  • AVD4001Aer1.3
  • Firmware : 1.5.0_1059_eb10395

Log

ERROR (stream_worker) [homeassistant.components.stream.stream.camera.aarlo_sonnette] Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input, rtsps://arlostreaming19879-z1-prod.wowza.arlo.com:443/vzmodulelive/AGG141BM00AC5_1732204683134?egressToken=8742ca04_109d_446f_94ea_7bf640e9ede6&userAgent=iOS&cameraId=AGG141BM00AC5_1732204683134&optimization=false&txnId=FE!f4d7fa32-265f-4654-8ab9-6d93bcce5e9e)

Reverse engeneering

I've found this endpoint when starting the stream from the webapp.
I hidded things who looks linked to my account with [xxx]. If not sensitive and needed, tell me :)

  • eventId is changing to each new stream.
  • uniqueId is always the same to each new stream.

Headers

Request URL:
https://myapi.arlo.com/hmsweb/users/devices/sipInfo/v2?cameraId=AGG141BM00AC5&modelId=AVD4001A&uniqueId=[xxx]&eventId=FE!effab55f-3b7d-491d-a5fc-00320f01ba1f&time=1732207639600

Payload

cameraId=AGG141BM00AC5&modelId=AVD4001A&uniqueId=[xxx]&eventId=FE!effab55f-3b7d-491d-a5fc-00320f01ba1f&time=1732207639600

Preview

{ "data": { "from": "[xxx]_server", "to": "[xxx]", "action": "is", "resource": "sipDetails", "transId": "[xxx]", "sipCallInfo": { "id": "Conference_[xxx]", "calleeUri": "sip:AGG141BM00AC5_1732209201071_ee6cc1b8f77e48b3ad58e30c0c96f825D@livestream-z1-prod.arlo.com:443", "domain": "livestream-z1-prod.arlo.com", "port": 443, "conferenceId": null, "password": "[xxx]", "deviceId": "AGG141BM00AC5" }, "iceServers": { "uSessionId": "[xxx]", "data": [ { "port": "19302", "domain": "relay02-z1-prod.ar.arlo.com", "type": "stun" }, { "credential": "[xxx]", "port": "443", "domain": "relay02-z1-prod.ar.arlo.com", "transport": "tcp", "type": "turn", "username": "1732209211:[xxx]" }, { "credential": "[xxx]", "port": "443", "domain": "relay02-z1-prod.ar.arlo.com", "transport": "udp", "type": "turn", "username": "1732209211:[xxx]" } ] } }, "success": true }

@rrowe629
Copy link

rrowe629 commented Nov 22, 2024

I'm seeing this same behavior with this device and version 0.8.1.9. Also saw it with the previous version. Model info, firmware, etc. same as above.

Updating this post to note that I can successfully play the last recorded event, just not the live view. Card configuration is simple:

  • type: custom:aarlo-glance
    entity: camera.aarlo_front_doorbell
    name: Doorbell
    image_top:
    - name
    - date
    - stream

@twrecked
Copy link
Owner

@Deltus7529 Firstly, thank you for posting a decent bug report, most of the ones I get are "it doesn't work" with no other information, so that makes a nice change.

Arlo does some weird things with the streams, it returns a rtsps URL but the underlying stream could be HLS or mpeg-dash. Start by changing your user_agent to one of the Apple or Linux specific ones.

You can see the details here:

https://github.com/twrecked/hass-aarlo/blob/master/README-advanced.md#user-agents

@Deltus7529
Copy link
Author

@twrecked Thanks for your help.

I tried different user_agent and config but I'm just able to get the lastImage and not the live-stream.
Also, I don't know if that's interesting but when I start the stream, I don't necessarily got the error message that I posted on the log.
For example here, the stream is started and it"s stuck on 'start_stream:' :

Logs

2024-11-24 18:13:12.035 DEBUG (ArloBackgroundWorker) [pyaarlo] AGG141BM00AC5: turning recent ON for Sonnette
2024-11-24 18:13:12.035 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.sensor] callback:Recent Activity Sonnette:recentActivity:True
2024-11-24 18:13:12.035 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.camera] callback:Sonnette:recentActivity:True
2024-11-24 18:13:12.036 DEBUG (ArloBackgroundWorker) [pyaarlo] AGG141BM00AC5: Sonnette DOORBELL got one mediaUploadNotification
2024-11-24 18:14:08.861 DEBUG (MainThread) [custom_components.aarlo.camera] library+99
2024-11-24 18:14:10.587 DEBUG (MainThread) [custom_components.aarlo.camera] stream_url for sonnette
2024-11-24 18:14:10.590 DEBUG (SyncWorker_2) [pyaarlo] AGG141BM00AC5: _start_stream::reqs='set()',local='{'streaming'}',remote='set()'

Then I click on stop :

2024-11-24 18:15:25.613 DEBUG (MainThread) [custom_components.aarlo.camera] stop_activity for sonnette
2024-11-24 18:15:25.709 DEBUG (SyncWorker_16) [pyaarlo] AGG141BM00AC5: got a stream/recording stop
2024-11-24 18:15:25.709 DEBUG (SyncWorker_16) [pyaarlo] AGG141BM00AC5: queueing update in 5
2024-11-24 18:15:25.709 DEBUG (SyncWorker_16) [pyaarlo] AGG141BM00AC5: queueing update in 15
2024-11-24 18:15:25.710 DEBUG (SyncWorker_16) [pyaarlo] AGG141BM00AC5: queueing update in 25
2024-11-24 18:15:25.710 DEBUG (SyncWorker_16) [pyaarlo] AGG141BM00AC5: turning recent ON for Sonnette
2024-11-24 18:15:25.710 DEBUG (SyncWorker_16) [custom_components.aarlo.sensor] callback:Recent Activity Sonnette:recentActivity:True
2024-11-24 18:15:25.713 DEBUG (SyncWorker_16) [custom_components.aarlo.camera] callback:Sonnette:recentActivity:True
2024-11-24 18:15:25.714 DEBUG (SyncWorker_16) [pyaarlo] AGG141BM00AC5: removing streaming activity state
2024-11-24 18:15:25.714 DEBUG (SyncWorker_16) [pyaarlo] AGG141BM00AC5: _event::idle::reqs='set()',local='set()',remote='set()'

And the lastImage get updated (but not always).

For the reference, here's my configuration.yaml. I forgot to post it. Maybe I screwed on something.
Also, I'm running HomeAssistant on a Raspberry Pi 4 through Docker.

configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
stream:
media_player:
browser_mod:
ffmpeg:
logger:
  default: info
  logs:
    pyaarlo: debug
    custom_components.aarlo: debug
aarlo:
    password: !secret "xxx"
    username: "xxx"
    user_agent: linux
    verbose_debug: true

And the card :

type: custom:aarlo-glance
entity: camera.aarlo_sonnette
name: Sonnette
image_top: name,status
image_bottom: stream,battery,signal
image_view: direct
image_click: stream

Tell me if you need different logs or testing. :)

@yongfg
Copy link

yongfg commented Dec 21, 2024

From my testing, the stream url only works when it looks like:

rtsps://arlostreaming20527-z2-prod.wowza.arlo.com:443/arlomotionrecord/AF523B77DDE5E_1734811658706?egressToken=1feb1b73_6766_44a5_ae7d_178aea6b716a&userAgent=iOS&cameraId=AF523B77DDE5E_1734811658706&optimization=false&txnId=FE!363ee33b-028e-41ec-9247-8c34b208943a&watchalong=true

But not working when it's from vzmodulelive

rtsps://arlostreaming20642-z2-prod.wowza.arlo.com:443/vzmodulelive/AEV246BC00917_1734650374463?egressToken=82d7c91a_7a15_4ab5_ae0a_4c6230d3947c&userAgent=iOS&cameraId=AEV246BC00917_1734650374463&optimization=false&txnId=FE!84ede744-d69a-47a5-96dd-825af43f2d62

Whenever I try to stream from this vzmodulelive url with ffmpeg, Im getting:

Invalid data found when processing input

I've tried using different user_agent and it seems like when I use user_agent='arlo', I'm getting fewer vzmodulelive stream url but it still happens from time to time
@Deltus7529 Are you also experiencing something similar?

@Deltus7529
Copy link
Author

@yongfg for me, it always return the vzmodulelive, regardless of the user agent I choose. Tried in the card config & in the configuration.yaml
Maybe Arlo adapt the stream url depending also on your location. I'm located in Belgium.

ERROR (stream_worker) [homeassistant.components.stream.stream.camera.aarlo_sonnette] Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input, rtsps://arlostreaming16312-z1-prod.wowza.arlo.com:443/vzmodulelive/AGG141BM00AC5_1735297211136?egressToken=0fa4ed46_3ba2_4a23_bf65_c30b37b6f923&userAgent=iOS&cameraId=AGG141BM00AC5_1735297211136&optimization=false&txnId=FE!658dc3f6-ac18-4f58-8159-56a8c99dbaeb)

I've sort of given up and now using browser_mod to display MyArlo in a new PopUp window, with the Ding event, and Puppeteer to autostart the stream (trigger a click on the play button) and clean some DOM elements.
You can also do this with a Chrome extension instead of Puppeteer, but I need Puppeteer because I'm running my HA dashboard on a RaspberryPi with touchscreen and need responsive movements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants