[Custom Component] Tapo: Cameras Control

Motion sensors now use name provided by camera. Because of this, your entity id might change. If you see an unavailable sensor after updating, you can safely remove it (do not disable!). Sensor will be recreated on first motion. You can change entity_id back to what you used to have.

binary_sensor.mycamera_cell_motion_detection is the motion sensor.

Thanks for clarification. I was not aware of the changed naming scheme of the motion sensor. Sorry for the trouble.

1 Like

Hi, I installed this great integration. Unfortunately I only have these two services to choose from. What I have done wrong? I have a TAPO C310. Can someone help me?

Were are the Others.

Hi JurajNyiri

First of all, thank you for the custom component for me it works great, thank you so much

Regarding using webhooks for motion sensor, can you please help with some examples of how to use it? I already activated the self-generated webhook (I am using Nabucasa) but not quite sure how to use it

Camera uses ONVIF standard to communicate motion events. This communication can work with 2 ways:

  1. Pullpoint: Client opens connection to the camera and waits until the camera responds. Camera responds only when there is some event to communicate. After camera responds, client reopens the connection and waits again.
  2. Webhook: Client tells the camera its URL to receive events at. When an event happens, camera communicates this to the URL client defined.

Webhooks are the preffered method of communication as they are faster and lighter. That being said;

  • Webhooks require an HTTP only HA setup because Tapo cameras do not support HTTPS webhooks
  • Webhooks require a proper base_url to be defined in HA, so that the URL communicated is correct (you can check URL sent by enabling debug logs for homeassistant.onvif)

Points above are automatically determined by this integration and if the HA does not meet the criteria, webhooks are disabled. That being said;

  • There are camera (and/or firmwares) which freeze when both webhooks and pullpoint connection is created, which happens at the start to see if webhooks is supported at all so that communication can fallback back to pullpoint.
  • There are camera firmwares which have pullpoint broken (1.3.6 C200) and only webhooks work

For webhooks to work, all the user needs to do is make sure he is using HA on HTTP and that the HA is available on the URL communicated.

Hi, I recently updated into the latest version, it worked fine but I noticed it increases the cpu usage up to 6% (before the update, idle cpu usage around 8% and now after the update, it became 14%). When I disabled the integration (all cameras) the cpu usage became normal. Is it the additional motion alarm causes this cpu usage spike? If so, is it safe to delete it?

You can disable motion sensor in configuration of device in ha. All changes were under the hood in Home Assistant.

I just disabled the motion alarm but the cpu usage remains the same at 14%.

Am I right in thinking that there is no binary sensor for baby cry detection yet?

Is there a way to receive this via webhooks?

No binary sensor yet for baby cry, and no unfortunately no it is not exposed via Onvif. If tplink chooses to expose this in the future it will automatically appear.

Hi, may I know how to determine if the camera uses pullpoint or webhook?

Hi, you can enable debug logs for both this integration and homeassistant.onvif. You will then be able to see it in the logs including the webhooks URL, if it is enabled.

1 Like

Hi
I’ve had 2 TC60s running with the Tapo: Cameras Control for a couple of years. I got the 3 entities (SD, HD, Motion) per camera fine, and had automations on motion too.
But for several weeks now all my entities have been Unavailable with an exclamation mark. Periodically it report Initializing but fails with a message Retrying Setup: None.
I’ve scanned the thread above but can only see posts relating to motion detection. I cannot see the videos that I used to be able to.
Also, I’ve just bought a new Tapo C110 and configured it on my LAN fine but have no idea how to add it to the Cameras Control.
All 3 cameras are working fine in the Tapo app.

Hi, follow instructions on how to add the camera from readme.
For unavailable cameras, see/post error from logs.

Thanks. I reinstalled, like the readme says to get it to find the new camera, and it did.
So now I’ve got 3 cameras that don’t work with the add-on.
Restarted HA then did a search for tapo in the logs and just got these 2 entries:-

Home Assistant Core
Unable to connect to Tapo: Cameras Control controller: ONVIFCamera.create_pullpoint_subscription() takes 1 positional argument but 2 were given
15:14:03 – (ERROR) Tapo: Cameras Control (custom integration) - message first occurred at 15:07:35 and shows up 24 times
Config entry '192.168.0.92' for tapo_control integration not ready yet: None; Retrying in background
15:07:35 – (WARNING) config_entries.py - message first occurred at 15:07:35 and shows up 3 times

Update to the latest version of HA and integration.

Thanks for your help.
I’ve updated HA and all the add-ons but I don’t know how to update the tapo integration. I can’t even find what version of it I’m running!
None of the tapo cameras are working yet. The error in the logs is now just:-

Source: setup.py:214
First occurred: 20:59:23 (1 occurrences)
Last logged: 20:59:23

Setup failed for custom integration tapo_control: Unable to import component: cannot import name 'NotificationManager' from 'onvif.client' (/usr/local/lib/python3.10/site-packages/onvif/client.py)

Follow installation steps in readme.

Thanks for your patience. So I just overwrote the directory with the newer version and it’s all working now. Looks like I just need to sort out the different motion entity.
Loving the Siren switch!