Arlo: replacement pyarlo module

Thanks Sherrell, had to remove the conf_dir line as it was causing similar errors to before. The permission on the conf dir appears to have write permisssions, so not sure what it coul be. Removed the line and it appears to be working fine again.

2019-02-13 11:25:22 ERROR (MainThread) [frontend.js.latest.201902030] https://unpkg.com/@polymer/[email protected]/lib/utils/async.js?module:44:11 Uncaught TypeError: Cannot read property ‘state’ of undefined

I tested “camera on” but it actually doesn’t turn on the motion detection. It really doesn’t do anything on my system. What I’m looking for is a way to activate/deactivate the motion detection for specific cameras without switching the mode on the base station. This is because I would like to activate motion detection for one specific camera whenever I open a certain window. Once I close the window, the motion detection should be switched off again. There is a service called “camera.enable_motion_detection”, but this is not working on my system.

What I also noticed is that I’m not able to replay the last recorded clip on iOS devices. Is that normal? Playback on a PC works just fine.

Thanks again for your great support!

Does the ffmpeg_arguments: ‘-pred 1 -q:v 2’ work for Hass.io?
Or is the “ffmpeg is not running” returned in the log?

On my system it works (Hass.io with HassOS).

@grantc
I don’t believe the 2 are related. The config_dir directive just tells the back end where to store its state, it really shouldn’t affect the front end.

The front end issue is because my custom card wasn’t checking if the camera exists and asking for the state of something that doesn’t exist. You’ll notice it’s still buggy - it only complains about a missing camera every other key press when you’re typing the camera name but I honestly think that’s a lovelace issue because hass is only set 50% of the time. But once the camera name is correct a snapshot will appear.

The latest update should quieten your log down.

@ffm777
iOS: is it better now? As mentioned above front ends aren’t my speciality and I never thought to try it on an iOS device. I’m going to figure a way to add a stop button to the playback but for now it should return to the status icons when playback finishes.

on/off: If you send a camera_off to device and look at it on the Arlo website or app it will tell you it’s disabled. Getting per camera motion is (if my understanding is correct ) more complicated. A work around to your problem is to leave the system Armed but turn the cameras off until you need them. I ran SmartThings like this for a year or two.
A better solution - and one I’m thinking about - is to have a custom mode and change the cameras in this mode as motion_enabled/disabled are called. This breaks the arm/disarm alarm panel but I can’t see a way to turn on an individual camera another way. I suppose I could do the same with the Armed mode…

What I was saying is that there is a problem with ffmpeg in hassio, and has been for a while.

All of you with live streams from Arlo. Are you using something else besides hassio? Hassbian maybe?

Hi Sherrell,

Very weird, apologies for the constant replies.

So I d/loaded the change - commented out the conf_dir line and this is what I now get. If I comment the line, there are no issues with the frontend.

2019-02-14 07:44:38 ERROR (MainThread) [homeassistant.config] Invalid config for [aarlo]: [conf_dir] is an invalid option for [aarlo]. Check: aarlo->aarlo->conf_dir. (See /home/homeassistant/.homeassistant/configuration.yaml, line 69). Please check the docs at https://home-assistant.io/components/aarlo/
2019-02-14 07:44:38 ERROR (MainThread) [homeassistant.setup] Setup failed for aarlo: Invalid config.
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of alarm_control_panel.aarlo. Setup failed for dependencies: aarlo
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform alarm_control_panel.aarlo: Could not set up all dependencies.
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of sensor.aarlo. Setup failed for dependencies: aarlo
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.aarlo: Could not set up all dependencies.
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of binary_sensor.aarlo. Setup failed for dependencies: aarlo
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform binary_sensor.aarlo: Could not set up all dependencies.
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of camera.aarlo. Setup failed for dependencies: aarlo
2019-02-14 07:44:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform camera.aarlo: Could not set up all dependencies.
ad property ‘state’ of undefined
2019-02-14 07:45:14 ERROR (MainThread) [frontend.js.latest.201902030] https://unpkg.com/@polymer/[email protected]/lib/utils/async.js?module:44:11 Uncaught TypeError: Cannot read property ‘state’ of undefined
2019-02-14 07:45:14 ERROR (MainThread) [frontend.js.latest.201902030] https://unpkg.com/@polymer/[email protected]/lib/utils/async.js?module:44:11 Uncaught TypeError: Cannot read property ‘state’ of undefined
2019-02-14 07:45:14 ERROR (MainThread) [frontend.js.latest.201902030] https://unpkg.com/@polymer/[email protected]/lib/utils/async.js?module:44:11 Uncaught TypeError: Cannot read property ‘state’ of undefined
2019-02-14 07:45:14 ERROR (MainThread) [frontend.js.latest.201902030] https://unpkg.com/@polymer/[email protected]/lib/utils/async.js?module:44:11 Uncaught TypeError: Cannot read property ‘state’ of undefined
2019-02-14 07:45:14 ERROR (MainThread) [frontend.js.latest.201902030] https://unpkg.com/@polymer/[email protected]/lib/utils/async.js?module:44:11 Uncaught TypeError: Cannot read property

@grantc
No worries about the messages. I made this public because the machines available for me to test with are rather limited.

Looking at that trace I’d say you are using an old version. The [conf_dir] is an invalid option shouldn’t happen with the latest version. Where did you download from? Can you try pulling the latest stuff from git?

@Vennerberg
Funny thing, I could never get the video to play correctly with arlo till I started accessing the arlo videos directly. The video would run fast or be truncated, I figured it was something to with ffmpeg but never looked too deeply into it. I just coped the parameters from the original arlo component.

Might have had a win - pulled the latest updates and removed the conf_dir option and no errors so far. So you know, the “conf_dir” option is still showing in your docs for VE installs. Thanks again.

Just a heads up, 0.88 beta is out - most of the custom components will break as I have just found out.

https://rc--home-assistant-docs.netlify.com/blog/2019/02/13/release-88/

Note for custom component developers: We are moving to a new file structure. Platforms now live embedded in components. Custom platforms will have to be updated to follow this pattern. This is a breaking change in case your custom platform overrides a built-in platform. Rename your custom platform from, ie light/hue.py to hue/light.py .

Great job @sherrell. I could never get the arlo: component to work properly, but this worked first time. I’m looking forward to trying live streaming.

One issue, which is probably just a reflection of my understanding of the alarm control panel:

I’ve used your alarm_control_panel: config from Github. I can disarm the base station using an Alarm Control Panel card, but I can’t arm it.

If I arm or disarm using the Arlo web portal, the status is reflected correctly. If I click Disarm in the alarm control panel, the status is reflected in the web portal. But clicking either Arm Home or Arm Away on the alarm control panel has no effect.

I’ve got Armed, Disarmed, Schedule (unused) and Geofencing (unused) as modes in the Arlo base station settings.

@ronschaeffer
Another person was having alarm issues so I’ll double check the code later, I have other things to do just now. But I did a quick test here and it worked for me - isn’t that always the case.

One question, does your aarlo user have “Allow Access Rights” ?

@sherrell Thanks. No hurry. I added some detail below. Let me know if I can give you any more info to help.

Double checked. Yes, “Allow Access Rights” is set to on. As mentioned, disarming from the HA UI works. Arming does not.

Alarm control panel config:

alarm_control_panel:
- platform: aarlo
  home_mode_name: Disarmed
  away_mode_name: Armed 

Lovelace config:

entity: alarm_control_panel.aarlo_arlo_base_station
name: Camera Motion Detection
states:
  - arm_home
  - arm_away
type: alarm-panel

Log entry when I click Disarm in the UI:

2019-02-14 11:28:57 INFO (MainThread) [homeassistant.components.http.view] Serving /api/ to 172.30.32.2 (auth: True)
2019-02-14 11:29:01 INFO (MainThread) [pyaarlo] Arlo Base Station:new-mode=disarmed,id=mode0
2019-02-14 11:29:02 INFO (EventStream) [pyaarlo] Arlo Base Station BASE got modes
2019-02-14 11:29:02 INFO (EventStream) [custom_components.alarm_control_panel.aarlo] callback:activeMode:disarmed
2019-02-14 11:29:02 INFO (EventStream) [pyaarlo] unhandled response devices/xxxxxxxxxxxxxxxxx/states
2019-02-14 11:29:03 INFO (EventStream) [pyaarlo] Arlo Base Station BASE got activeAutomations
2019-02-14 11:29:03 INFO (EventStream) [custom_components.alarm_control_panel.aarlo] callback:activeMode:disarmed
2019-02-14 11:29:03 INFO (EventStream) [pyaarlo] Arlo Base Station BASE got modes

xxxxxxxxxxxxxxxxx above is a redaction of an alphanumeric string, just in case it’s identifiable in some way. Let me know if you need that string, and I’ll PM it.

Nothing gets logged when I click Arm Home or Arm Away in the UI.

Thanks!

@sherrell

It was me that wasnt able to arm aarlo … I was wondering if its due to the install that I did … can you confirm that if I remove the installs and just use your install script again it should install all dependencies at start? Though I ran it in addition there may be a conflict of modules - happy to remove it completely and to start over - maybe worth reviewing the install instructions on github to make it clearer … will do that one I get back out if the sun - just monitoring the thread while being in vacation …

@ronschaeffer @collse

Can you try lower case…

alarm_control_panel:
- platform: aarlo
  home_mode_name: disarmed
  away_mode_name: armed

I really should make that case insensitive… And add a log if it can’t find a mode so it looks like something was attempted.

@sherrell Success. Changing to all lower case fixed the problem. Arm/disarm now works. Thanks!

@ronschaeffer Excellent. I’ll update the docs to make things clearer.

@collse The docs need some updating, I’ll look at it this week. And it’s safe to rerun the install script to overwrite the current installation, I do it all the time. Just to clarify, you don’t need to do any pip install commands, that was a pre-pre-alpha release.

1 Like

Thanks for that. We aren’t overriding a built in platform - you can still use the old arlo if you want - but I’ll double check tonight. I prefer the new naming convention, I can put everything into a single directory.

The component will have to be updated for the new embedded format otherwise it is broken in 0.88

@sherrell Thanks for doing this work. I agree with the issues you mentioned on regards the pyarlo library. I’ve been tied up with other projects and not being able to give the necessary ‘love’ to the project so I’m a big supporter to migrate to a new and maintained platform the component.

I’m going to test it as well and if I would be happy to contribute as well to make it happen!! My intentions are once your project gets the official back-end, I’m going to deprecated PyArlo and redirect it to yours (if that is OK for you).

Thanks everyone else whom contributed, tested or used the PyArlo.

mmello

1 Like