imou_life icon indicating copy to clipboard operation
imou_life copied to clipboard

Cruiser 2 no video preview

Open mrlordziemniak opened this issue 10 months ago • 11 comments

Version of the custom_component

Configuration

Add your logs here.

Describe the bug

There is no camera preview on HD , but SD is working camera model is IPC-GS7E-5M0WE producent: Imou

Debug log


Rejestrator: aiohttp.server
Źródło: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
Pierwsze zdarzenie: 22:22:32 (3 zdarzenia)
Ostatnio zalogowany: 22:22:56

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/imouapi/device_entity.py", line 598, in async_get_image
    raise InvalidResponse(f"status code {response.status}")
imouapi.exceptions.InvalidResponse: status code 404

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 823, in get
    return await self.handle(request, camera)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 841, in handle
    image = await _async_get_image(
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 192, in _async_get_image
    else await camera.async_camera_image(width=width, height=height)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/imou_life/camera.py", line 98, in async_camera_image
    return await self.sensor_instance.async_get_image()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/imouapi/device_entity.py", line 601, in async_get_image
    raise InvalidResponse(f"unable to retrieve image from {url}: {exception}") from exception
imouapi.exceptions.InvalidResponse: unable to retrieve image from https://imou-fk-ali-online-paas-iot-private-picture.eu-central-1.oss.aliyuncs.com/lechange///Alarm/0/?Expires=1712348550&OSSAccessKeyId=&Signature=%  %3D: status code 404


mrlordziemniak avatar Apr 04 '24 20:04 mrlordziemniak

I have the same model and am experiencing the same problem

mikycol avatar Apr 05 '24 09:04 mikycol

Hi, in your device list, click on configure and try setting the "wait before downloading camera snapshot" to something like 30 seconds

user2684 avatar Apr 07 '24 09:04 user2684

**`Rejestrator: aiohttp.server Źródło: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421 Pierwsze zdarzenie: 11:16:55 (9 zdarzenia) Ostatnio zalogowany: 11:21:28

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/imouapi/device_entity.py", line 598, in async_get_image raise InvalidResponse(f"status code {response.status}") imouapi.exceptions.InvalidResponse: status code 404

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 823, in get return await self.handle(request, camera) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 841, in handle image = await _async_get_image( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 192, in _async_get_image else await camera.async_camera_image(width=width, height=height) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/imou_life/camera.py", line 98, in async_camera_image return await self.sensor_instance.async_get_image() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/imouapi/device_entity.py", line 601, in async_get_image raise InvalidResponse(f"unable to retrieve image from {url}: {exception}") from exception imouapi.exceptions.InvalidResponse: unable to retrieve image from : status code 404 `

still nothing :/

mrlordziemniak avatar Apr 07 '24 09:04 mrlordziemniak

If you directly open the log url you will notice that the error is from alibabacloud, I assume that Imou has some problem with the cloud subscription.

mikycol avatar Apr 07 '24 10:04 mikycol

ok, but how to fix this?

mrlordziemniak avatar Apr 08 '24 19:04 mrlordziemniak

I have the same problem, how to fixed it?

peterface8888 avatar Apr 22 '24 02:04 peterface8888

Hi all, is increasing the "time before downloading" settings and reloading the device not helping with this? Thanks

user2684 avatar Apr 27 '24 10:04 user2684

Hi all, is increasing the "time before downloading" settings and reloading the device not helping with this? Thanks

no, still same problem as above

mrlordziemniak avatar May 08 '24 19:05 mrlordziemniak

@mrlordziemniak a couple of users had this 404 errors but related to the API usage limit (https://github.com/user2684/imou_life/wiki/Imou-API-usage-restrictions), do you have any error message in the logs referring to this limit being reached? Thanks

user2684 avatar May 12 '24 09:05 user2684

no there is no error about usage limit, SD previow is working, when i try to open HD previow i get this error: `Rejestrator: aiohttp.server Źródło: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421 Pierwsze zdarzenie: 19:50:06 (6 zdarzenia) Ostatnio zalogowany: 19:50:53

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/imouapi/device_entity.py", line 598, in async_get_image raise InvalidResponse(f"status code {response.status}") imouapi.exceptions.InvalidResponse: status code 404

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp_session/init.py", line 199, in factory response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 295, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 815, in get return await self.handle(request, camera) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 833, in handle image = await _async_get_image( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 187, in _async_get_image else await camera.async_camera_image(width=width, height=height) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/imou_life/camera.py", line 98, in async_camera_image return await self.sensor_instance.async_get_image() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/imouapi/device_entity.py", line 601, in async_get_image raise InvalidResponse(f"unable to retrieve image from {url}: {exception}") from exception imouapi.exceptions.InvalidResponse: unable to retrieve image from https://imou-fk-ali-online-paas-iot-private-picture.eu-central-1.oss.aliyuncs.com/lechange/agsometext_img/Alarm/0/a7dbedf7sometext.jpg?Expires=1715622603&OSSAccessKeyId=LTAI5keyy&Signature=V3z9W3keyyysbs%3D: status code 404`

mrlordziemniak avatar May 12 '24 17:05 mrlordziemniak

Thanks. If I may ask you a favor. Trigger again the error, then copy and paste the url from the logs (something like https://imou-fk-ali-online-paas-iot-private-picture.eu-central-1.oss.aliyuncs.com/lechange/agsometext_img/Alarm/0/a7dbedf7sometext.jpg?Expires=1715622603&OSSAccessKeyId=LTAI5keyy&Signature=V3z9W3keyyysbs%3D) and try to see if the image is downloaded. If not (404 error), try again in a minute or so. Many thanks

user2684 avatar Jun 02 '24 15:06 user2684

Closing for now for inactivity, feel free to reopen it if needed

user2684 avatar Sep 28 '24 08:09 user2684