Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cruiser 2 no video preview #105

Closed
mrlordziemniak opened this issue Apr 4, 2024 · 12 comments
Closed

Cruiser 2 no video preview #105

mrlordziemniak opened this issue Apr 4, 2024 · 12 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@mrlordziemniak
Copy link

mrlordziemniak commented Apr 4, 2024

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


@mikycol
Copy link

mikycol commented Apr 5, 2024

I have the same model and am experiencing the same problem

@user2684
Copy link
Owner

user2684 commented Apr 7, 2024

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

@mrlordziemniak
Copy link
Author

**`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 :/

@mikycol
Copy link

mikycol commented Apr 7, 2024

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.

@mrlordziemniak
Copy link
Author

ok, but how to fix this?

@peterface8888
Copy link

I have the same problem, how to fixed it?

@user2684
Copy link
Owner

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

@mrlordziemniak
Copy link
Author

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

no, still same problem as above

@user2684
Copy link
Owner

@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

@mrlordziemniak
Copy link
Author

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`

@user2684
Copy link
Owner

user2684 commented Jun 2, 2024

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
Copy link
Owner

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

@user2684 user2684 added bug Something isn't working wontfix This will not be worked on labels Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants