JurajNyiri / HomeAssistant-Tapo-Control

Control for Tapo cameras as a Home Assistant component
Apache License 2.0
968 stars 81 forks source link

Preview / still image #402

Closed maximemoreillon closed 10 months ago

maximemoreillon commented 10 months ago

Description

Hello,

Thank so much for this amazing component. I managed to successfully integrate a C100 and C310 in my Home Assistant instance.

The only issue I have is that I can't seem to be getting previews / still images for the cameras' cards, should that be the HD or SD streams.

image

I can see the streams without problems if I click the cards.

Also, if I integrate the cameras as "generic cameras" using the RTSP URL in Home Assistant, previews are generated without problems.

Reproduction Steps

Register a Tapo C310 or C100 camera and using the default configuration

Expected behavior

Having previews / still images of the streams

If applicable, add error logs.

I am not sure if this is related but I get the following console output from Home Assistant

[haffmpeg.tools] Timeout reading image.

Device Firmware

C100: 1.3.4, C310: 1.3.5

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Docker

Search for similar issues

Yes

Additional information

Home Assistant version: 2023.8.2

Device settings:

JurajNyiri commented 10 months ago

Camera is probably overloaded by too many concurrent streams (generating a preview opens another instance of stream). The logic of this integration works the same as the official ha Onvif integration.

As a workaround you can use live view or even better, webrtc integration.

maximemoreillon commented 10 months ago

Thank you very much for your reply! I tried with the official HD ONVIF integration and I get the same issue so the problem is indeed not coming from the Tapo Control component