dahua
dahua copied to clipboard
Amcrest AD110: Error: 400, message='Bad Request', url=URL('http://192.168.100.137:80/cgi-bin/snapshot.cgi?channel=1')
I know that the Amcrest AD110 is not officially supported, but ... :-)
Home Assistant Core 2022.6.7 Home Assistant Supervisor 2022.05.3 Home Assistant OS 8.2 Dahua Integration: 0.9.40 FYI: The problem has existed for a while.
`Logger: aiohttp.server Source: custom_components/dahua/client.py:722 Integration: Dahua (documentation, issues) First occurred: 17:05:09 (15 occurrences) Last logged: 17:18:10
Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 220, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 741, in get return await self.handle(request, camera) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 759, in handle image = await _async_get_image( File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 179, in _async_get_image if image_bytes := await camera.async_camera_image( File "/config/custom_components/dahua/camera.py", line 233, in async_camera_image return await self._coordinator.client.async_get_snapshot(self._channel_number) File "/config/custom_components/dahua/client.py", line 74, in async_get_snapshot return await self.get_bytes(url) File "/config/custom_components/dahua/client.py", line 722, in get_bytes response.raise_for_status() File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('http://192.168.100.137:80/cgi-bin/snapshot.cgi?channel=1')
OK there is a problem with the URL for the snapshot.cgi but what problem exactly? I have no way of changing the URL. The setting auto or live for camera_view doesn't matter either.
`type: grid square: false columns: 1 cards:
- type: entities
entities:
- entity: binary_sensor.ad110_haustur_audio_mutation name: Audio Mutation
- entity: binary_sensor.ad110_haustur_button_pressed name: Button Pressed
- entity: binary_sensor.ad110_haustur_call_no_answered name: Call No Answered
- entity: binary_sensor.ad110_haustur_door_status name: Door Status
- entity: binary_sensor.ad110_haustur_invite name: Invite
- entity: binary_sensor.ad110_haustur_motion_alarm name: Motion Alarm
- entity: binary_sensor.ad110_haustur_video_loss name: Video Loss title: AD110 Haustür
- show_state: true show_name: true camera_view: auto type: picture-entity entity: camera.ad110_haustur_main`
Maybe you can solve the problem, because otherwise the integration works with the Amcrest AD110.
If the error has already been mentioned here and I missed it: Sorry.
Same issue and button detection is not working.
Same issue here, as well. Using the url in browser to take snapshot works, so maybe something with the request is off?
I see a similar error with the regular amcrest integration for one of my cameras. I suspect that it's an issue with Wifi signal but can't be sure.
I just bought the AD110 and am new to Home Assistant. I have the dahua folder in HA but I'm not getting any live stream. I am sure I have to change something somewhere but I don't know where to start. Any help is much appreciated!!
Same issue on latest core as well. Anyone have a way they updated this or solved? TIA