Imou Life - cloud integration

Apparently Imou has limited to 5 the number of devices per account which can be managed with a developer account (despite in the website there is still reported 10). I’m looking for confirmation of this, which is causing “Insufficient remaining available licenses, please contact platform customer service” error messages.

Anybody with more than 6+ devices belonging to the same account added to HA with this integration who are NOT getting “Insufficient remaining available licenses, please contact platform customer service” on at least one device? Thanks!

1 Like

Yes, me.
I have 6 cams connected directly to my account and 1 cam shared with me, a total of 7

And I’m getting issue with a Cruiser, that is the only cam that I interact with the HA Imou integration

I’ve also opened a ticket on the Imou dev platform, but until now, no news

This is the result of the ticket

Q: Hi I’m receiving this error when calling an API to one my cameras, “Call-service error. FL1001: Insufficient remaining available licenses, please contact platform customer service.” But I see that I have 7 licenses used on 10 available. Another thing is why a shared device with my account is considered as a license since is not assigned to my account, but just shared. Thanks

A: Hello, the shared device can also call interfaces or view live streaming footage

Q: Hi You answered to my last question, but not to first question. Why I am receiving error “Call-service error. FL1001: Insufficient remaining available licenses, please contact platform customer service.” if I have 7 licenses used out of 10 ?

A: Hi The 10 complimentary licenses are bound to the device

Q: So, why I’m getting errors if I have 7 licenses active that does not exceed the 10 available?

You can count on me if you need anything

Thanks

Hi all, just to summarize what came out of the discussions on this “Call-service error. FL1001: Insufficient remaining available licenses, please contact platform customer service.” error:

  • Imou decreased to 5 the number of devices which can be handled with a developer account, despite their website still shows 10, regardless of the model and the API which is called
  • A workaround to this limitation is to create a new Imou account and either bind the cameras which are causing this error there or share with this new account the camera from the first account (to avoid any impact on current operations with Imou Life app)
  • For shared devices, native video streaming (and hence camera.record) does not work properly with the integration (I’ve opened up Video Streaming not working on shared devices #80 for this). HA should fallback automatically to snapshots streaming which is suboptimal but a working solution. Alternative workaround until we address it are to use RTSP or Onvif to integrate the video stream

I will update the documentation with this information as we will release a new version of the integration.
Thanks all

Hi all, just released v1.0.14 of the integration. No major changes in terms of new functionalities but a few critical bugs have been fixed plus some minor addition to the documentation. Here’s a summary the release notes:

  • Improved support for Cell Go cameras
  • Discovery service now ignores with a warning unrecognized/unsupported devices instead of throwing an error
  • Added French and Indonesian language support
  • New documentation linked in the README file: list with all the supported/tested models and instructions on how to contribute
3 Likes

Hi…I congratulate you for the excellent work done with this integration. I purchased a cam cruiser 2
IPC-GS7E-3M0WE
da Imou
Firmware: 2.800.0000000.5.R.230511
Hardware: 9F0969CPAZ6EEC8
and there seems to be no head detection switch. Active motion detection with smart tracking but there is no movement on the camera.


ha4
HA2

Imou Life: PTZ Location service seems not to work while I am successfully using service: imou_life.ptz_move

Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:468
First occurred: 09:29:54 (1 occurrences)
Last logged: 09:29:54

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 40999: Unknown error.
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 833, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/imou_life/camera.py", line 117, in async_service_ptz_location
    await self.sensor_instance.async_service_ptz_location(
  File "/usr/local/lib/python3.11/site-packages/imouapi/device_entity.py", line 703, in async_service_ptz_location
    return await self.api_client.async_api_controlLocationPTZ(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/imouapi/api.py", line 520, in async_api_controlLocationPTZ
    return await self._async_call_api(api, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/imouapi/api.py", line 227, in _async_call_api
    raise APIError(error_message)
imouapi.exceptions.APIError: 40999: Unknown error.

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/imou_life/camera.py:117
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 09:29:54 (1 occurrences)
Last logged: 09:29:54

[140480848535744] Error handling message: Unknown error (unknown_error) stefano from 192.168.1.208 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 782, in handle_execute_script
    script_result = await script_obj.async_run(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1578, in async_run
    return await asyncio.shield(run.async_run())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 833, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/imou_life/camera.py", line 117, in async_service_ptz_location
    await self.sensor_instance.async_service_ptz_location(
  File "/usr/local/lib/python3.11/site-packages/imouapi/device_entity.py", line 703, in async_service_ptz_location
    return await self.api_client.async_api_controlLocationPTZ(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/imouapi/api.py", line 520, in async_api_controlLocationPTZ
    return await self._async_call_api(api, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/imouapi/api.py", line 227, in _async_call_api
    raise APIError(error_message)
imouapi.exceptions.APIError: 40999: Unknown error.

Thanks for your help

Stefano

Hi @stefanos, would you mind opening up an issue on Issues · user2684/imou_life · GitHub just with the same information? so we can followup in more details there. Also if you can share there debugging logs (GitHub - user2684/imou_life: Home Assistant custom component for controlling Imou devices) and if the device is shared from an imou account different than the one the device is connected to. Thanks!

Hi @user2684 thank you for your integration! I have one question about tho way talk feature. It’s possible to use this feature with you integration e.g with cruiser camera?

Hi all, I love the integration!

However, after latest HA Suprvisor update, I can’t seem to control the cameras.

I deleted Imou Life from HACS, then added it again, went to Settings > Device and Services > Add Integration > Imou Life from the list - getting “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble” error.

image

Logger: homeassistant.util.package
Source: util/package.py:108
First occurred: 14:04:36 (3 occurrences)
Last logged: 14:05:14

Unable to install package imouapi==1.0.14: ERROR: Cannot install imouapi==1.0.14 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit Dependency Resolution - pip documentation v24.1.dev0 [notice] A new release of pip is available: 23.2.1 → 23.3.2 [notice] To update, run: pip install --upgrade pip

Hi @Nanoboy looks like there is no public API for two way talk so no way, at least in the short term :frowning:

@al.rdb thanks, yes, it is an issue that need to fixed (Ref: Cannot start version 1.0.14 in Home Assistant 2023.9.2 · Issue #84 · user2684/imou_life · GitHub). Anyway, I will post a message here once a new version fixing this will be published
Thanks!

1 Like

bonjour , je me permet que venir vers vous car j essai de mettre mais camera imou sur mon home assistant , j ai bien trouver mon ID et la clée secret mais il me dis que l a l url de base de l api n ai pas bonne https://openapi.easy4ip.com/openapi

avez vous eu ce souci ou une autre adresse merci

finalement apres plusieur essai , je pense que le probleme viens de mon ID et de ma clée secret
je ne comprend pas je fais bien un copié coller mais message erruer id ou clée secret

Try English, you’ll be understood then.

1 Like

I’ve just had the same issue. Try to reset AppSecret in the Imou console, then Edit App Information (you don’t have to change anything) and Save. The try again to add an Imou device in HA. For me it worked.

Hi all

it’s happening that sometimes one or more fo cam defined in the Imou integration does not respond to commands and in the Imou integration page I found them with error.
Just clicking on the 3-dots of the cam and click reload and it return working again.

What can be the cause?
Is there a way to do a reload of the cam integration without doing it via the menu?

Thanks

Hi, just wanted to make everyone using this integration aware that Imou has applied restrictions to the the usage of the APIs that this integration is using, adding a free tier and a paid tier. You may have received an email from them saying something like:

The platform charges for the following three items

  • Interface call times: There is a monthly free limit of 30,000 times, and the excess is charged at a unit price of $0.02/10,000 times;
  • Message push times: There is a monthly free quota of 30,000 times, and the excess is charged at a unit price of $0.01/10,000 times;
  • Media Flow: There is a free quota of 2GB per month, and overage is charged at a unit price of $0.25/GB.

You may monitor your current usage through this link: Imou Cloud OpenPlatform

How does this affect the integration?
Since this limitations have been introduced, you may have hit one or more of those limits, resulting in the integration no more working correctly.

How can I know if the integration is not working for this issue?

  • Go to ImouLife Console to check if this is the case by monitoring your API usage
  • Search your Home Assistant logs looking for imou, If you find an error like APIError: OP1013: Call interface times exceed limit (total) you have hit the limit

I hit the new limits, what can I do to mitigate this situation?

Please note since these are monthly limits, you may need to wait to the next month to have the counters resetted

If you instead are fine with the fee Imou is asking for increasing the limit, you can charge your account through the Imou Cloud Platform website. Please note this has nothing to do with the Home Assistant integration.

How many API calls the integration does?

For each polling cycle the integration does the following calls:

  • For each device:
    • a call to check if the device is online (via deviceOnline)
    • For each (enabled) entity (e.g. any Home Assistant entity like switches, sensors, cameras, etc.):
      • a call to refresh the status of the entity

So the calculation to do is something like:
#entities * #devices * 4 (assuming a refresh per hour with the default polling of 15 minutes) * 24 (hours per day)
Plus a few other calls per refresh cycle to update the device status itself.

I’m using ONVIF and/or RTSP, does this new limits affect also those integrations?

No, RTSP and ONVIF will continue to work since not leveraging the Imou APIs.

What can the developer of the HA integration do?
Not many things unfortunately since this change is completely managed on the Imou server side. I’m evaluating to increase the default polling value to 30/60 minutes and to provide a way to monitor API calls as additional mitigation factors, plus of course adding this information to the documentation of the integration

4 Likes

Hello , Je viens d’avoir le même problème que toi.
Tu as certainement dû recevoir il y a quelques jours un email de imou pour signaler que
l’utilisation de leur API devenait payante.


Du coup, je viens de créditer mon compte de 5€
J’ai 5 caméras.
Curieux de voir combien de temps ce montant va me donner en délais d’utilisation.
en espérant avoir pu t’éclairer sur la raison de la perte du flux de tes équipements IMOU.

Hi @user2684

I recharged my Imou balance a couple of days ago and these are my statistics.

The calls are also counted when using their native app or when using frigate that is connected via rtsp?
Or only when I use the Imou integration?

I don’t understand the 5761 calls just yesterday…

Thanks

My guess is that the Imou app does not count in these statistics. Same for RTSP so I assume are all made by the integration. Just to clarify, at every polling cycle, the integration makes the following:

  • For each device:
    • a call to check if the device is online (via deviceOnline)
    • For each (enabled) entity (controls and sensors):
      • a call to refresh the status of the entity (via getDeviceCameraStatus and the others)

So the calculation to do is something like:
#entities * #devices * 4 (refresh per hour with the default polling of 15 minutes) * 24 (hours per day)
Plus a bunch of other calls per refresh cycle to update the device status itself.
Does this resonate with the number you see?

Another option I have on my side is also to limit the number of entities which are enabled by default by the integration.

1 Like

What do you mean by #entities ?
The HA entities that interact with the Imou cams ?

I have 7 cams defined in the open.imoulife.com.
One question is, can I delete some of them that I haven’t defined in the Imou integration or is not needed if not defined?
And if I delete from there, they will still be visible in my Imou app?

So the calculation in my case should be:

X * 7 * 4 *24

where X is the number of #entities that for now I cannot calculate…

Thanks