JurajNyiri / HomeAssistant-Tapo-Control

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

C200 hw v2.0 motion / sound detection stopped working #486

Closed dogmatic69 closed 6 months ago

dogmatic69 commented 6 months ago

Description

I've got two C200's and one has working sensors while the other does not. Video works for both as per usual.

Noticed that the non working had different software version and could not update so then noticed the hardware v2 instead of the v3 for working

not working:

C200
by TP-Link
Firmware: 1.3.9 Build 231019 Rel.38052n(4555)
Hardware: 2.0 

working

C200
by TP-Link
Firmware: 1.3.11 Build 231115 Rel.85400n(4555)
Hardware: 3.0 

The sensors did work previously on the v2 hardware, not sure why it should stop working when the fw version is not all that different.

Reproduction Steps

v2 hardware, latest fw

Expected behavior

sensors like motion, noise etc should work regardless of hw version

If applicable, add error logs.

No response

Device Firmware

1.3.9 Build 231019

Integration Version

5.4.12

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

HA OS on Blue

Search for similar issues

Yes

Additional information

No response

dogmatic69 commented 6 months ago

Comparison of the working vs not camera image

Another example of a sensor, note the cat cam is on v2 and sensors are "restored" image

JurajNyiri commented 6 months ago

Read faq regarding onvif. Both noise and motion reuse onvif and ffmpeg noise integrations from HA. Please try it there, if it works there and not here post debug logs and we can reopen.

dogmatic69 commented 6 months ago

The only mention of onvif is related to a port. Nothing has changed on my network to block ports.

Has something changed in the integration? Like I said it WAS working just fine till a recent update. Around the time it stopped working, the integration also recreated all the sensors with _2 suffix. Those are the current attached to the device and don't ever update.

dogmatic69 commented 6 months ago

looking at debug logs I can't see any reason it should not work.

2023-12-19 22:16:28.221 DEBUG (MainThread) [custom_components.tapo_control] Raw update data:
2023-12-19 22:16:28.222 DEBUG (MainThread) [custom_components.tapo_control] {'getDeviceInfo': 
...
'getDetectionConfig': {'motion_detection': {'motion_det': {'.name': 'motion_det', '.type': 'on_off', 'enabled': 'on', 'sensitivity': 'medium', 'digital_sensitivity': '50', 'enhanced': 'on'}}}, 
...
'getBCDConfig': {'sound_detection': {'bcd': {'.name': 'bcd', '.type': 'on_off', 'sensitivity': 'medium', 'digital_sensitivity': '50', 'enabled': 'on'}}}, 
...
2023-12-19 22:16:28.222 DEBUG (MainThread) [custom_components.tapo_control] getCamData - done

and more logs indicating it should be working

2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Found cached capability getMotionDetection, creating TapoMotionDetectionDigitalSensitivity
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] TapoMotionDetectionDigitalSensitivity - init - start
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Motion Detection - Digital Sensitivity - init - start
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Motion Detection - Digital Sensitivity - init - append
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Motion Detection - Digital Sensitivity - init - update
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Motion Detection - Digital Sensitivity - init - TapoEntity
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Motion Detection - Digital Sensitivity - init - NumberEntity
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Motion Detection - Digital Sensitivity - init - end
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Adding tapoMotionDetectionDigitalSensitivity...
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Found cached capability getAudioConfig, creating TapoMicrophoneVolume
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] TapoMicrophoneVolume - init - start
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Microphone - Volume - init - start
2023-12-19 22:16:26.381 DEBUG (MainThread) [custom_components.tapo_control] Tapo Microphone - Volume - init - append
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Microphone - Volume - init - update
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Microphone - Volume - init - TapoEntity
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Microphone - Volume - init - NumberEntity
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Microphone - Volume - init - end
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Adding tapoMicrophoneVolume...
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Found cached capability getAudioConfig, creating TapoSpeakerVolume
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] TapoSpeakerVolume - init - start
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Speaker - Volume - init - start
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Speaker - Volume - init - append
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Speaker - Volume - init - update
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Speaker - Volume - init - TapoEntity
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Speaker - Volume - init - NumberEntity
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Tapo Speaker - Volume - init - end
2023-12-19 22:16:26.382 DEBUG (MainThread) [custom_components.tapo_control] Adding tapoSpeakerVolume...
dogmatic69 commented 6 months ago

Looks like the bug is in detecting these settings. Even though it shows as "on" in the integration I've just discovered it is off in the camera app (which I hardly use).

JurajNyiri commented 6 months ago

Looks like the bug is in detecting these settings. Even though it shows as "on" in the integration I've just discovered it is off in the camera app (which I hardly use).

Entities control settings in the app - camera control, integration options are integration options, not camera control.

Read faq regarding motion detection - onvif. Both noise and motion reuse onvif and ffmpeg noise integrations from HA. Please try it there, if it works there and not here post debug logs and we can reopen.

dogmatic69 commented 6 months ago

image

Even if turned off in the app, this shows as on

dogmatic69 commented 6 months ago

The debug logs are not very useful with more than one camera. Impossible to know which log entries apply to which camera.

JurajNyiri commented 6 months ago

Unfortunately I am not able to help you if you are unwilling to follow the instructions I have asked from you twice now.

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371