github JurajNyiri/HomeAssistant-Tapo-Control 5.3.6

latest releases: 6.0.12, 6.0.11, 6.0.10...
16 months ago

New Features

  • Add: New sensor entities about all available storages in cameras, generated dynamically from camera. Depending on your settings, values for these entities might change a lot so I would recommend adding them to exclude in logbook and/or recorder.
Example new exposed entities Screenshot 2023-10-06 at 13 39 44

Developer Notes

Recently one of my cameras stopped detecting SD card and thus stopped recording without my knowledge. Because of this, I added all these new data into Diagnostics section of each camera. You can see my example automation below, which automatically notifies me about an unexpected state of SD card in one of my cameras. You can add more triggers from other cameras too and it will work correctly automatically.

Automation to notify about invalid SD card state

Automation YAML:

alias: "Tapo: Detect SD card failure"
description: >-
  Detects invalid state of SD cards of tapo cameras and creates a persistent notification
trigger:
  - platform: state
    entity_id:
      - sensor.bedroom_disk_1_detect_status
    from: normal
  - platform: state
    entity_id:
      - sensor.bedroom_disk_1_rw_attr
    from: rw
  - platform: state
    entity_id:
      - sensor.bedroom_disk_1_status
    from: normal
  - platform: state
    entity_id:
      - sensor.bedroom_disk_1_write_protect
    from: "0"
condition: []
action:
  - service: notify.persistent_notification
    data:
      message: >
        {% set diskName = trigger.entity_id | regex_findall_index('sensor\.(.*?disk_.*?)_') %}

        WARNING: Camera {{device_attr(trigger.entity_id,"name")}} SD card failure! 

        status: {{states("sensor."+diskName+"_status")}} 

        detect_status: {{states("sensor."+diskName+"_detect_status")}} 

        rw: {{states("sensor."+diskName+"_rw_attr")}} 

        write_protect: {{states("sensor."+diskName+"_write_protect")}}
mode: single

Example output:

*triggered with additional state trigger sensor.bedroom_disk_1_record_free_duration which updates every 10 seconds for me, for testing

Screenshot 2023-10-06 at 14 23 57

Don't miss a new HomeAssistant-Tapo-Control release

NewReleases is sending notifications on new releases.