You could achieve this via a template switch, implementing it in camera doesn’t seem to be a common practice in other camera integrations.
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.
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.
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.
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.
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
I have a C100 outside at my frontdoor, its in a sheltered position under the eves of the entrance but has been running fine for 2-3 months now.
Thanks, that’s nice to know. I could probably do the same at my entrance, but not for the other walls. Where I live we also have all kinds of harsh weather, so it would be nice to have the extra protection. Also it seems to have higher resolution and longer night vision range, which can be useful. If it’s priced fairly I will probably try it out when it’s available, especially if i also works with this custom component.
Hi, I’m havinh problems adding my camera. I fill in my tapo credentials (Username/password is the ones I created in the Tapo app) and my cameras IP address.
What format should the IP have? http:// or https:// or just the IP as 192.168.1.xxx?
When using only 192.168.1.xxx i get this
when using http://192.168.1.xxx I get
Any help is appreciated!
Hello,
it should be IP address, usually 192.168.x.x.
Username and password are set in the Tapo app, under advanced settings, under camera settings. Use whatever you set there over here, do not use your Tapo cloud account.
If it still doens’t work try setting different username and password in the app.
Also check if credentials work in rtsp stream via vlc.
If i remember correctly i had problem with the password for tapo. I had other characters than numbers and letters in the password. When i removed those it worked.