Arlo: replacement pyarlo module

Awsome!! Thanks!! works fine!

@collse can you try the master branch? It should have a wired attribute.

@sherrell - damn that was quick - seems to work, minor comment on that - I run it purely wired - with no battery installed, maybe that is why its currently reporting wired: false - could be that this is as intended

I didn’t try without a battery. I’ll double check that.

Can you try again now? It should handle:

  • battery only
  • battery + charger
  • charger (wired) only
1 Like

@sherrell damn dude - you are on fire … when does this get into the official repository? Its long time overdue …

oh btw - working fine - now I just need to change my templates to reflect it - awesome work

Hello everyone (first post here),

Prereqs:
I’m using virtualenv, aarlo-glance card, 0.91.4 of HA, the latest master branch of twrecked/hass-aarlo.git, I have the original arlo cameras and arlo pro cameras, installed the following:
source your-env/bin/activate
sudo apt install libavformat-dev
sudo apt install libavdevice-dev
pip install av==6.1.2

and I added stream: to my configuration.yaml file

I cannot get streaming to work using the play button. When I click on the play button it starts to stream and just continues with the spinning circle. In the logs I noticed this exception:

*Apr 21 20:46:45 BigEPi hass[25070]: 2019-04-21 20:46:45 INFO (MainThread) [homeassistant.components.stream] Started stream: rtsps://vzwow414-z2-prod.ar.arlo.com:443/vzmodulelive/{BLANKEDOUT}?egressToken={BLANKEDOUT}&userAgent=iOS&cameraId={BLANKEDOUT}*
*Apr 21 20:46:55 BigEPi hass[25070]: Exception in thread stream_worker:*
*Apr 21 20:46:55 BigEPi hass[25070]: Traceback (most recent call last):*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner*
*Apr 21 20:46:55 BigEPi hass[25070]:     self.run()*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "/usr/lib/python3.5/threading.py", line 862, in run*
*Apr 21 20:46:55 BigEPi hass[25070]:     self._target(*self._args, **self._kwargs)*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/stream/worker.py", line 49, in stream_worker*
*Apr 21 20:46:55 BigEPi hass[25070]:     container = av.open(stream.source, options=stream.options)*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "av/container/core.pyx", line 275, in av.container.core.open*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "av/container/core.pyx", line 227, in av.container.core.Container.__cinit__*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "av/container/core.pyx", line 129, in av.container.core.ContainerProxy.__init__*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "av/container/core.pyx", line 195, in av.container.core.ContainerProxy.err_check*
*Apr 21 20:46:55 BigEPi hass[25070]:   File "av/utils.pyx", line 105, in av.utils.err_check*
*Apr 21 20:46:55 BigEPi hass[25070]: av.AVError: [Errno 1] Operation not permitted: 'rtsps://vzwow414-z2-prod.ar.arlo.com:443/vzmodulelive/{BLANKEDOUT}?egressToken={BLANKEDOUT}&userAgent=iOS&cameraId={BLANKEDOUT}'*
*Apr 21 20:46:55 BigEPi hass[25070]: 2019-04-21 20:46:55 INFO (MainThread) [homeassistant.components.stream] Started stream: rtsps://vzwow414-z2-prod.ar.arlo.com:443/vzmodulelive/{BLANKEDOUT}?egressToken={BLANKEDOUT}&userAgent=iOS&cameraId={BLANKEDOUT}*

I even tried a different user-agent and got it to use the rtmp stuff, but that also error-ed with some authentication error.

Any ideas or more debug that is needed thanks in advance,
Grinch

Just found this custom integration and I agree with everyone else. This is MUCH better than the standard Arlo component. I have 2 Pros and a baby monitor and would love to help with anything I can.

I do have a question. I notice that during (or after, I’m not sure) a recording, the image for the camera updated. Is there event that triggers on updated image change that I can see in node-red to send a notification? I can seen the event traffic in the pyarlo logs but they do not transfer into home-assistant events.

I’ve also noticed that sometimes the custom component seems to be working but all the front end entities refuse to update. I can see traffic in the packets as well as in my home-assistant log but entities on the front end show old attributes (i.e. thumbnails, alarm state, etc.). Any idea on how to solve this?

@grinch067 It looks like you’ve done everything right but - to be honest - streaming is a bit problematic at the moment. Arlo uses rtsps which needs to be compiled into ffmpeg . A couple of questions:

  • what OS are you using?
  • and what version of ffmpeg does it come with?

@siege36 The image will update after the recording has completed, this happens when Arlo tells the component the image has changed and that change gets signalled back to home-assistant. But I’m not sure that triggers a specific event but the value of the image_source attribute should change to reflect the new capture time. (After a bit of reading, there isn’t a custom event but I should be able to add one, that might help with an issue other people were having, leave it with me.)

And which lovelace card for the front end entities are you using? I’ve noticed there can be delays for things to change but generally everything updates. (And the custom lovelace component was done out of necessity and isn’t the usual area I work in so there might be some areas it can be approved.)

Currently using the aarlo_glance from your repo. It appears everything is working correct with the card. The issue I’m having is that the I can see the packets coming into home_assistant (using packet_dump) but the aarlo devices are not updating to the most recent data.

As I’m typing this, I restarted my Home Assistant instance and it appears to have fixed this issue, although I have done it before and it didn’t seem to fix it and I noticed some connection closures in my logs. I’m wondering if it was just failing to make a connection with arlo’s servers for some reason.

@ sherrell
cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=raspbian
ID_LIKE=debian
HOME_URL="{URL}"
SUPPORT_URL="{URL}"
BUG_REPORT_URL="{URL}"

ffmpeg -v
ffmpeg version 3.2.12-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516

I have a device here running Raspian so I’ll give it a go. But a quick look at ffmpeg and its libraries is showing me support for rtsps. Do you still have ffmpeg options set in configuration.yaml, could you try without?

Woke up this morning and cameras were disconnected again. Found these in the logs over and over. Restarting home assistant and its back working. Not sure whats causing the disconnects:

019-04-23 06:47:26 DEBUG (EventStream) [pyaarlo] (‘Connection broken: IncompleteRead(0 bytes read)’, IncompleteRead(0 bytes read))

A couple of things:

  • connection closures can be normal, Arlo will close the connection approximately every 30 minutes but the Aarlo component will reconnect. How often are you seeing them? The cameras shouldn’t lose state across a reconnent.
  • checking for updates, one thing to look at would be the attributes of the camera. There is an image_source attribute that should change every time a picture update comes in

@sherrell
Hi, i have this set in my configuration.yaml:
stream:
ffmpeg:
camera:
- platform: aarlo
ffmpeg_arguments: ‘-pred 1 -q:v 2’

If i take out the ffmpeg_arguments line - then pressing the ‘play’ icon does nothing :(. I had to add back the line: ‘image_click: play’. I thought the image_click was deprecated and we can now use the ‘play’ keyword?

Here is the config that tries to stream, but I get the same operation not permitted error:
- cards:
- type: ‘custom:aarlo-glance’
show:
- play
- motion
- snapshot
- battery_level
- signal_strength
- captured_today
entity: camera.aarlo_frontarea
top_status: false
name: Front Yard1
top_title: false
image_click: play
card: null

Thanks for trying. I’ll dig out a raspberry PI tonight and give this a go.

The play and image_click:play do different things.

  • The play option adds an icon to the bottom of the screen that will start streaming. It will also flip to the stop icon when streaming has been started elsewhere.
  • image_click:play will start streaming when you click on the image, without it you’ll get the last recorded video playing.

ok thanks for clarifying that, however, clicking the ‘play’ icon doesn’t seem to start the stream anymore :(. I did see it go from the stop icon to the play icon when a snapshot occurs (right after ha restart)
Interesting link here (I might try this later):

@sherrell , have you and @pvizeli connected to discuss potentially getting ha-ffmpeg to support rtsps so that Docker installations (and I presume hass.io) would be able to live stream Arlo feeds (and potentially other cloud-streamed components), as you have managed to do with virtualenv installations?

@sherrell
Looks like it has been reported before with no resolution:
https://www.raspberrypi.org/forums/viewtopic.php?t=221722

@woodmoose
Turns out I can tell you when a snapshot is ready. Are you able to listen for events? The code in the snapshot-event branch will send a aarlo_snapshot_ready when the service call is completed. Care to try it? It will have entity_id and file if you used the snapshot-to-file variant. I don’t know if it will help with the speed - I’m kind of hampered by Arlo - but you’ll know immediately when the image is downloaded.

@jwillaz
I haven’t had chance, thanks to my house, work and family I’ve had something planned every weekend for the last month. I’ll make an effort to get that - and component incorporated - this week.