dahua
dahua copied to clipboard
404 in a eventManager.cgi attach call - incorrect url construction
Got this from HA logs
source: custom_components/dahua/client.py:741
404, message='Not Found', url='http://192.168.3.65/:80/cgi-bin/eventManager.cgi?action=attach&codes=%5BVideoMotion,CrossLineDetection,AlarmLocal,VideoLoss,VideoBlind,AudioMutation,CrossRegionDetection,SmartMotionHuman,SmartMotionVehicle%5D&heartbeat=5'
Looks like URL is not properly constructed - port :80 comes after / which makes it part of the path leading to 404
Traceback (most recent call last):
File "/config/custom_components/dahua/client.py", line 741, in stream_events
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1161, in raise_for_status
raise ClientResponseError(
...<5 lines>...
)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url='http://192.168.3.65/:80/cgi-bin/eventManager.cgi?action=attach&codes=%5BVideoMotion,CrossLineDetection,AlarmLocal,VideoLoss,VideoBlind,AudioMutation,CrossRegionDetection,SmartMotionHuman,SmartMotionVehicle%5D&heartbeat=5'