Arlo: replacement pyarlo module

I’m trying to setup notification on the mobile app and pass a snapshot. Does the aarlo_image_updated event return an entity_id similar to the depreciated aarlo_snapshot_ready? Can I listen for the aarlo_image_updated event and then pass the entity_id of the camera via something like {{ entity_id }} in the message?

Thanks!

Edit: I listened to the event and see this is the response structure:

{
    "event_type": "aarlo_image_updated",
    "data": {
        "entity_id": "aarlo.driveway"
    },
    "origin": "LOCAL",
    "time_fired": "2022-01-28T14:43:05.659439+00:00",
    "context": {
        "id": "e42e82290b7ce65db067ee1b7735de4c",
        "parent_id": null,
        "user_id": null
    }
}

In my case I expect the entity_id to be camera.aarlo_driveway is this expected behavior?

Edit:

For now I’m going to try this to get my camera entity_id

{{ 'camera.' + (trigger.event.data.entity_id).replace('.', '_') }}

Edit:
My goal is to replace the Arlo app notification with snapshot notification from Home Assistant. I am relying on the Arlo app for camera triggering. At first I tried simply listening for the aarlo_image_updated or aarlo_capture_updated events. I have found these work but have a couple of issue…

  1. I sometimes see more events from the Arlo app than from Home Assistant. This tells me either this is intended behavior based on how the Arlo app works vs the aarlo integration or the aarlo integration is missing some events.
  2. I sometimes have my Home Assistant notifications come through almost immediately after the Arlo notification but other times there is a significant delay. Is this due to some limitation or my config or something else?

A fix for item 2 could be to notify on camera recording state or motion and then update the notification after the fact with a snapshot but I don’t know if there is a good unique identifier that could be used as a tag for the notification.

Edit: I fixed entity_id and added device_id to snapshot/capture/image updated events and created a pull request. This allows me to notify my mobile when the camera starts recording then try to update the notification after the fact with a snapshot. I am using the device_id with the captured_today value as a tag. It doesn’t always work but it was the best I could come up with…

service: notify.mobile_app_sm_g950u
data:
  data:
    notification_icon: mdi:cctv
    clickAction: app://com.arlo.app
    group: '{{ state_attr(trigger.entity_id, ''friendly_name'') }}'
    ttl: 0
    priority: high
    tag: >-
      {{ state_attr(trigger.entity_id, 'device_id') +
      states('sensor.aarlo_captured_today_basement_great_room') }}
  title: Arlo
  message: >-
    Motion detected on {{ state_attr(trigger.entity_id, 'friendly_name') }} at
    {{ now().strftime('%I:%M%p') }}
service: notify.mobile_app_sm_g950u
data:
  data:
    notification_icon: mdi:cctv
    clickAction: app://com.arlo.app
    image: '{{ ''/api/camera_proxy/'' + (trigger.event.data.entity_id) }}'
    group: '{{ state_attr(trigger.event.data.entity_id, ''friendly_name'') }}'
    ttl: 0
    priority: high
    tag: >-
      {{ trigger.event.data.device_id + states('sensor.aarlo_captured_today_' +
      (trigger.event.data.entity_id).replace('camera.aarlo_', '')) }}
  title: Arlo
  message: >-
    Motion detected on {{ state_attr(trigger.event.data.entity_id,
    'friendly_name') }} at {{ now().strftime('%I:%M%p') }}

Hi

How did you fix it , as Im struggling.

Paul

1 Like

@sherrell

Hi Steve, I was wondering if somewhere in the information returned from the API it is visible if the camera is currently in night vision or not would you mind having a look if that is exposed and if potentially expose it on the camera entities as well?

would be awesome if you could at least check …

cheers - working superb still, keep up the good work!

Is anyone else having issues with this integration not connecting to Arlo properly? updating the thumbnail (snapshot) doesn’t work, arming/disarming through the alarm component works but fails to get updated when it changes in Arlo (i.e. it’s one way to Arlo, not to HA), and live streaming just fails. I’m thinking it’s an Arlo issue because when I log in to the website the live video sometimes fails to load and if it does load it’s very choppy and I see maybe 2 seconds of footage every 10-15 seconds. The app and HomeKit are fine because that is all local. Just wanted to see if anyone else is experiencing problems.

1 Like

Have the same issue where I will arm/disarm the Arlo cameras from within Home Assistant and the mode is changed in Arlo but the status in Home Assistant is not updated. When changing the camera status in Home Assistant I need to open the Arlo app to make sure that the mode has been changed over correctly.

1 Like

That sometimes happened to me but a quick arm/disarm in the Arlo app would re-sync the states between HA and Arlo. However, the issue I started experiencing was due to the new mqtt backend of this integration failing. I had to switch back to ‘backend: sse’ and everything started working again. There’s a GitHub issue (actually a few) about this happening recently.

1 Like

I’m having issues with Arlo in HA also. Hoping the issues are server side and sorted out soon.

Hi all, sorry for the delay replying here but I’ve been busy with my “real” job, the one that pays the bills…

As some people have found Arlo is changing something and the mqtt back end seems to be broken. If you are missing updates try changing to the sse back end - see here for instructions how.

As for the snapshots not working I’l try here. They can be temperamental at the best of times and with Arlo playing around I might need to alter the code a bit.

@collse Good question. I’ll take a look. It’s actually quite limited what we get back and sometimes wrong. For example, the lights will turn on at dusk, so they have a light sensor and they report a light level value, but I’ve never seen it change.

2 Likes

I am running 0.7.2b7 so I think I’m still on the old backend (not mqtt). I’ve been waiting to update hoping my pull request gets merged. I’m not getting any notification for motion or snapshots through HA and my mode states are not updating either. Hopefully Arlo gets their work done so everything starts working again. I love aarlo. It works great when Arlo isn’t mucking things up.

Edit: I updated to 0.7.2b8.3 ussing the sse backend and things are working for me again. I will have to make some modifications so my snapshot notifications work again. Thanks for the great work.

hi my install was working fine

now im getting

image
image

any ideas where i could look im on version 0.7.2.beta.8.3

ok i fixed this problem

ok so i disabled the xiamoi plugins and removed the “camera” code from the config

in their config they use “camera” to extract the map from the robot vacuum

this is there code

camera:

  • platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password

as it creates an entity called camera.xiaomi_cloud_map_extractor

now my arlo cameras are working again so it must be causing a conflict having the same “camera” name

Can i change this to camera1 or something?

what would be a work around?

@tomcoleman I think that was a coincidence. It’s possible to have multiple components creating camera entities. I have Arlo, Foscam and a weather module creating cameras on my system.

The first issue happened because the Aarlo couldn’t connect to the Arlo servers, this sometimes happens and is usually caused by Cloudflare. See here for more information.

If this happens again look in the homeassistant.log file it might have more information.

thanks for the reply.

I can confirm it breaks arlo and visa/versa

if i remove the code in configuation.yaml arlo starts working, when i put it back breaks it.

if i remove arlo code, roborock starts working if i put it back breaks

so seems to be deffo conflicting.

bunch of arlo errors in log when both code sets are present almost if it stops it connecting

image

Can you past your config here or DM it to me.

@tomcoleman - odd, havent seen any issues in weeks

HACS with Arlo Support v0.7.2b8.3
Xiaomi Cloud Extractor v2.1.5 with an S50 …

all seems to be working as expected

xiaomi

  camera:
    - platform: xiaomi_cloud_map_extractor
      host: !secret xiaomi_ip
      token: !secret xiaomi_token
      username: !secret xiaomi_cloud_username
      password: !secret xiaomi_cloud_password
      draw: ['all']
      attributes:
        - calibration_points
 

arlo

  aarlo:
   username: !secret arlo_hass
    password: !secret arlo_pass
    refresh_devices_every: 2
    stream_timeout: 120
    last_format: '%H:%M - %d %b, %Y'
    packet_dump: false
    db_motion_time: 30
    db_ding_time: 10
    recent_time: 10
    conf_dir: /config/.aarlo
    no_media_upload: True
    mode_api: auto
  
  camera:
    - platform: aarlo
      ffmpeg_arguments: '-pred 1 -q:v 2'
   
  
  alarm_control_panel:
    - platform: aarlo
      home_mode_name: home
      away_mode_name: armed
      trigger_time: 30
      alarm_volume: 8
  
  binary_sensor:
    - platform: aarlo
      monitored_conditions:
      - motion
      - sound
      - ding
      - cry
  
  sensor:
    - platform: aarlo
      monitored_conditions:
      - total_cameras
      - last_capture
      - recent_activity
      - captured_today
      - battery_level
      - signal_strength
      - temperature
      - humidity
      - air_quality
  
  switch:
    - platform: aarlo
      siren: True
      all_sirens: True
      snapshot: True
      siren_volume: 1
      siren_duration: 10
  
  light:
    - platform: aarlo
  
  media_player:
    - platform: aarlo

so nothing special here - some config here is for the baby I have as well, I also have a few other camera providers …

ive just put the xiaomi back in and stright away it breaks the arlo.

Are you using 2FA on arlo for login?

As soon as i put it back in i get this in the logs…

image


image

in the configuration file if i put the xiaomi code above the arlo code, arlo works but xiaomi doesnt show the map.

just to add more testing

if i move the roborock config above arlo

arlo works but roborock is broken

if i move roborock code below arlo code

arlo is broken but roborock works

logs show

as you can see in my config - I dont use 2FA - I also use packages in my configuration maybe that loads them differently than directly within the configuration.html ?

i got it working it was because i had camera listed twice in the config

1 Like

anyone know why its spamming mqtt-cluster.arloxcld.com every second?

Anything i can do to change this?