[Custom Component] Tapo: Cameras Control

You will need to create an account including cloud account to use the camera. Once you do that, you can block it in firewall and everything will work.

Just updated HA and now seeing these warnings about this component for upcoming releases:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:549
First occurred: 12:21:42 (2 occurrences)
Last logged: 12:21:42

Entity camera.tapo_camera_dd_hd (<class 'custom_components.tapo_control.camera.TapoCamEntity'>) implements device_state_attributes. Please report it to the custom component author.
Entity camera.tapo_camera_dd_sd (<class 'custom_components.tapo_control.camera.TapoCamEntity'>) implements device_state_attributes. Please report it to the custom component author.

And

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: 12:22:43 (1 occurrences)
Last logged: 12:22:43

Detected integration that accessed discovery_info['ip'] instead of discovery_info.ip; this will fail in version 2022.6. Please report issue to the custom component author for tapo_control using this method at custom_components/tapo_control/config_flow.py, line 40: if self._async_host_already_configured(dhcp_discovery[IP_ADDRESS]):

Thought you should know

2 Likes

Hi All,
how can I toggle camera privacy mode?
It has only on and off but I need a button and a picture glance card script to toggle it.
Thanks a lot!

@JurajNyiri

I’ve chanced upon your pytapo and it looks fantastic! I’ve got a feature request, are you able to add the speak microhone and voice call features to pytapo?

1 Like

First of all, thanks creating and maintaining this amazing software @JurajNyiri.

I’d like to record when a motion is detected, but with a delay of about 20 seconds so I can see what happened before the triggering event.
I tried to implement a intentional delay, but unfortunately it’s not working.
My first idea was to delay the stream with a ffmpeg parameter, but it seems to have no effect in this scenario.

The camera.record service offers this functionality (Lookback) when there’s an active HLS stream available.
Does anybody know if this can be done with ffmpeg parameters?
I played around a little bit, but it’s not working either and I feat that it could write a lot of files and damage the sd card.

Maybe any other ideas how I could implement this?
As a workaround I thought about recording 5 minute videos and delete the files if there was no movement in the last 5 minutes, but it seems like a very sloppy solution.

Thanks for your help!

Just found that integration which would be awesome to use for me with my cams. Francly I cannot get it to work. I’ve installed it inside custom_components and restarted my server. I am not able to find TAPO Option within the Integrations Tab. I am running on latest Home Assistant 2021.12.4. Any help and ideas appreciated.

Best regards.

Hello,

Make sure you have installed it properly following readme… or just use HACS, its better solution overall.
Make sure to clear cache.
Try restarting Home Assistant.
Try incognito mode.
Try different browser.

Thanks for the fast reply. Weirdly accessing through that Add integration button its working now. Thanks!

May i ask for another if possible at all feature: is it possible to limit access to internet for all cameras (pure local system) and then setting up a local dns (e.g. pihole) to match the notification server to receive motions send by camera after getting triggered and forward them locally to homeassistant to enable further actions e.g. notifications within homeassistant app?

Or is there a way to reset the motion detection after first trigger automatically so that persistent and reoccuring motion is noticed?

Thanks again for that great integration!

Cameras work without internet access through this integration.
Motion is detected via onvif protocol (default on). See readme for more info.


Binary sensor for motion doesn't show up or work

Motion sensor is added only after a motion is detected for the first time.

    Make sure the camera has motion detection turned on
    Make sure the camera has privacy mode turned off
    Make sure the camera can see you and your movement
    Try walking in front of the camera
    If above didn't work, restart the camera and try again

Also make sure that:

    binary sensor is not disabled via entity, check .storage/core.entity_registry for disabled entities, look for "disabled_by": "user" on platform "tapo_control". If it is, remove the whole entity or change to "disabled_by": null, and restart HASS.
    binary sensor is enabled in tapo integration options
    onvif port 2020 on camera is opened


I’ve read this part. And checked everything. Maybe i missunderstood but the motion is only triggered once? Or what is exactly meant by for the first time?

1 Like

The binary sensor will not be available after first adding the camera. It will be added, or become off/on state instead of unavailable/restored only after first motion is detected. Afterwards, it will be on or off depending on if there is a motion as you would expect.

you can just rewrite the file. i send it previously by telegram

  - alias: video movimiento cocina
    trigger:
      - platform: state
        entity_id: binary_sensor.sonoff_a44000ab1c
        from: 'off'
        to: 'on'
     
    action:
      - service: notify.XXX
        data:
          message: "Hay movimiento en la cocina!!!" 
      - service: camera.record
        target:
          entity_id: camera.xxxx
        data:
          filename: 'www/alarma/cocina_alarma.mp4' #file
          duration: 15
          lookback: 2
      - delay: 00:00:30
      - service: telegram_bot.send_video
        data:
          file: "www/alarma/cocina_alarma.mp4"
          target: (telegram) # todos
          timeout: 1000
          caption: "Detectado a las {{ now().hour }}:{{ now().minute }}"
1 Like

Thanks for your answer! Unfortunately I don’t understand how this helps with my problem.
I need a way to record what happens before a triggering event.

My last approach was recording 15 minute snippets and deleting the files when there was no movement in the last 15 minutes.
Unfortunately this doesn’t work because the files are sometimes 15 minutes, but sometimes just 2, 3 or 5 minutes. It seems like the recording is stopping randomly.

Hello, unfortunately i dont have a direct answer for you. You might however consider a proper nvr for your task as that will just do a better job. While home assistant has a service to record, its not intended for this task. You will just have a better experience with a software designed for the task.
Frigate is really great if you got the HW to run it. Personally I am running it on mac mini m1 processing 8 cameras with AI and it doesn’t even notice. There is no need for the coral HW.

1 Like

Thanks for your help! I’ll take a look at frigate.

1 Like

Hello!

How can i query in an automation, if the “Privacy Mode” is on or off?
Thanks in advance for any help! :slight_smile:

Take care!

Hi, firstly, thanks for this great integration! Secondly, is there anyone who has upgraded the camera’s firmware to 1.1.12 and still having success with viewing the stream in Home Assistant? I seem to only get detection alerts after updating to 1.1.12 on the C210 camera

Edit*

I checked the Home Assistant logs and I seem to be getting multiple errors like the following:

ERROR (stream_worker) [homeassistant.components.stream] Error from stream worker: Error opening stream rtsp://:@192.168.68.82:554/stream2

Edit2*

Seems it has to do with the new Tapo Care, if enabled and you have an SD Card inserted then NVR recording is disabled. It seems the solution is to remove the SD Card at this point.

1 Like

Yes, it is supposed to be an answer. Running an automation on a state change of an attribute is one of the easiest and the most basic things to do in Home Assistant.
You are requesting free help for an integration that was developed in my free time for free and you are being passive aggressive about it. Yet, you are not willing to read a free documentation of a free software that was written in free time of contributors and demand hand picking you an exact configuration lines. Thats not how it works and I am not going to give it to you.

12 Likes