Arlo Support (Sponsorship)

I’m still trying to figure out the optimal filter for playback, as I am getting inconsistent results. I’m confused by the filter you are using, @tchellomello, because

'-filter:v setpts=40.0*PTS'

should be making the video 40x slower, according to this documentation:
https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video

Hello @xprezz,

We still need to address a few issues like the playback speed and I think we will be good for the 0.46.

Yes @jwillaz. I’m also experiencing some inconsistencies. Some videos I have to slow down using that filter and others I soo slow. Which firmware/model version are you running on your cameras?

@tchellomello Sorry, I had some technical difficulties the past couple of days. I am on Arlo Pro cameras, Hardware: H7, Firmware: 1.092.0.3_12290.

PR submitted today https://github.com/home-assistant/home-assistant/pull/7826

3 Likes

Great work!

I do get each of my cameras running at different speeds when I watch from HA, but that is not that bothersome.

Do you plan in including functionalliy to be able to set the mode (armed, disarmed, etc) on the arlo unit from HA?

Again, thanks for your hard work!

1 Like

Hello everyone!!! The official support to Arlo cameras came to life in version 0.46. For the ones that was testing it by copying the files under the custom_components folder, don’t forget to delete it once you migrate to 0.46.

I want to thank you all for helping and testing this component.

@matteskonto I’ll try to create an extension for a switch to flip between armed/disarmed/away.

Thanks!
mmello

4 Likes

Making the transition from custom components to 0.46 official release.

I installed 0.46 and removed the custom components folder but there are some errors in the home.assistant.log file:


2017-06-06 17:37:42 ERROR (MainThread) [homeassistant.setup] Error during setup of component arlo
Traceback (most recent call last):
  File "c:\users\garry\appdata\local\programs\python\python36-32\lib\site-packages\homeassistant\setup.py", line 190, 
  in _async_setup_component component.setup, hass, processed_config)
File "c:\users\garry\appdata\local\programs\python\python36-32\lib\concurrent\futures\thread.py", line 55, in run
  result = self.fn(*self.args, **self.kwargs)
File "c:\users\garry\appdata\local\programs\python\python36-32\lib\sitepackages\homeassistant\components\arlo.py", 
  line 47, in setup arlo = PyArlo(username, password, preload=False)
TypeError: __init__() got an unexpected keyword argument 'preload'
2017-06-06 17:37:42 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of sensor.arlo. 
  Setup failed for dependencies: arlo
2017-06-06 17:37:42 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.arlo: 
  Could not setup all dependencies.
2017-06-06 17:37:42 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of camera.arlo. 
  Setup failed for dependencies: arlo
2017-06-06 17:37:42 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform camera.arlo: 
  Could not setup all dependencies.
2017-06-06 17:37:43 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback 
  _ProactorReadPipeTransport._loop_reading(<_OverlappedF...op_reading()]>) Traceback (most recent call last):
  File "c:\users\garry\appdata\local\programs\python\python36-32\lib\asyncio\events.py", line 127, in _run
    self._callback(*self._args)
  File "c:\users\garry\appdata\local\programs\python\python36-32\lib\asyncio\proactor_events.py", line 190, in 
    _loop_reading data = fut.result()  # deliver data later in "finally" clause asyncio.base_futures.InvalidStateError: 
    Result is not ready.
2017-06-06 17:37:58 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback 
  _ProactorReadPipeTransport._loop_reading(<_OverlappedF...ed result=b''>) Traceback (most recent call last):
  File "c:\users\garry\appdata\local\programs\python\python36-32\lib\asyncio\events.py", line 127, in _run
    self._callback(*self._args)
  File "c:\users\garry\appdata\local\programs\python\python36-32\lib\asyncio\proactor_events.py", line 188, in 
   _loop_reading self._closing) AssertionError

There is also an invalid config error after my Home Assistant page loads:


Invalid Config
The following components and platforms could not be set up:

  o Arlo

  o Sensor.arlo

  o Camera.arlo

Please check your config

DISMISS

My relevant configuration.yaml lines are as follows


arlo:
  username: !secret arlo_userID
  password: !secret arlo_password

camera:
  - platform: arlo
    username: !secret arlo_userID
    password: !secret arlo_password

Thanks for adding Arlo support to HA!
Can you help me debug these errors?

First…BIG thanks for adding Arlo support.
Just installed the 0.46v and I got an ffmpeg error.

2017-06-07 15:00:30 WARNING (MainThread) [haffmpeg.core] FFmpeg isn't running!

Anyone had this issue?
ffmpeg -version says:

built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armhf --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --extra-libs=-lasound --enable-libmp3lame
libavutil      55. 63.100 / 55. 63.100
libavcodec     57. 96.101 / 57. 96.101
libavformat    57. 72.101 / 57. 72.101
libavdevice    57.  7.100 / 57.  7.100
libavfilter     6. 90.100 /  6. 90.100
libswscale      4.  7.101 /  4.  7.101
libswresample   2.  8.100 /  2.  8.100
libpostproc    54.  6.100 / 54.  6.100

@wootapa
I am getting errors in my home-assistant.log file. Can you share with me your relevant configuration.yaml lines so I can check those against mine?

Thanks

Fixed my own problem…
Seems like I installed the pre-release pyarlo packages pre 0.46 release. I deleted the pyarlo packages from C:\Users\garry\AppData\Local\Programs\Python\Python36-32\Lib\site-packages because I saw packages in the C:\Users\garry\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\homeassistant\components\arlo.py, \camera\arlo.py and \sensor\arlo.py

1 Like

Hello @garryweil,
You don’t see anymore to pass the credentials to the camera. Try this:

# configuration
arlo: 
  username: xxx
  password: yyyy

camera:
   - platform: arlo

Did you check the path for the ffmpeg binary?

@tchellomello I have not installed ffmpeg. Is this essential? By the way I’m running HA on Windows 10.

Yup.

ffmpeg:
  ffmpeg_bin: /usr/local/bin/ffmpeg

ffmpeg seems to work. I generated a sample video with below, and it worked fine.

ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 testsrc.mpg

Sigh…

I’m running 0.46.1 via docker, and added the required arlo config Component with username and password, and the camera.

when I have the camera lines in my config, and try to validate it I get this:

2017-06-09 16:34:29 ERROR (MainThread) [homeassistant.config] Invalid config for [camera.arlo]: required key not provided @ data['password']. Got None
required key not provided @ data['username']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/camera.arlo/

down lower it says:

Failed config
  camera.arlo: 
    platform: arlo
    ffmpeg_arguments: -pred 1 -q:v 2

Successful config (partial)
  camera.arlo:

my configuration.yaml has:

arlo:
  username: [email protected]
  password: xxxxxxxxx

and lower down with the rest of my cameras:

camera netgear_arlo:
  - platform: arlo
    ffmpeg_arguments: '-pred 1 -q:v 2'

I’ve also tried just:

camera:
  - platform: arlo
    ffmpeg_arguments: '-pred 1 -q:v 2'

But get the same errors.

I get some connection errors sometimes when I open hass UI, with the camera pictures not loading at first. The camera pictures always get displayed after a delay after what I assume is a retry to connect. They appear at random when I open the UI, sometimes no error and camera pictures at first load.

Do any of you get the same error?

2017-06-25 09:29:28 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 386, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 382, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.4/http/client.py", line 1172, in getresponse
    response.begin()
  File "/usr/lib/python3.4/http/client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.4/socket.py", line 371, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.4/ssl.py", line 745, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.4/ssl.py", line 617, in read
    v = self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/adapters.py", line 438, in send
    timeout=timeout
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py", line 357, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 386, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 382, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.4/http/client.py", line 1172, in getresponse
    response.begin()
  File "/usr/lib/python3.4/http/client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.4/socket.py", line 371, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.4/ssl.py", line 745, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.4/ssl.py", line 617, in read
    v = self._sslobj.read(len, buffer)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/deps/aiohttp/web_protocol.py", line 421, in start
    resp = yield from self._request_handler(request)
  File "/home/homeassistant/.homeassistant/deps/aiohttp/web.py", line 303, in _handle
    resp = yield from handler(request)
  File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
    res = yield from res
  File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
    res = yield from res
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/http/ban.py", line 58, in ban_middleware_handler
    return (yield from handler(request))
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/http/__init__.py", line 424, in handle
    result = yield from result
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/__init__.py", line 249, in get
    response = yield from self.handle(request, camera)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/__init__.py", line 269, in handle
    image = yield from camera.async_camera_image()
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/arlo.py", line 60, in camera_image
    return self._camera.last_image
  File "/srv/homeassistant/lib/python3.4/site-packages/pyarlo/camera.py", line 88, in last_image
    self.update()
  File "/srv/homeassistant/lib/python3.4/site-packages/pyarlo/camera.py", line 158, in update
    self._attrs = self._session.refresh_attributes(self.name)
  File "/srv/homeassistant/lib/python3.4/site-packages/pyarlo/__init__.py", line 195, in refresh_attributes
    data = self.query(url).get('data')
  File "/srv/homeassistant/lib/python3.4/site-packages/pyarlo/__init__.py", line 132, in query
    req = self.session.get(url, headers=headers)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py", line 531, in get
    return self.request('GET', url, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py", line 518, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py", line 639, in send
    r = adapter.send(request, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/adapters.py", line 488, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

hello @matteskonto

I just hit this error 2 times so far. It seems to be a problem connecting to the Arlo server.

I get this error pretty often when I open the UI, the camera images loads everytime but they are delayed when I get this error. It is not a problem for me other than the error log is getting populated with a lot of this error messages.

How is it going with the functionallity to do serivce calls from HA to the Arlo system to set disarmed/armed etc? Anything I can help with?

/Matt

Can you detect motion? and use that motion in the automation like to trigger a light if movement was present?