rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
404 stars 82 forks source link

VTO2202F as Generic RTSP Device and missing bell_pressed sensor #417

Open man-jiteshm-sportsbet opened 2 weeks ago

man-jiteshm-sportsbet commented 2 weeks ago

after upgrading to 9.0.66 and HA 2024.11 the camera is now appearing as Generic RTSP device.

lost some sensors like the doorbell_pressed

VTO 2202F-P-S2

man-jiteshm-sportsbet commented 2 weeks ago

debug log

2024-11-10 14:05:38.400 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/magicBox.cgi?action=getMachineName
2024-11-10 14:05:38.585 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/magicBox.cgi?action=getSystemInfo
2024-11-10 14:06:04.532 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream
2024-11-10 14:06:04.532 INFO (MainThread) [custom_components.dahua] Using max streams 4
2024-11-10 14:06:08.655 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=General.MachineName
2024-11-10 14:06:08.834 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/magicBox.cgi?action=getSystemInfo
2024-11-10 14:06:08.999 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/magicBox.cgi?action=getSoftwareVersion
2024-11-10 14:06:09.188 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/magicBox.cgi?action=getDeviceType
2024-11-10 14:06:09.355 INFO (MainThread) [custom_components.dahua] Using channel number 1
2024-11-10 14:06:09.558 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/coaxialControlIO.cgi?action=getStatus&channel=1
2024-11-10 14:06:09.558 INFO (MainThread) [custom_components.dahua] Device supports Coaxial Control=False
2024-11-10 14:06:09.748 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=DisableLinkage
2024-11-10 14:06:09.748 INFO (MainThread) [custom_components.dahua] Device supports disarming linkage=False
2024-11-10 14:06:09.928 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=SmartMotionDetect
2024-11-10 14:06:09.928 INFO (MainThread) [custom_components.dahua] Device supports smart motion detection=False
2024-11-10 14:06:09.928 INFO (MainThread) [custom_components.dahua] Device is a doorbell=False
2024-11-10 14:06:09.928 INFO (MainThread) [custom_components.dahua] Device is a floodlight=False
2024-11-10 14:06:10.094 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=Lighting[0][0]
2024-11-10 14:06:10.094 INFO (MainThread) [custom_components.dahua] Device supports infrared lighting=True
2024-11-10 14:06:10.095 INFO (Thread-7) [custom_components.dahua] Starting DahuaEventThread
2024-11-10 14:06:10.431 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=Lighting[0][2]
2024-11-10 14:06:10.431 INFO (MainThread) [custom_components.dahua] Device supports profile mode=False
2024-11-10 14:06:10.728 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
2024-11-10 14:06:10.734 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=Lighting[0][0]
2024-11-10 14:06:10.735 DEBUG (MainThread) [custom_components.dahua] Finished fetching dahua data in 7.508 seconds (success: True)
2024-11-10 14:06:10.933 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=DisableLinkage
2024-11-10 14:06:44.772 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=Lighting[0][0]
2024-11-10 14:06:45.122 DEBUG (MainThread) [custom_components.dahua] ClientError fetching information from http://192.168.30.108:80/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
2024-11-10 14:06:45.122 DEBUG (MainThread) [custom_components.dahua] Finished fetching dahua data in 4.817 seconds
man-jiteshm-sportsbet commented 2 weeks ago

looks like it is failing to get client information from the intercom when doing these http calls, resulting in setting it as Generic RTSP

https://github.com/rroller/dahua/blob/main/custom_components/dahua/__init__.py#L200-L202

man-jiteshm-sportsbet commented 2 weeks ago

i was able to resolve this by disabling HTTPS on my dahua intercom. somehow it had switched on. after i restarted my intercom, it was detected as the right model again. no longer a Generis RTSP device