[Custom Component] Tapo: Cameras Control

This is known. Firmware is broken.

Yes i know , well i just played around, so i might accidental have enable in on the phone app, also :slight_smile:
EDIT: this is the price one pays , when trying to keep stuff on latest firm :slight_smile: , i recall i ones said that i would wait with my updates,(i case you needed device for older firmware)
Factory-reset should be mandatory option on these devices(these days)

Is there a known way to downgrade the firmware?

problem is to find the right one , i have hardware v1, can only find firmware 1.1.16/17, thou for v3( i assume this is hardware version) there is a 1.3.0

Anyone here who have a C200v1 , firmware1.3.0 ? , or url to same or 1.1.18 ?

New version solving the issue will be ready tonight.

1 Like

Version 5.2.0

New Features

  • Uses Webhooks for motion detection. This is a lot more efficient and faster way to get events. Check FAQ if you are encountering issues with motion sensor being stuck in Detected state, you probably need to set your internal HA IP properly.
  • Now can expose more than 1 motion sensor. It exposes everything that camera sends. It now also uses name provided by camera.

Fixes

Breaking Changes

  • 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.

Notes

Thank you @bdraco for implementing all the required changes in onvif and helping me debug the issue on affected cameras.

1 Like

Great update for motion sensor fix. What is the difference ietween the Cell Motion Detection & the Motion Alarm binary sensors?

While the Tapo applicaiton is now supporting a specific person detection versus motion detection, is it planned to get also at some point a binary sensor for person detection only in HA?

2 Likes

Your guess is as good as mine. :slight_smile: It is whatever camera exposes.

Camera does not expose it via Onvif but we do have an issue open tracking work on an alternative way to get events (including person detection) but it’s not ready yet.

1 Like

Sorry for my ignorance on this but can you explain a bit more? I updated the repository, removed my existing cam in HA and added it again. Still not seeing a motion sensor among the entities of the device. My HA is exposed using cloudflare and https, not sure if this is doing something there. The local way of reaching homeassistant still works without https tho. Not sure if I’m doing something wrong. I don’t know if I need to activate something or what. Thanks in advance

Update: I’m seeing this error on logs now
Logger: homeassistant.config_entries
Source: helpers/entity_component.py:179
First occurred: 18:18:20 (1 occurrences)
Last logged: 18:18:20

Error setting up entry 192.168.0.165 for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 131, in async_setup_entry
return await component.async_setup_entry(entry)
File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 179, in async_setup_entry
raise ValueError(“Config entry has already been setup!”)
ValueError: Config entry has already been setup!

Hey, @JurajNyiri.

Sorry to go back a while; things started working again. But I had to put frigate aside.

Now, I’m trying what you said about using the restream for this integration.
So, sorry for the mix, but can you give some tips on how your doing it?

For instance, in frigate.yaml, I’m using:

go2rtc:
  streams:
    outsidefront:
      - rtsp://outsidefront:[email protected]:554/stream1
cameras:    
  outsidefront:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/outsidefront #hd 1920x1080 - stream1
          input_args: preset-rtsp-restream
          roles:
            - detect
            - record
    detect:
      width: 1920
      height: 1080
      fps: 5

How should I go about adding the restream to this integration?

edit:

Hmmm… even if I try to add only the sub stream, to the integration, I’m getting: “Failed to establish a new connection”. Using the ip from the camera itself will it not create another connection?
I was able to add the sub stream (stream2) to Synology’s Surveillance Station.

Hi all, I’m a newbie and I’m starting to play with HA and this great Tapo integration. I have two C210 cameras. I’m running HA 2023.5.2 and Tapo Cameras Control 5.2.2.
The first time I have configured cameras in HA, everything seemed to work fine and I was able to see motion binary sensor change their value when movement was detected. Now, after a few days and a few camera’s reboot, camera interaction seem still ok (I can set/unset privacy mode, move it to preset) but binary_sensor.tapo_1_cell_motion_detection always remains “unavailable” even when movement is detected (and when Tapo app notifies it to me).
I don’t understand why sensor’s value is no more updated. Can you help me pointing to a log or something I can read to understand what’s happening?

Ps. camera’s IP is still the same

I experience similar issues with my C110 as the motion sensor does not reappear anymore since the recent update(s). But I found a kind of a workaround with that cell motion detection sensor entity:

binary_sensor.mycamera_cell_motion_detection.

I am not really sure what exactly this sensor is good for and how it can be configured. My guess is: Once configured, the sensor will be able to report motions in specific portions (cells) of the image.

On trial I changed all references in my code from binary_sensor.mycamera_motion to binary_sensor.mycamera_cell_motion_detection and it seems to do the trick as it reports motions (although not configured in any way). I cannot judge whether the behavior is exactly the same like before but for me it works so far.

According to

just change all references in your code from former binary_sensor.mycamera_motion to binary_sensor.mycamera_cell_motion_detection (or rename the entity) and you’re done.

1 Like

As stated in release notes of 5.2.0 breaking changes.

I was aware of this and did follow all your instructions from the FAQ. Nevertheless, the motion sensor did not show up again so I looked for a different solution. I hope the workaround which I posted here may be useful for other people who have similar issues.

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