Arlo: replacement pyarlo module

@ffm777 I’ll keep playing around and see if I’m missing something but I think it needs the ffmpeg in the image tweaking. I use a docker image for my main system so I’d like it working as well.

And, just give it a go. If it fails you’ll see an ffmpeg trace in the logs

First, thanks for all your work on this, it is great!
I updated to the latest code and I am trying to get stream to work. I am running on hassbian and I included the stream component and using linux as the user agent. I created a picture glance card for the camera. When I click on it, I can see from the aarlo glance card it is streaming and I can see in the log it opening the rstp stream to my camera, the arlo glance card will eventually update its snap shot. What I cant see is the video stream, I get a pop up that has the spinning circle.52%20PM

Thats what I get as well in chrome but as I dont use chrome I didnt bother fiddling around with it… doesnt even get this in Safari just a not found placeholder

@stogs @collse I’m seeing the same thing from my docker installation. I get an error like this for both user_agent: linux and no user_agent:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/hass/ha/homeassistant/lib/python3.6/site-packages/homeassistant/components/stream/worker.py", line 53, in stream_worker
    container = av.open(stream.source, options=stream.options)
  File "av/container/core.pyx", line 275, in av.container.core.open
  File "av/container/core.pyx", line 227, in av.container.core.Container.__cinit__
  File "av/container/core.pyx", line 129, in av.container.core.ContainerProxy.__init__
  File "av/container/core.pyx", line 195, in av.container.core.ContainerProxy.err_check
  File "av/utils.pyx", line 105, in av.utils.err_check
av.AVError: [Errno 1313558101] Unknown error occurred: 'rtmps://vzwow01-z1-prod.ar.arlo.com:80/vzmodulelive?egressToken=f525acba_8c94_495b_a4e0_f2ea7889813f&userAgent=web&cameraId=4XXXXXXXXXXXXXXXXXXX' (16: rtmps)

I think now we need to raise the fact that ffmpeg doesn’t support rtmps and rtsps streams with whoever builds the image.

There is a another issue I will raise with the stream author, but currently there is no way to stop the streams. I don’t think this is an issue for local cameras but the wireless Arlo ones will get drained pretty fast.

1 Like

I use a venv environment on ubuntu no docker so cant help in this one

@collse

If you’re using venv there is a good change you can get it working. You have to install the libav development modules otherwise the stream component won’t install. You can install manually the av library to catch any other issues:

source your-env/bin/activate
sudo apt install libavformat-dev
sudo apt install libavdevice-dev
pip install av==6.1.2

You also can try this branch - aarlo-glance-stream - which makes the click on the picture start streaming instead of showing the last recorded clip. There is a small delay after clicking before the stream appears, I’m working on that.

If everything works you’ll see a reference to an rtsps: stream in the logs and a message about serving an address to 127.0.0.1.

But remember, the stream doesn’t stop so you might have to restart your environment to stop the streaming.

I took a stab at adding support for custom_updater/tracker card. Check out my fork here: https://github.com/rccoleman/hass-aarlo

@rccoleman

Firstly, thanks for doing this, I started looking at this but a few bugs popped up that needed dealing with so I had to keep putting it off.

Secondly, I wasn’t ignoring you, I just had a hectic weekend of travelling so I’ll take a look tonight!

No problem at all :). Just wanted to make sure that it wasn’t buried in an old issue.

@sherrell
I have just tried the custom card that comes with it - quite nice but is there a chance you could add also temperature, lux and motion for generic options like you have added for door and door_lock? this would unify the aarlo with a generic multi-sensor into a single card …

7 days later it used only 3% of my battery

Thanks man - can you please specify how you’ve set you mode policy and let me know where your cameras are located? I have mine indoors and have audio/motion enabled and I think they deflated in a week easily …

I have the Arlo Pro set at about 6 meters from the base.
i use home mode with only motion detection on when at home and armed with only motion detection and video record when away. No sound detection at all

thanks that clarifies something - as I had record video on as well … so you policy looks like this per camera?

Indeed yes only difference i send notification to email

thanks perfect - will give it a try - if that works I may be able to retire some of my motion sensors …

1 Like

Hi Sherrell,

So you know, stream is not working in 0.91 beta.

an example to go off

https://github.com/home-assistant/home-assistant/pull/22569#event-2241816055

@sherrell Any update on moving things to PyPi? aarlo is already significantly better than the current underlying library that we are using in HA and will be great to start moving things.

1 Like

@grantc
The stream code is already in and it works but it only works in a virtualenv install. There is an ffmpeg/arlo incompatibility in the docker and hassio images that stop it working - ffmpeg doesn’t support rtsps streams. I need to raise a bug on this.
If you do get it working in virtualenv the other issue is the stream doesn’t stop, or I don’t believe it stops, I need to talk to the stream author to see if he can add a stop stream mechanism. I think the stream code assumes a local stream that is always on whereas the Arlo cameras are on demand.

@arsaboo
I’m still looking at that stuff but life got in the way the last week or two - spring finally arrived and it with a huge snow melt and refreeze and ice dams and leaks…
I’ll get the PyPi stuff going this week.

1 Like

@collse
I’ll think about that one. I can use the picture glance code as a starting point.