2024-03-10 19:51:15.102 ERROR (MainThread) [imouapi] ConnectionFailed:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/imouapi/api.py", line 190, in _async_call_api
response = await self._session.request("POST", url, json=body, timeout=self._timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 504, in _request
with timer:
File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
raise asyncio.TimeoutError from None
TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/imouapi/api.py", line 155, in _async_call_api
await self.async_connect()
File "/usr/local/lib/python3.12/site-packages/imouapi/api.py", line 117, in async_connect
data = await self._async_call_api("accessToken", {}, True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/imouapi/api.py", line 192, in _async_call_api
raise ConnectionFailed(f"{exception}") from exception
imouapi.exceptions.ConnectionFailed
I have enough credit on the developer site, so there should be no issue on that side.
Hi all, I’ve updated my post here with additional FAQ on this issue.
@woody4165 correct, an entity is any home assistant entity (switches, sensors, cameras, etc.). On my HA I’ve disabled most of the sensors I’m not using and went from 6000 calls per day overall to 1000.
For the other error you were reporting, looks like a connection issue, if still persists, try searching for errors like APIError: OP1013: Call interface times exceed limit (total) in the logs, I know you have credit but better to double check. Thanks
Since the API called most of the time, in my case, is getDeviceCameraStatus, disabling sensors and entities will reduce calls?
I have seven cameras but two of them are in the list, but I have not integrated in HA. They will be consuming API anyway?
If I remove them from the open.imoulife.com , will I remove also from the app?
I solved it like this:
taken from the Imou app the name of the camera
found the ip inside the router
added the camera with ONVIF integration
User: admin
Password: from the Imou Android program read “device label” → security code
once this is done the camera works in Onvif.
HI
Joseph
Correct, disabling sensors (e.g. those in entità nascoste in your screenshot) would reduce API calls. Since I use only Human Decetion and Motion decetion switches I left there only those. Buttons like Restart devices instead do not consume API calls unless they are pressed of course. Devices not integrated in HA do not consume API calls so don’t worry about them
@peppeman75 yes, if you need to view the video stream, ONVIF is way better than the video stream provided by the integration/Imou since connection is local and does not go through the cloud so is way faster and more reliable.
Since I’m having a $ 0.01 charging every day, I’ve opened a ticket on https://open.imoulife.com and this is the answer
Hello, I have confirmed to you that the excess part on our side is deducted regularly every day, not accumulated. The charging method is calculated according to (number of overruns/10000) * 0.02, with a minimum deduction of US $0.01, so you will deduct US $0.01 per day.
If someone exceed the standard values, there will be a $ 0.01 charging every day, so there will be $ 3.65 charging per year. If daily API calls does not exceed 5.000 daily [(number of overruns/10000) * 0.02 ], it will be a $ 0.01 charge, otherwise it will be $ 0.02 until 10.000 calls per day.
Charging is also related to the traffic is used, you can check in the statistics at the Flows item. I have almost 0 traffic daily.
So prepare to charge the account to avoid malfunctions…
How did you dertemine the IP address inside the router? Should I look for manufacturer name? I find different names like e.g. Zhejiang Dahua Technology Co Ltd. or Hangzhou huacheng network technology co Ltd
Could you please provide an example of your configuration?
Thanks for the quick reply. I could figure out the IP address now. In my router it shows NOMI-IPC-GS7E-5M0WE.However when I tried to add onvif://admin:[email protected]?subtype=Profile000 I don’t see the stream
You’re right. Sorry for the typo. It should be 168. However it couldn’t be detected by the ONVIF integration in Home Assistant. Maybe I’ve missed something
Yes when I select ‘search automatically’ then I can see my IP camera. Password has not been changed because I can see the camera in the IMOU app. How do you turn off decryption?
Just in case someone else needs it, this helped me to get my HA integration working again (did not charge any money in the account).
As per on-going discussions, I also disabled most of the sensors per HA device and sticked to use ONVIF streaming instead, to minimize the probability of impact the limits.
At least for me, disabling most of the sensors for each camera but those I really need, increasing the polling interval, charging the account with a couple of dollars (just to re-enable it), reloading the integration in HA (no need to change anything in the app info settings in the Imou portal or restart HA), made the integration working back again. With 9 cameras I’m now doing between 50 and 60 API calls per day. I’ll keep adjusting the settings until I will get back in the free tier
I have 4 cams defined in the integration and I have around 2000 calls per day, most of them are
getDeviceCameraStatus, what can I do/check to avoid all these calls? The real calls I do every day is probably around your values, 40-50 per day for all cams
Hi, you can configure the polling interval by going in Settings → Devices → and clicking on Imout Life integration. Then for each camera you have “configure”. Set the polling interval there (first field), in seconds.