Arlo: replacement pyarlo module

Good grief, I finally figured it out. There is an Arlo account setting that I found. Under Grant Access, there is a switch, Allow Access Rights, that has to be set on. The default setting is off. For some reason, sometime over the past few weeks, either the switch was added or its significance changed. Motion detection is back and all the unknown sensor settings are finally showing up.

Little tip to anyone that may be trying to do what I was. I was using the custom aarlo-glance card in lovelace, but I only wanted it to appear if there was motion in the last 24 hours. Otherwise it shouldn’t appear at all.

To do so, add the following to configuration.yaml:


binary_sensor:
  - platform: aarlo
    monitored_conditions:
    - motion
  - platform: template
    sensors:
      recent_motion_on_kitchen_camera:
        value_template: >-
          {% set camtime = strptime(now().strftime('%Y') + '-' + states('sensor.aarlo_last_kitchen_camera'), '%Y-%m-%d %H:%M') %}
          {{ as_timestamp(camtime) > (as_timestamp(now()) - 86400) }}

Reboot, then setup your card like this in lovelace:

          - card:
              entity: camera.aarlo_kitchen_camera
              name: Kitchen Camera Caught Motion
              show:
                - captured_today
                - motion
                - snapshot
                - battery_level
                - signal_strength
                - image_date
              top_date: true
              top_status: true
              top_title: true
              type: 'custom:aarlo-glance'
            entities:
              - binary_sensor.recent_motion_on_kitchen_camera
            show_empty: false
            state_filter:
              - 'on'
            type: entity-filter

Kudos to @finity to clue-ing me in to value templates and helping getting that going.

1 Like

I could have sworn that needing admin access was in the README but I guess not. Sorry about that.

I have some updates for the README I need to check in so I’ll make sure that gets added.

Almost a month has passed including several updates to aarlo and a HA update. It seems my motion detection is now consistently working.

For those that want to do what I was trying to accomplish I wanted to share my automation…

- id: '1573064143438'
  alias: Motion on driveway turns on lights
  description: ''
  trigger:
  - entity_id: binary_sensor.aarlo_motion_driveway
    platform: state
    to: 'on'
  condition:
  - condition: or
    conditions:
    - before: sunrise
      condition: sun
    - condition: or
      conditions:
      - after: sunset
        condition: sun
  action:
  - data:
      entity_id: switch.outside_front_lights
    service: switch.turn_on
  - delay: 00:20:00
  - data:
      entity_id: switch.outside_front_lights
    service: switch.turn_off

Thank you!

I’m glad that it’s working for you, but I would make a changes to make it more reliable:

  • Surround the delay with quotes (note the different coloration above, which indicates that a YAML parser may not understand it as intended)

- delay: '00:20:00'

  • I believe that that automation won’t work properly if the aarlo motion sensor switches to false and is then retriggered while the 20min delay is active. Instead, I expect that the action will “fall through” the delay and the light will immediately turn off and then maybe on again.
  • If you restart Home Assistant within the delay period, the lights won’t ever turn off

Instead, I recommend splitting it up into two different automations, one that triggers when the sensor turns on and one that triggers if the sensor has been off for some period of time. Like this:

- id: '1573064143438'
  alias: Motion on driveway turns on lights
  trigger:
  - entity_id: binary_sensor.aarlo_motion_driveway
    platform: state
    to: 'on'
  condition:
  - condition: or
    conditions:
    - before: sunrise
      condition: sun
    - condition: or
      conditions:
      - after: sunset
        condition: sun
  action:
  - data:
      entity_id: switch.outside_front_lights
    service: switch.turn_on
- id: '1573064143439'
  alias: Motion on driveway turns on lights
  trigger:
  - platform: homeassistant
    event: start
  - entity_id: binary_sensor.aarlo_motion_driveway
    platform: state
    to: 'off'
    for:
      minutes: 20
  condition: []
  action:
  - data:
      entity_id: switch.outside_front_lights
    service: switch.turn_off

@sherrell have you heard of anyone being able to get streaming working with the Arlo Q? I saw that the issue was still open on the GitHub repo, and I have the same divide-by-zero error like the other people are having.

Hi Sherrell,

if you are planning an update to hass-aarlo in the next time, it would be great if you could add Video Doorbell support by adding modelId AVD1001A in pyarlo/init.py to basestation and camera:

            if dtype == 'basestation' or device.get('modelId') == 'ABC1000' or dtype == 'arloq' or dtype == 'arloqs' or device.get('modelId') == 'AVD1001A':
                self._bases.append(ArloBase(dname, self, device))
            if dtype == 'arlobridge':
                self._bases.append(ArloBase(dname, self, device))
            if dtype == 'camera' or dtype == 'arloq' or dtype == 'arloqs' or device.get('modelId') == 'AVD1001A':
                self._cameras.append(ArloCamera(dname, self, device))

If you like, I can also open a pull request…

Cheers

1 Like

I haven’t. But I should be able to (re)look into this week.

Is that all it takes to make it work? A couple of questions:

Looking at the diff I guess the doorbell is a basestation too?
Does the code create a doorbell type too? I guess it reports back as a doorbell type…

If you’re comfortable creating a pull request then go ahead. If not, I can do it. Your call.

Thanks!

@sherrell

Hi Steve,

Just a heads up with 0.103 and the alarm control panel… there appears to be some breaking changes that I am having a problem with resolving.

There are quite a few service changes in this release.
https://rc.home-assistant.io/blog/2019/12/04/release-103/

Error while setting up platform aarlo
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/home/homeassistant/.homeassistant/custom_components/aarlo/alarm_control_panel.py”, line 100, in async_setup_platform
base_stations.append(ArloBaseStation(base_station, config))
TypeError: Can’t instantiate abstract class ArloBaseStation with abstract methods supported_features

Many thanks. I’ll take a look.

I just checked in a fix if you want to give it a try.

can anyone offer any suggestions on the issue I am having on the install. Copied everything over manually first go around got this error. Next I installed HACS and tried installing AArlo get the same error - currently running HA in a docker. This is the error when HA is restarted -

2019-12-06 21:29:56 ERROR (MainThread) [homeassistant.setup] Error during setup of component aarlo                                                                                                                                  
Traceback (most recent call last):                                                                                                                                                                                                  
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component                                                                                                                                         
    component.setup, hass, processed_config  # type: ignore                                                                                                                                                                         
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run                                                                                                                                                     
    result = self.fn(*self.args, **self.kwargs)                                                                                                                                                                                     
  File "/config/custom_components/aarlo/__init__.py", line 131, in setup                                                                                                                                                            
    http_connections=http_connections, http_max_size=http_max_size)                                                                                                                                                                 
  File "/config/custom_components/aarlo/pyaarlo/__init__.py", line 67, in __init__                                                                                                                                                  
    self._parse_devices()                                                                                                                                                                                                           
  File "/config/custom_components/aarlo/pyaarlo/__init__.py", line 114, in _parse_devices                                                                                                                                           
    for device in self._devices:                                                                                                                                                                                                    
TypeError: 'NoneType' object is not iterable

This means no devices are being returned by Arlo for the account you used to login:

  • Is this a HA specific account?
  • Can you log in from the web interface using the same account and see what devices appear?

Thanks!

Thanks Steve,

Appears to be working now…

I may be speaking out of turn. Apologies if I am.
The VMC3030 does not support audio.

Yes dedicated HA account.

Ok that makes sense - the only device I have is the new video doorbell. I incorrectly assumed the new doorbell was working already.

@sccofer
Somebody provided a patch that makes the doorbell work. I’ll check it in today.

edit: I just checked in the change, can you pull the latest version from HACS? One more thing, make sure to give “admin access” to your dedicated account, the video-doorbell appears as a basestation and Arlo won’t let you share it unless you give also give admin access.

@holger2 I just checked in the change. Can you try?

Hello,
I am loocking for a “smart” door bell with camera and no cloud needed.
I have fiew questions:

  1. Is the arlo doorbell camera is able to connect to home assistant without the cloud connection ?
  2. Is the arlo base needed or it is possible to use arlo doorbell alone, linked directly to Home assistant ?
  3. I see on the plublicity, the doorbell is able to establish call your phone and link the audio from the camera. Is it possible wihout cloud ? Is that possible to link the audio from the camera to an Asterisk server ?

Many thanks for your help !
Best regards