Comments (11)
I since upgraded my DB11 to a DB61i, better image quality and other improvements. But the main difference is that the DB61 supports local API and therefore I am using the Dahua custom integration with HA. It also supports Imou cloud but why bother if you can do everything local. The Dahua integration exposes the call button and other sensors, i.e motion and direct video streaming rather than cloud. I did read on some forums that Dahua disabled the local API on newer firmwares, so results may vary.
from imou_life.
Can you tell which firmware is installed in a working setup? Do you know if one can download the firmware files somewhere and if you can downgrade? Thanks in advance!
See here
from imou_life.
Hi, the point is if this event, regardless of the way it is sent to the callback url, is also registered as a message alarm because the current flow is:
Motion detected by device -> message sent to webhook -> automation trigger refresh of HA sensor -> HA sensor pulls the latest message alarm from the API -> if the timestamp is new, motion is detected
To test this, try running something like (preferably outside HA):
pip3 install imouapi
python3 -m imouapi.cli --app-id <your_app_id> --app-secret <your_app_secret> api_getAlarmMessage <device_id>
And check if the alarm is there. Thanks
from imou_life.
No video in my HA.
(I use DB60)
in console (pip3 install imouapi) i get hls stream and watch it over VLC.
from imou_life.
now through api i get access to ports with no ansver:
"httpPort": "80",
"privatePort": "37777",
"rtspPort": "554",
but without lucky :) all i need is RTSP stream for local NVR
from imou_life.
@kkwestt any error in the logs when opening up the stream? Any chance to enable debug logging?
@jrb80 is video stream working for you?
Thanks
from imou_life.
Log Details (ERROR)
This error originated from a custom integration.
Logger: custom_components.imou_life
Source: custom_components/imou_life/coordinator.py:44
Integration: Imou Life ([documentation](https://github.com/user2684/imou_life), [issues](https://github.com/user2684/imou_life/issues))
First occurred: 21 February 2023 at 13:32:06 (977 occurrences)
Last logged: 12:22:40
ConnectionFailed: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 181, in _async_call_api response = await self._session.request("POST", url, json=body, timeout=self._timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request await resp.start(conn) File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 893, in start with self._timer: File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/imou_life/coordinator.py", line 42, in _async_update_data return await self.device.async_get_data() File "/usr/local/lib/python3.10/site-packages/imouapi/device.py", line 414, in async_get_data await sensor_instance.async_update() File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 285, in async_update if not await self._async_is_ready(): File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 86, in _async_is_ready awake = await self._device_instance.async_wakeup() File "/usr/local/lib/python3.10/site-packages/imouapi/device.py", line 384, in async_wakeup await self._api_client.async_api_setDeviceCameraStatus(self._device_id, "closeDormant", True) File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 359, in async_api_setDeviceCameraStatus return await self._async_call_api(api, payload) File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 183, in _async_call_api raise ConnectionFailed(f"{exception}") from exception imouapi.exceptions.ConnectionFailed
ConnectionFailed: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 181, in _async_call_api response = await self._session.request("POST", url, json=body, timeout=self._timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request await resp.start(conn) File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 893, in start with self._timer: File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/imou_life/coordinator.py", line 42, in _async_update_data return await self.device.async_get_data() File "/usr/local/lib/python3.10/site-packages/imouapi/device.py", line 414, in async_get_data await sensor_instance.async_update() File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 290, in async_update data = await self.api_client.async_api_getMessageCallback() File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 415, in async_api_getMessageCallback return await self._async_call_api(api, payload) File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 183, in _async_call_api raise ConnectionFailed(f"{exception}") from exception imouapi.exceptions.ConnectionFailed
APIError: OP1001: Operation failed. Traceback (most recent call last): File "/config/custom_components/imou_life/coordinator.py", line 42, in _async_update_data return await self.device.async_get_data() File "/usr/local/lib/python3.10/site-packages/imouapi/device.py", line 414, in async_get_data await sensor_instance.async_update() File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 285, in async_update if not await self._async_is_ready(): File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 86, in _async_is_ready awake = await self._device_instance.async_wakeup() File "/usr/local/lib/python3.10/site-packages/imouapi/device.py", line 384, in async_wakeup await self._api_client.async_api_setDeviceCameraStatus(self._device_id, "closeDormant", True) File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 359, in async_api_setDeviceCameraStatus return await self._async_call_api(api, payload) File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 216, in _async_call_api raise APIError(error_message) imouapi.exceptions.APIError: OP1001: Operation failed.
ConnectionFailed: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 181, in _async_call_api response = await self._session.request("POST", url, json=body, timeout=self._timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request await resp.start(conn) File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 893, in start with self._timer: File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/imou_life/coordinator.py", line 42, in _async_update_data return await self.device.async_get_data() File "/usr/local/lib/python3.10/site-packages/imouapi/device.py", line 414, in async_get_data await sensor_instance.async_update() File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 294, in async_update data = await self.api_client.async_api_getDeviceCameraStatus(self._device_id, self._name) File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 343, in async_api_getDeviceCameraStatus return await self._async_call_api(api, payload) File "/usr/local/lib/python3.10/site-packages/imouapi/api.py", line 183, in _async_call_api raise ConnectionFailed(f"{exception}") from exception imouapi.exceptions.ConnectionFailed
InvalidResponse: electricitys not found in {'electricitys': [{'type': 'batteryAdapter', 'litElec': '100'}]} Traceback (most recent call last): File "/config/custom_components/imou_life/coordinator.py", line 42, in _async_update_data return await self.device.async_get_data() File "/usr/local/lib/python3.10/site-packages/imouapi/device.py", line 414, in async_get_data await sensor_instance.async_update() File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 168, in async_update raise InvalidResponse(f"electricitys not found in {data}") imouapi.exceptions.InvalidResponse: electricitys not found in {'electricitys': [{'type': 'batteryAdapter', 'litElec': '100'}]}
Logger: aiohttp.server
Source: custom_components/imou_life/camera.py:98
Integration: Imou Life ([documentation](https://github.com/user2684/imou_life), [issues](https://github.com/user2684/imou_life/issues))
First occurred: 21 February 2023 at 20:07:31 (423 occurrences)
Last logged: 12:23:06
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/imouapi/device_entity.py", line 578, 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.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, 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/view.py", line 145, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 724, in get
return await self.handle(request, camera)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 742, in handle
image = await _async_get_image(
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 170, in _async_get_image
if image_bytes := await camera.async_camera_image(
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.10/site-packages/imouapi/device_entity.py", line 581, 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://ali-pano-fk.oss-eu-central-1.aliyuncs.com/snappic/
from imou_life.
@jrb80 is video stream working for you? Thanks
Cloud video streaming does not work with my Imou doorbell and therefore I am using a generic camera integration using RSTP, e.g. rtsp://192.168.1.108:554/cam/realmonitor?channel=1&subtype=0
I use a webhook trigger using the Imou cloud integration to receive motion/call notifications and then create local snapshots but I found it not to be 100% reliable.
from imou_life.
imou DB60 inside
from imou_life.
Thanks guys. It behaves slightly different from an imou webcam. But enough to create troubles. I see the image snapshot service is not available there. The ConnectionFailed looks like network connectivity issue instead while the InvalidResponse should only impact the "battery" sensor so I'd not be worries about that.
All of this would require a step by step debugging and troubleshooting any API call and response which is really difficult without having the device. I'll keep on eye open when there will be a decent discounted price to buy one to run some additional tests but I will still keep this as a roadmap item
from imou_life.
Can you tell which firmware is installed in a working setup? Do you know if one can download the firmware files somewhere and if you can downgrade?
Thanks in advance!
from imou_life.
Related Issues (20)
- Can't get usable image via "picUrl" or "thumbUrl" HOT 2
- Add support for multiple channel IDs HOT 2
- Firmware Upgrade // this is not a issue but a question HOT 1
- Where to find app Id and secret id HOT 1
- IPC-S21FE Video stream not showing HOT 7
- Imou life motion detection (Option 3) automation error HOT 4
- Vacuum Cleaner config flow error HOT 1
- Malformed or unexpected API response - When adding Vacuum Cleaner HOT 2
- Done
- Add an ability to call a PTZ preset point HOT 5
- speaker integration HOT 1
- APIError: FL1001: Insufficient remaining available licenses HOT 28
- Add instructions on how to contribute HOT 1
- Video Streaming not working on shared devices
- APIError: DV1026: The device does not support the call of this function HOT 8
- 500 Internal Server Error Server got itself in trouble HOT 9
- Cannot start version 1.0.14 in Home Assistant 2023.9.2 HOT 4
- smart plug HOT 1
- IMOU B5 Bulbs, problem. HOT 1
- APIError: DV1026: The device does not support the call of this function. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imou_life.