hass-aarlo icon indicating copy to clipboard operation
hass-aarlo copied to clipboard

No Arlo Security Light Sensors

Open orandasoft opened this issue 4 years ago • 11 comments

There are are entities for the Arlo Security Light in the alarm_control_panel and light domains, but not for the sensor domain. I am not sure whether that information is available but it would be great to have the sensor information for motion and battery.

orandasoft avatar Oct 14 '21 00:10 orandasoft

There should be sensors provided for the lights, and the code assumes all lights have motion and battery sensors. Did you enable the sensors?

twrecked avatar Oct 14 '21 04:10 twrecked

This is my configuration `

Configure Arlo Account

https://my.arlo.com/

aarlo: username: !secret arlojp_arlo_username password: !secret arlojp_arlo_password tfa_source: imap tfa_type: email tfa_host: imap.mail.yahoo.com:993 tfa_username: !secret arlojp_yahoo_username tfa_password: !secret arlojp_yahoo_password

Configure Arlo Integration

alarm_control_panel:

  • platform: aarlo home_mode_name: armed-external

Enable Arlo Cameras

camera:

  • platform: aarlo

Enable Arlo Sensors

sensor:

  • platform: aarlo monitored_conditions:
    • total_cameras
    • last_capture
    • recent_activity
    • captured_today
    • battery_level
    • signal_strength

Enable Arlo sirens

switch:

  • platform: aarlo siren: True

Enable Arlo Lights

light:

  • platform: aarlo `

orandasoft avatar Oct 16 '21 12:10 orandasoft

Everything looks good. Your example is missing the binary sensors, do you have them configured as well?

# binary_sensors.yaml
- platform: aarlo
  monitored_conditions:
  - motion

Can you turn on debug, we need to look in home-assistant.log to see why the battery levels aren't being reported. Add this to your configuration and restart:

logger:
  default: info
  logs:
    custom_components.aarlo: debug
    custom_components.aarlo.alarm_control_panel: debug
    custom_components.aarlo.binary_sensor: debug
    custom_components.aarlo.camera: debug
    custom_components.aarlo.light: debug
    custom_components.aarlo.media_player: debug
    custom_components.aarlo.sensor: debug
    custom_components.aarlo.switch: debug
    pyaarlo: debug

home-assistant.log is written in the same directory as your configuration. You are looking for lines like this in the output:

2021-09-24 06:56:40 INFO (MainThread) [custom_components.aarlo.sensor] ArloSensor: Battery Level Garage Camera created
...
2021-09-24 06:56:48 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.sensor] callback:Battery Level Side Camera:batteryLevel:38

These will at least show the devices are being created.

twrecked avatar Oct 16 '21 14:10 twrecked

The current list of sensors: {{ states.sensor | selectattr('entity_id','search','aarlo') | map(attribute='entity_id') | list }} [ "sensor.aarlo_battery_level_external_camera", "sensor.aarlo_battery_level_hallway_camera", "sensor.aarlo_battery_level_light_hallway", "sensor.aarlo_battery_level_light_outside", "sensor.aarlo_battery_level_living_camera", "sensor.aarlo_captured_today_external_camera", "sensor.aarlo_captured_today_hallway_camera", "sensor.aarlo_captured_today_living_camera", "sensor.aarlo_last_external_camera", "sensor.aarlo_last_hallway_camera", "sensor.aarlo_last_living_camera", "sensor.aarlo_recent_activity_external_camera", "sensor.aarlo_recent_activity_hallway_camera", "sensor.aarlo_recent_activity_living_camera", "sensor.aarlo_signal_strength_external_camera", "sensor.aarlo_signal_strength_hallway_camera", "sensor.aarlo_signal_strength_living_camera", "sensor.aarlo_total_cameras" ]

orandasoft avatar Oct 17 '21 02:10 orandasoft

2021-10-17 11:06:53 INFO (MainThread) [custom_components.aarlo.binary_sensor] ArloBinarySensor: Motion Light Outside created 2021-10-17 11:06:53 INFO (MainThread) [custom_components.aarlo.sensor] ArloSensor: Battery Level Light Outside created 2021-10-17 11:06:53 INFO (MainThread) [custom_components.aarlo.light] ArloLight: Light Outside created 2021-10-17 11:06:55 INFO (MainThread) [custom_components.aarlo.light] ArloLight: Light Outside registering callbacks 2021-10-17 11:06:57 DEBUG (ArloBackgroundWorker) [pyaarlo] Light Outside LIGHT got one lights 2021-10-17 11:06:57 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.light] callback:Light Outside:brightness:0 2021-10-17 11:06:57 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.light] callback:Light Outside:lampState:off 2021-10-17 11:06:57 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.sensor] callback:Battery Level Light Outside:batteryLevel:100 2021-10-17 11:06:57 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.binary_sensor] callback:Motion Light Outside:motionDetected:False 2021-10-17 11:16:52 DEBUG (ArloBackgroundWorker) [pyaarlo] Light Outside LIGHT got one lights 2021-10-17 11:16:52 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.light] callback:Light Outside:brightness:0 2021-10-17 11:16:52 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.light] callback:Light Outside:lampState:off 2021-10-17 11:16:52 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.sensor] callback:Battery Level Light Outside:batteryLevel:100 2021-10-17 11:16:52 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.binary_sensor] callback:Motion Light Outside:motionDetected:False

P.S. Any idea why the "Insert code" looks so ugly?

orandasoft avatar Oct 17 '21 02:10 orandasoft

You need three back ticks to make it come out prettier.

I'm seeing 5 battery devices. Are you expecting more? Which light is missing?

  "sensor.aarlo_battery_level_external_camera",
  "sensor.aarlo_battery_level_hallway_camera",
  "sensor.aarlo_battery_level_light_hallway",
  "sensor.aarlo_battery_level_light_outside",
  "sensor.aarlo_battery_level_living_camera",

twrecked avatar Oct 17 '21 02:10 twrecked

Those are correct. I am trying to trace back why I didn't notice them before.

Just curious why the entities do not have related devices.

orandasoft avatar Oct 17 '21 03:10 orandasoft

Gotcha. Do they appear in Developer Tools --> STATES?

Did the motion sensors appear?

twrecked avatar Oct 17 '21 03:10 twrecked

After adding the binary_sensor in the configuration, I can now see the following sensors:

  "binary_sensor.aarlo_motion_external_camera",
  "binary_sensor.aarlo_motion_hallway_camera",
  "binary_sensor.aarlo_motion_light_hallway",
  "binary_sensor.aarlo_motion_light_outside",
  "binary_sensor.aarlo_motion_living_camera",
  "binary_sensor.aarlo_sound_external_camera",
  "binary_sensor.aarlo_sound_hallway_camera",
  "binary_sensor.aarlo_sound_living_camera",

I don't know why I didn't see the battery sensors for the Arlo Security Lights before. Apologies.

orandasoft avatar Oct 17 '21 03:10 orandasoft

Now worries. Glad it's going now.

twrecked avatar Oct 17 '21 03:10 twrecked