imou_life
imou_life copied to clipboard
No video feed from Ranger 2 (IPC-A22E-D)
Version of the custom_component
HACS imou 1.0.12
Camera: IPC-A22E-D (Ranger 2 (2MP)) by Imou Firmware: 2.800.0000000.11.R.221208
Describe the bug
Adding my new Ranger 2 (2MP) via the HACS integration is successful, and there are parameters of the camera that are valid, but the video feed itself is broken (see screen). I've enabled logs for the integration and I got this error log below. Just for reference, I have the same camera (but IPC-A22E w/o -D) that I bought one year ago and it works just fine. I've tried:
- factory resetting
- using the macOS ConfigTool
- regenerating the API keys in the imou web panel
Debug log
Logger: homeassistant.components.camera
Source: custom_components/imou_life/camera.py:106
Integration: Camera (documentation, issues)
First occurred: 09:46:59 (2 occurrences)
Last logged: 09:46:59
Error adding entities for domain camera with platform imou_life
Error while setting up imou_life platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 442, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 717, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 812, in add_to_platform_finish
await self.async_internal_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 665, in async_internal_added_to_hass
await self.async_refresh_providers()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 676, in async_refresh_providers
self._rtsp_to_webrtc = await self._async_use_rtsp_to_webrtc()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 686, in _async_use_rtsp_to_webrtc
stream_source = await self.stream_source()
File "/config/custom_components/imou_life/camera.py", line 106, in stream_source
return await self.sensor_instance.async_get_stream_url()
File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 656, in async_get_stream_url
raise APIError("unable to get live streaming")
imouapi.exceptions.APIError: unable to get live streaming

Hi, can you please also trying enabling debug mode on the imouapi library as well as described on https://github.com/user2684/imou_life#debugging? We should see a bit more details regarding the error in this way. Thanks!
This one? `Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/imou_life/camera.py:106 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 3 February 2023 at 09:51:39 (2 occurrences) Last logged: 3 February 2023 at 09:51:45
[140345299114240] Error handling message: Unknown error (unknown_error) from 192.168.1.117 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 800, in ws_camera_stream url = await _async_stream_endpoint_url(hass, camera, fmt=msg["format"]) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 957, in _async_stream_endpoint_url stream = await camera.async_create_stream() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 518, in async_create_stream source = await self.stream_source() File "/config/custom_components/imou_life/camera.py", line 106, in stream_source return await self.sensor_instance.async_get_stream_url() File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 656, in async_get_stream_url raise APIError("unable to get live streaming") imouapi.exceptions.APIError: unable to get live streaming `
This is just the last error message, I wanted to have a look at the previous debug output from the library. If you can ensure you have imouapi: debug to your logger as well you should see a good number of debug messages related imouapi as well which should tell step by step what it is doing and if there is any previous step which is returning weird outputs. Thanks!
config_entry-imou_life-3ee42333dbef9d5d4a08140c2c9cab25.json.txt home-assistant_imou_life_2023-02-04T20-53-05.031Z.log Hope those help, sorry its the first time I'm posting debug logs from HA. I've enabled debugging on the integration (and then disabling it downloaded the second file). The first file is the integration Diagnostics.
Just FIY, I can get a feed using for instance VLC or ONVIF integration.
Thank you. Unfortunately even the debug log is telling much but this is my mistake since I did not make the error message verbose enough. I'll fix it in the next release (not the bug itself but the error message so for me to understand where the problem is). Great that it is working with VLC and ONVIF as a workaround. Those are unrelated since relies on a direct connection to the camera while the HA integration is getting the stream from the cloud :-) I'll let you know as the new version is available for downloading
Hi, try updating to v1.0.13 just released and repeat the steps above, hopefully you should see a more verbose error message. Thanks!
Thanks, here you go. home-assistant_imou_life_2023-02-23T22-48-34.089Z.log config_entry-imou_life-c43540936ae88c2eec563d345799f14d.json.txt
HA log: `Logger: homeassistant.components.camera Source: custom_components/imou_life/camera.py:106 Integration: Camera (documentation, issues) First occurred: 23:40:15 (2 occurrences) Last logged: 23:40:15
Error adding entities for domain camera with platform imou_life Error while setting up imou_life platform for camera Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 442, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 717, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 812, in add_to_platform_finish await self.async_internal_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 665, in async_internal_added_to_hass await self.async_refresh_providers() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 676, in async_refresh_providers self._rtsp_to_webrtc = await self._async_use_rtsp_to_webrtc() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 686, in _async_use_rtsp_to_webrtc stream_source = await self.stream_source() File "/config/custom_components/imou_life/camera.py", line 106, in stream_source return await self.sensor_instance.async_get_stream_url() File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 670, in async_get_stream_url raise APIError(f"unable to get live streaming, url not found in {existing_stream}") imouapi.exceptions.APIError: unable to get live streaming, url not found in {'url': None, 'token': None} `
Thanks. Unfortunately it doesn't help progressing :-/ We ask for a streaming handle to the Imou server and we get nothing back but no error serverside. Do you get this consistently or is it happening randomly ? Thanks
I didn't work even once. I'll try again to rule out stuff like the router, and maybe HA instance, and regenerate the api keys. I'll report back.
Thanks. I've also added #53 to help with this in the long term since as of now I don't have a list with all the models for which the integration works so not sure if other users had better luck with your camera :-/
I have the same Problem with IPC-A23 Firmware: 2.800.0000000.16.R.230616
Added to https://github.com/user2684/imou_life/wiki/Known-Issues, closing for now since no much we can do unfortunately