[Custom Component] Tapo: Cameras Control

am I correct in thinking that motion sensing state is not currently supported but camera feeds are? I assume I can combine T:CC with ONVIF to get both. If so what would people recomend as the preferred video source, stream via ONVIF or stream via T:CC?

@JurajNyiri - superb work sir :slight_smile:

Thank you :slight_smile:

Yes you are correct. It is planned for 2.1 as onvif is able to get the status, I should be able to replicate the logic inside this integration.

I have created many more feature requests I plan to implement in the future, I need help with this one specifically.

As in which stream to use, I have just checked onvif integration and internal code works exactly the same.

1 Like

Version 2.1 has been released! :running_man:

New Features

Motion sensor

The first time your camera detects a motion it creates a new binary sensor. This sensor is updated in real time whenever there is a motion to on or off state.
After the next Home Assistant reboot, this sensor is restored with unavailable state until it detects motion again.

Motion sensor should recover from any reboots or disconnects of the camera automatically.

See the new troubleshooting section in readme if you have any questions regarding motion sensor before creating a new issue.

Camera image

Component now also provides an image of the current stream.

It generates it from the current stream on Home Assistant. While this is a common practice in other integrations too, we could do better and get the image directly from the camera instead. See this feature request if you would like to help.

New update coordinator

This release includes a rewrite of how updates are handled, resulting in 2 times reduction of number of requests outgoing camera while not affecting update speed.

Other minor updates

  • support for services camera.disable_motion_detection and camera.enable_motion_detection
  • support for services camera.turn_on camera.turn_off

Final remarks

If you need help…

Please open a new issue or a feature request, or discuss and ask for help on Home Assistant: Community Forum.

If you would like to help…

Join the discussion or see issues marked with help wanted.

There are already some examples going around with requests for more.

I would love to see what people already created with this camera on lovelace, so please open a PR and let’s share!

4 Likes

Created Discord server for support, research and discussion. Feel free to join! :slight_smile:

Would be possible to have those services implemented as entities where possible? Like motion detection being on or off could be a switch and the value would be updated by polling.

You could achieve this via a template switch, implementing it in camera doesn’t seem to be a common practice in other camera integrations.

1 Like

Actually I do use a Xiaomi camera with Dafang Hack, and the MQTT built-in adds all features of the camera as entities. So pretty easy then adding those to Lovelace cards.

I would still prefer not having it in the component if it can easily be achieved using native Home Assistant functionality.
Less things that can break, to maintain and to update when HASS changes stuff.

We could add some examples of template switches (along maybe also some nice lovelace cards) to the repo for easy setup if people wish to use them that way.

1 Like

I haven’t tried the services, but do they reflect the current state if changed from the Tapo app? That’s my point by the entities and to poll them from the camera. (As my understanding of the template switch, that it calls the service to do the change, and not just shows the state.)

It also shows the state.

value_template: "{{ is_state('sensor.skylight', 'on') }}"

Current values are polled into attributes of the camera in hass. You can get the state from there.

1 Like

Would it be possible to get an updated version of this because it doesn’t seem to work with the latest version? I’m new to Home Assistant and still trying to get my head around how all the code works - I replaced the entity_id with mine and I do get a stream, but the buttons don’t work. Thanks, and great job on this btw, had lost out hope of getting any kind of control of my C200 with HA until I stumbled across this.

Hello, you also need to change the services or create the scripts.

Hi,
Sorry for being slightly off-topic, but now that this awesome custom component is available, would you recommend the Tapo C200 as a fair priced camera for use primarily with Home Assistant (and local recording if needed)? Can it be completely cloud-free in terms of storing and processing data? I assume the cloud might still be needed for controlling it? Thanks.

You need cloud account to set up the camera for the first time, but after that I have put it offline and it works flawlessly. You can use all the features and record to sd card.

100% of it works offline. During my search for an indoor camera all the others required cloud, app or were not supported in Home Assistant. The only other one that was being recommended was Amcrest but that one is not sold in my country.

1 Like

After a little struggle, I think I have it:

type: picture-glance
title: Tapo C200
entities:
  - entity: camera.tapo_camera_xxxx_hd
    icon: 'mdi:home'
    tap_action:
      action: call-service
      service: tapo_control.set_privacy_mode
      service_data:
        entity_id: camera.tapo_camera_xxxx_hd
        privacy_mode: 'off'
  - entity: camera.tapo_camera_xxxx_hd
    icon: 'mdi:palm-tree'
    tap_action:
      action: call-service
      service: tapo_control.set_privacy_mode
      service_data:
        entity_id: camera.tapo_camera_xxxx_hd
        privacy_mode: 'on'
camera_image: camera.tapo_camera_xxxx_hd
camera_view: live
entity: camera.tapo_camera_xxxx_hd
hold_action:
  action: none

Thank you for the information, and for the awesome component!
Is it safe to assume the same goes for the C100 as well?
I think I have to give these cameras a try, looks really promising.

Added examples for lovelace cards and examples for template entities.

@Taomyn @GSzabados @v1nc

3 Likes

I don’t personally own C100 but people reported success with them and there are currently no issues opened related to any issues or bugs.

Yeah, seems like its the same camera as C200, just without pan/tilt.
I bought one C100 and one C200 yesterday, looking forward to test them as soon as I get the time.
I also noticed on the TP-Link website there is an outdoor Tapo camera coming soon:
https://www.tp-link.com/en/home-networking/cloud-camera/tapo-c310/
I think this one will be really interesting as well, if it is priced as affordable as the rest of the Tapo series.

Thank you, and the others for these. I did need to make an addition to the reboot action of “Camera control example” as it complained it was missing

      service_data:
        entity_id: camera.tapo_camera_xxxx_hd
1 Like