[Custom Component] Tapo: Cameras Control

Thank you. I have managed to fix this and do most of the automations I want to. Is it possible to provide a brief explanation on how to add the scripts and card to set the camera to Away/Home mode?

@JurajNyiri question, do you use some kind of “Stream Preload” hardcoded in the integration?

I recently had to remove the stream integration from HA due to instability (not related to the TPLink camera but apparently due to my hikvision camera), and I notice that the following shows in the log after every HA restart,

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 269, in preload_stream
stream = await camera.create_stream()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 383, in create_stream
self.stream = create_stream(self.hass, source, options=self.stream_options)
File "/usr/src/homeassistant/homeassistant/components/stream/__init__.py", line 66, in create_stream
raise HomeAssistantError("Stream integration is not set up.")
homeassistant.exceptions.HomeAssistantError: Stream integration is not set up.

My other camera, when the stream component is active, shows a “Preload” check box, that is NOT active. However the TAPO cam does not show that checkbox,ever, so I wonder if it’s preloading no matter what.

If it’s pre-loading can we make this optional? so that if the stream component is not present, then the cam won’t attempt to use it.

Note that in this integration configuration, I had unchecked “use Stream” and restarted HA several times after doing that.

It already does this.

I am not sure why it would not show preload if its using stream. It just tells home assistant rtsp link to stream, thats all from stream point of view. The rest is handled by Hass.

With “stream:” enabled, the hikvision cam (onvif integration) shows:

image

The tapo cam:
image

Are you able to see the “preload” checkbox when you click on the picture-glance image and the stream window opens up in the browser or the HA app?

You have stream turned off in this example since the picture is rotated.

Triple checked, I have “stream:” in the config uncommented, and also, in the “Info” panel of HA:

I do have an transpose ffmpeg configuration in the TAPO integration config. Puzzling.

On the screen you provided you have stream turned off for integration.

Did you change this setting since then?

You are right, sorry about that, I had forgotten to change that setting within the Tapo integration for this test, and then restart HA, I got confused at some point in the process.
After I did that, I am able to see that: a) the picture-glance item remains rotated the way I wanted, b) when I click on the picture, the stream opens, the rotation is gone (as expected), and now I DO see the “preload stream” checkbox. Also i no longer see stream-related errors in my log which had prompted me to disable stream.
FWIW I believe these errors came when activating pre-load in either tapo or hikvision or both; when those errors where present, I had a stability issue with HA, the container would crash once or twice a day. It took me a long time to correlate the crashes with the stream/preload option

1 Like

HI,
First things first, congratulations for the fantastic work you have done on custom_components for the community.
the TAPO integration is starting to give some errors in regards to resize the stream , and mentions that author should be contacted.
This started to happen with the new release of HA 2021.09 .
will you work on this issue ?

error:

WARNING (MainThread) [homeassistant.components.camera] The camera entity camera.tvcam_sd does not support requesting width and height, please open an issue with the integration author

Hello, thank you for letting me know! Please open an issue on github and I will take a look.

Thank you, I’ve just register the issue

Hi

Maybe the question has been already answered but what type of detection is supported by this integration ? Only basic motion ?

Thanks.

I just tried the integration and i just have two entity : hd and sd stream.
How motion detection work ?
Is it possible to trigger house/away mod ?
Thanks.

Hello,

Read readme, all your questions are answered there.

Oh yes it’s better with a small read.
It answered my questions except the « house/away mod » in tapo app, is it possible to trigger that ?

Thanks !

Home/Away mode in app just does whatever is possible via services. You can do the same and more by using those services in scripts and creating a switch for example.

I successfully add a camera but the others give me this error


The stream1 flux is not working in vlc but the stream2 work.

Any idea ?

Looks like a camera bug, try rebooting it and try again.

I tried everything i can, impossible to add camera anymore.
Working with onvif integration