twrecked / hass-aarlo

Asynchronous Arlo Component for Home Assistant
GNU Lesser General Public License v3.0
397 stars 79 forks source link

No Arlo Security Light Sensors #508

Open orandasoft opened 3 years ago

orandasoft commented 3 years ago

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.

twrecked commented 3 years ago

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

orandasoft commented 3 years ago

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:

twrecked commented 3 years ago

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.

orandasoft commented 3 years ago

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 commented 3 years ago

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?

twrecked commented 3 years ago

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",
orandasoft commented 3 years ago

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.

twrecked commented 3 years ago

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

Did the motion sensors appear?

orandasoft commented 3 years ago

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.

twrecked commented 3 years ago

Now worries. Glad it's going now.