JurajNyiri / HomeAssistant-Tapo-Control

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

Updating tapo_control switch took longer than the scheduled update interval / Update of switch.xxx_privacy is taking over 10 seconds #448

Closed codyc1515 closed 8 months ago

codyc1515 commented 8 months ago

Description

There must be a blocking function somewhere in the integration. I was not able to imemdiately find where. I was not using the cloud integration features at that point, so was all local. I do not otherwise have issues with the camera.

Reproduction Steps

Not clear, will keep looking.

Expected behavior

No timeouts.

If applicable, add error logs.

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:927
First occurred: 04:47:00 (12 occurrences)
Last logged: 09:33:03

Update of switch.dining_room_camera_privacy is taking over 10 seconds
Logger: homeassistant.components.switch
Source: helpers/entity_platform.py:857
Integration: Switch (documentation, issues)
First occurred: 04:47:20 (1 occurrences)
Last logged: 04:47:20

Updating tapo_control switch took longer than the scheduled update interval 0:00:30

Device Firmware

1.3.6 Build 230424 Rel.77225n(4555)

Integration Version

5.4.2

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

OS

Search for similar issues

Yes

Additional information

access_token: xxx
model_name: C200
brand: TP-Link
motion_detection: on
frontend_stream_type: hls
device_type: SMART.IPCAMERA
device_model: C200
device_name: C200 1.0
device_info: C200 1.0 IPC
hw_version: 1.0
sw_version: 1.3.6 Build 230424 Rel.77225n(4555)
device_alias: Dining Room Camera
avatar: camera c212
longitude: 0
latitude: 0
has_set_location_info: 0
features: 3
barcode: 
mac: 28-EE-52-93-E9-D3
dev_id: 80215ACBBFF1B116E989BD4366B7BBF31E273DDA
oem_id: 8902D2F34FCE407721DE92F5759839C2
hw_desc: 48574445534300000000000000000001
alarm: off
user: homeassistant
presets: 
{}

record_plan: 
sunday: '["0000-2400:2"]'
monday: '["0000-2400:2"]'
tuesday: '["0000-2400:2"]'
wednesday: '["0000-2400:2"]'
thursday: '["0000-2400:2"]'
friday: '["0000-2400:2"]'
saturday: '["0000-2400:2"]'

entity_picture: /api/camera_proxy/camera.dining_room?token=xxx
icon: mdi:webcam
friendly_name: Dining Room Camera
supported_features: 3
JurajNyiri commented 8 months ago

This is expected if camera takes long to respond. Could be due to numerous factors, such as bad network, overloading camera etc.

codyc1515 commented 8 months ago

This simply happens on start-up. Why should we delay HA by 30 seconds? Doesn't make any sense to me. If it didn't respond in 5 seconds, it's probably not going to respond at all. Just needs a time out added here.

JurajNyiri commented 8 months ago

@codyc1515 It does respond.