[Custom Component] Tapo: Cameras Control

Hey this error means that at that time host (tapo camera) was unreachable. I am not sure what could be the cause tbh, probably something on network, hass, camera or in network itself.

Does the rtsp stream via official integration work at the time when this happens?

Hi guys !!
I’m new to Home assistant, and so far I’ve been able to add everything I wanted.
Now I’m waiting for a C200 to be delivered and I’m in the process of preparing the integration for when it is delivered.
I have one question though regarding this :

For which IP address do I have to open these ports ?
The camera one or the Home assistant one ?
I’m not sure of what I have to do and how to do it…

Thanks in advance !

EDIT: just to be sure, what should be Source IP and Destination IP (this is what my firewall asks for)

Hey, this heavily depends on your network setup and is different for every router.

If you do not use some custom settings like different vlans etc you should not be needed to do anything. If you do, you should know how to do it :smiley:

Ok thanks,
Will try to add my camera when it arrives and if I’m stuck I’ll ask for help ahah

Well, little update, camera has been delivered and it works like a charm !!
Now I have a little question :
Would it be possible in a future version to have access to the “predefined” positions ? (the ones you save in the app when you want to quickly move the camera by just pressing one button).

Also, does any of you know how I could set an automation to send me notifications on motion detection ONLY if I’m not at home ?
I’ve been trying to do this for the most part of the afternoon, by detecting the presence of my phone at home, with no luck…

Hey, glad to hear everything is working!

Predefined positions are available, you can save, delete and set them via ptz. Check the readme services section.

Oh I’m so sorry, I didn’t see I could click on tapo_control.ptz to have more details…
Many thanks for your great work.

PS: I am not able to trigger an automation with the motion sensor, HA has perfectly created the sensor and motion detection works with the tapo app (it sends me a notification but HA does not, so it must be something wrong in my automation). I am basically trying to send a notification to my phone when motion is detected. Would you have a YAML example for this kind of thing ?

Many thanks

EDIT: well after fiddling a little with HA, I’ve been able to do what I wanted to do, and even more ^^

Hello, thanks for the great component. I’ve added my C100 and everything was ok but i assigned a static IP to my cam and now i can’t update the original IP address. How can i update the IP of the already added cam?

Hello, remove the camera and add again.

This looks amazing!
I do not own a Tapo C200 yet but wanted to buy one once I have HA set up.

I hope I did not miss it in this thread, but I could not find any information whether your component allows motion tracking. I know the Tapo App does not/the camera does not do it ootb.
But is the component able to track motion?

Another thing I was wondering about was the delay mentioned. Does this mean that the image/video one sees is in fact not live? How bad is the delay? Because if you wanted to move the camera manually to follow the intruder, a noticable delay may be problematic.

Yes it does support auto tracking, check readme.

The delay is around 6 seconds and you will get it with every camera in home assistant. It’s not component related.

Hi
Is it possible to save/record the videos when motion detected?
Thanks

Could this be an option?

Hello,

Yes, https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/40#issuecomment-731750934

3 Likes

Hey thanks for this integration, it works nicely :slight_smile: Only issue is that using the stream component in HA I get a freaking big lag between lovelace and the camera feed.

Without it and using the ffmpeg component it works better however the lovelace card stops working after a while, it doesn’t show anything, just a little box like it doesn’t find any image.

Anyone else having this issue?

Hey, by using the ffmpeg you mean this - https://www.home-assistant.io/integrations/camera.ffmpeg/ ?

I tried with that and I get the same delay on both.

The delay issue is well known on Home Assistant and there is nothing I can do from integration side unfortunately.

When you disable stream component completely, the delay is a lot better but has other issues

I am currently working on a way to reduce delay by adding ability to NOT use Home Assistant stream component.

I am doing some testing to provide good and valid instructions for users.

If you guys wish to test it right now, the new version is available at https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/next - it will be released very soon after my testing is done.

Edit: Released 2.4.1.

1 Like

Version 2.4.1 :rocket:

Description

This release adds an option for a user to choose to use stream component which when disabled, might provide a lot shorter playback delays for some users at a cost of higher CPU usage. Defaults to enabled.

There are advantages and disadvantages to both.
Enabled - Bigger delay, lower CPU usage, but player has an ability to stop, rewind etc. This is the default and recommended behaviour of Home Assistant if stream is enabled in configuration. More info: https://www.home-assistant.io/integrations/stream/
Disabled - A lot shorter delay, higher CPU usage, but no controls over playback.

Addresses issues https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/54 and https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/37.

This is a known issue of Home Assistant.

There might be some disadvantages to doing this, like losing option to control playback and a higher CPU usage.
Results depend on your hardware and future Home Assistant updates.

If you disable stream and your hardware is not up to the task, you will get artifacts, bigger delay and freezes.

Try it out and see what works best for you.

If you encounter any issues worth mentioning in readme while not using a stream component for the camera, please report them via a new issue or a PR.

Breaking changes

None. Your settings will be automatically migrated properly and the behaviour of the camera stays the same.

3 Likes

I have switched off stream for all my cameras with 2.4 on my RPI 4 and the delay is significantly better, around a second. What is awesome is that in my picture-glance card I am still getting live view just like before.

Let’s see what (if any) disadvantages doing that brings. :thinking:

I encourage everyone annoyed by the long delay doing that too and reporting issues / disadvantages / results here or via a new issue on github.

Edit: Switched back, having 3 cameras without stream killed my CPU and delay was back, along with freezes and artifacts. It was working fine for 1 camera.

3 Likes

Thanks for your reply, I’m indeed using that integration. To do so, I declare ffmpeg: in configuration.yaml and that’s it.

Using this integration it runs fin on my RPI4 4Gb with 1 camera, gonna buy 2 more :slight_smile:

In terms of CPU, just checked and with 1 I get about 12%CPU used only by ffmpeg, so yeah the issue can maybe crap everything out is only using ffmpeg.

However for the lag, I get more than a second of difference. With ffmpeg I get no lag, with stream I get between 3sec to almost 10sec :S

FYI, I’m using debian 10 and docker for HA, not HAS OS.

EDIT/// Go to know, the CPU craps out only if there is someone using the app to visualize the camera.