{"id":43244350,"url":"https://github.com/user2684/imou_life","last_synced_at":"2026-02-01T12:03:54.892Z","repository":{"id":61505108,"uuid":"542621509","full_name":"user2684/imou_life","owner":"user2684","description":"Home Assistant custom component for controlling Imou devices","archived":false,"fork":false,"pushed_at":"2025-06-06T11:56:15.000Z","size":123,"stargazers_count":144,"open_issues_count":15,"forks_count":26,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-06T12:38:00.866Z","etag":null,"topics":["camera","home-assistant","home-automation","imou","imou-life","motion-detection","webcam"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/user2684.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-28T14:03:46.000Z","updated_at":"2025-06-06T11:52:31.000Z","dependencies_parsed_at":"2025-06-06T12:27:10.098Z","dependency_job_id":"76d11eb2-02aa-4612-a330-88ed36f8ddc2","html_url":"https://github.com/user2684/imou_life","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/user2684/imou_life","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user2684%2Fimou_life","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user2684%2Fimou_life/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user2684%2Fimou_life/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user2684%2Fimou_life/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/user2684","download_url":"https://codeload.github.com/user2684/imou_life/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user2684%2Fimou_life/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28977665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T11:31:13.034Z","status":"ssl_error","status_checked_at":"2026-02-01T11:30:25.558Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camera","home-assistant","home-automation","imou","imou-life","motion-detection","webcam"],"created_at":"2026-02-01T12:03:17.302Z","updated_at":"2026-02-01T12:03:54.880Z","avatar_url":"https://github.com/user2684.png","language":"Python","funding_links":["https://www.buymeacoffee.com/user2684"],"categories":[],"sub_categories":[],"readme":"# Home Assistant custom component for controlling Imou devices\n\n[![hacs_badge](https://img.shields.io/badge/HACS-Default-41BDF5.svg)](https://github.com/hacs/integration)\n[![hacs_badge](https://img.shields.io/badge/HACS-Custom-41BDF5.svg)](https://github.com/hacs/integration)\n[![Donate](https://img.shields.io/badge/donate-BuyMeCoffee-yellow.svg)](https://www.buymeacoffee.com/user2684)\n\n**PLEASE NOTE this is an UNOFFICIAL integration, NOT supported or validated by Imou or linked in any way to Imou**.\n\n_This integration is the result of the analysis of the public documentation released by Imou for its open platform and created before the vendor published its own [official Home Assistant integration](https://github.com/Imou-OpenPlatform/Imou-Home-Assistant). Since this integration is based on information no more updated since 2021 it may not fully work with most recent devices and there is no way to support newer models since the documentation of the the APIs has not been made public by the vendor._\n\n_For this reason, I have decided to \u003cins\u003e***stop actively developing the integration***\u003c/ins\u003e. No new functionalities will be added or bugs fixed since it would require access to vendor's APIs which are neither public nor documented. Regardless, the integration is still supposed to work for those devices where it has been working so far. And I will keep the code up to date to ensure it will continue to run smoothly on newer version of Home Assistant._\n\n_The official integration, supported by the vendor, is available for download [here](https://github.com/Imou-OpenPlatform/Imou-Home-Assistant)._\n\n## Overview\n\nThis Home Assistant component helps in interacting with devices registered with the Imou Life App and specifically enabling/disabling motion detection, siren, and other switches.\n\nDespite Imou webcams video streams can be integrated in Home Assistant through Onvif, the only way to interact with the device as if using the Imou Life App is to leverage the Imou API,\nthat is what this component under the hood does.\n\nOnce an Imou device is added to Home Assistant, switches can be controlled through the frontend or convenientely used in your automations.\n\n## Features\n\n- Configuration through the UI\n- Auto discover registered devices\n- Auto discover device capabilities and supported switches\n- Sensors, binary sensors, select, buttons to control key features of each device\n- Support for push notifications\n- Image snapshots, video streaming and PTZ controls\n- Support for dormant devices\n\n## Supported Models\n\nYou can find [here](https://github.com/user2684/imou_life/wiki/Supported-models) a list with all the Imou models which have been tested and if they are working or not with the integration. Please feel free to report any missing model or additional information.\n\n## Installation\n\n### [HACS](https://hacs.xyz/) (recommended)\n\nAfter installing and configuring HACS, go to \"Integrations\", \"Explore \u0026 Download Repositories\", search for \"Imou Life\" and download the integration.\n\n### Manual installation\n\n1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`).\n2. If you do not have a `custom_components` directory (folder) there, you need to create it.\n3. In the `custom_components` directory (folder) create a new folder called `imou_life`.\n4. Download _all_ the files from the `custom_components/imou_life/` directory (folder) in this repository.\n5. Place the files you downloaded in the new directory (folder) you created.\n6. Restart Home Assistant\n\nThis integration depends on the library `imouapi` for interacting with the end device. The library should be installed automatically by Home Assistante when initializing the integration.\nIf this is not happening, install it manually with:\n\n```\npip3 install imouapi\n```\n\n## Requirements\n\nTo interact with the Imou API, valid `App Id` and `App Secret` are **required**.\n\nIn order to get them:\n\n- Register an account on Imou Life if not done already\n- Register a developer account on [https://open.imoulife.com](https://open.imoulife.com)\n- Open the Imou Console at [https://open.imoulife.com/consoleNew/myApp/appInfo](https://open.imoulife.com/consoleNew/myApp/appInfo)\n  - Go to \"My App\", \"App Information\" and click on Edit\n  - Fill in the required information and copy your AppId and AppSecret\n\n## Configuration\n\nThe configuration of the component is done entirely through the UI.\n\n1. In the Home Assistant UI to \"Configuration\" -\u003e \"Integrations\" click \"+\" and search for \"Imou Life\"\n1. Fill in `App Id` and `App Secret`\n   1. If `Discover registered devices` is selected:\n      - A list of all the devices associated with your account is presented\n      - Select the device you want to add\n      - Optionally provide a name (otherwise the same name used in Imou Life will be used)\n   1. If `Discover registered devices` is NOT selected:\n      - Provide the Device ID of the device you want to add\n      - Optionally provide a name (otherwise the same name used in Imou Life will be used)\n\nOnce done, you should see the integration added to Home Assistant, a new device and a few entities associated with it.\n\nThe following entities are created (if supported by the device):\n\n- Switches:\n  - All of those supported by the remote device\n  - Enable/disable push notifications\n- Sensors:\n  - Storage Used on SD card\n  - Callback URL used for push notifications\n- Binary Sensors:\n  - Online\n  - Motion alarm\n- Select:\n  - Night Vision Mode\n- Buttons:\n  - Restart device\n  - Refresh all data\n  - Refresh motion alarm sensor\n\nIf you need to add another device, repeat the process above.\n\n### Advanced Options\n\nThe following options can be customized through the UI by clicking on the \"Configure\" link:\n\n- Polling interval - how often to refresh the data (in seconds, default 15 minutes)\n- API Base URL - th url of the Imou Life API (default https://openapi.easy4ip.com/openapi)\n- API Timeout - API call timeout in seconds (default 10 seconds)\n- Callback URL - when push notifications are enabled, full url to use as a callback for push notifications\n\n### Motion Detection\n\nWhen adding a new device, a `Motion Alarm` binary sensor is created (provided your device supports motion detection). You can use it for building your automations, when its state changes, like any other motion sensors you are already familiar with.\nThere are multiple options available to keep the motion alarm sensor regularly updated, described below. All the options will update the same \"Motion Alarm\" sensor, just the frequency changes depending on the option. Option 1 and 2 does not require Home Assistant to be exposed over the Internet, Option 3 does but ensure realtime updates of the sensor.\n\n#### Option 1\n\nIf you do nothing, by default the sensor will be updated every 15 minutes, like any other sensor of the device. If a motion is detected, the sensor triggers and it will get back to a \"Clear\" state at the next update cycle (e.g. after other 15 minutes)\n\n#### Option 2\n\nIf you want to increase the frequency, you can force an update of the \"Motion Alarm\" sensor state manually or automatically, through the \"Refresh Alarm\" button which is created in the same device.\nFor example, you can create an automation like the below which press every 30 seconds the \"Refresh Alarm\" button for you, causing an update of the \"Motion Alarm\" sensor state (replace `button.webcam_refreshalarm` with the name of your entity):\n\n```\nalias: Imou - Refresh Alarm\ndescription: \"\"\ntrigger:\n  - platform: time_pattern\n    seconds: \"30\"\ncondition: []\naction:\n  - service: button.press\n    data: {}\n    target:\n      entity_id: \u003cbutton.webcam_refreshalarm\u003e\nmode: single\n```\n\nPlease note, the underlying Imou API is limited to 20000 calls per day.\n\n#### Option 3\n\nIf you want relatime updates of the \"Motion Alarm\" sensor, you need to enable push notifications. In this scenario, upon an event occurs (e.g. alarm, device offline, etc.) a realtime notification is sent by the Imou API directly to your Home Assistance instance so you can immediately react upon it.\nSince this is happening via a direct HTTP call to your instance, your Home Assistance must be [exposed to the Internet](https://www.home-assistant.io/docs/configuration/remote/) as a requirement.\nPlease note, push notification is a global configuration, not per device, meaning once enabled on one device it applies to ALL devices registered in your Imou account.\n\n**Requirements**\n\n- Home Assistant exposed to the Internet\n- Home Assistant behind a reverse proxy, due to malformed requests sent by the Imou API (see below for details and examples)\n\n**Configuration**\n\n- Ensure Home Assistant is exposed over the Internet, is behind a reverse proxy, and you have implemented the [security checklists](https://www.home-assistant.io/docs/configuration/securing/)\n- In Home Assistant, add at least a device through the Imou Life integration\n- Go to \"Settings\", \"Devices \u0026 Services\", select your Imou Life integration and click on \"Configure\"\n- In \"Callback URL\" add the external URL of your Home Assistant instance, followed by `/api/webhook/`, followed by a random string difficult to guess such as `imou_life_callback_123jkls` and save. For example `https://yourhomeassistant.duckdns.org/api/webhook/imou_life_callback_123jkls`. This will be name of the webhook which will be called when an event occurs.\n- Visit the Device page, you should see a \"Push Notifications\" switch\n- Enable the switch. Please remember **this is a global configuration, you just need to do it once** and in a SINGLE device only\n- Go to \"Settings\", \"Automation \u0026 Scenes\" and click on \"Create Automation\" and select \"Start with an empty automation\"\n- Click the three dots in the top-right of the screen, select \"Edit in YAML\", copy, paste the following and replace `\u003cyour_string_difficult_to_guess\u003e` with yours (e.g. `imou_life_callback_123jkls`) and save it:\n\n```\nalias: Imou Push Notifications\ndescription: \"Handle Imou push notifications by requesting to update the Motion Alarm sensor of the involved device (v1)\"\ntrigger:\n  - platform: webhook\n    webhook_id: \u003cyour_string_difficult_to_guess\u003e\ncondition:\n  - condition: template\n    value_template: |\n      {% for entity_name in integration_entities(\"imou_life\") %}\n        {%- if entity_name is match('.+_refreshalarm$') and is_device_attr(entity_name, \"hw_version\", trigger.json.did) %}\n          true\n        {%-endif%}\n        {% else %}\n          false\n      {%- endfor %}\n  - condition: template\n    value_template: |-\n      {%- if trigger.json.msgType in (\"videoMotion\", \"human\", \"openCamera\") %}\n        true\n      {% else %}\n        false\n      {%-endif%}\naction:\n  - service: button.press\n    data: {}\n    target:\n      entity_id: |\n        {% for entity_name in integration_entities(\"imou_life\") %}\n          {%- if entity_name is match('.+_refreshalarm$') and is_device_attr(entity_name, \"hw_version\", trigger.json.did) %}\n            {{entity_name}}\n          {%-endif%}\n        {%- endfor %}\n    enabled: true\nmode: queued\nmax: 10\n```\n\nWhen using this option, please note the following:\n\n- The API for enabling/disabling push notification is currently limited to 10 times per day by Imou so do not perform too many consecutive changes. Keep also in mind that if you change the URL, sometimes it may take up to 5 minutes for a change to apply on Imou side\n- In Home Assistant you cannot have more than one webhook trigger with the same ID so customize the example above if you need to add any custom logic\n- Unfortunately HTTP requests sent by the Imou API server to Home Assistant are somehow malformed, causing HA to reject the request (404 error, without any evidence in the logs). A reverse proxy like NGINX in front of Home Assistant without any special configuration takes care of cleaning out the request, hence this is a requirement. Instructions on how to configured it and examples are available [here](https://github.com/user2684/imou_life/wiki/Reverse-proxy-configuration-for-push-notifications).\n\n### PTZ Controls\n\nThe integration exposes two services for interacting with the PTZ capabilities of the device:\n\n- `imou_life.ptz_location`: if the device supports PTZ, you will be able to move it to a specified location by providing horizontal (between -1 and 1), vertical (between -1 and 1) and zoom (between 0 and 1)\n- `imou_life.ptz_move` If the device supports PTZ, you will be able to move it around by providing an operation (one of \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"UPPER_LEFT\", \"BOTTOM_LEFT\", \"UPPER_RIGHT\", \"BOTTOM_RIGHT\", \"ZOOM_IN\", \"ZOOM_OUT\", \"STOP\") and a duration for the operation (in milliseconds)\n\nThose services can be invoked on the camera entity.\nTo test this capability, in Home Assistant go to \"Developer Tools\", click on \"Services\", select one of the services above, select the target entity, provide the required information and click on \"Call Service\". If something will go wrong, have a look at the logs.\n\nPresets are instead not apparently supported by the Imou APIs but could be implemented by combining HA scripts and calls to the `imou_life.ptz_location` service.\n\n## Limitations / Known Issues\n\n- The Imou API does not provide a stream of events, for this reason the integration periodically polls the devices to sync the configuration. So if you change anything from the Imou Life App, it could take a few minutes to be updated in HA. Use the \"Refresh Data\" button to refresh data for all the devices' sensors\n- Imou limits up to 5 the number of devices which can be controlled through a developer account (e.g. the method used by this integration). Additional devices are added successfully but they will throw a \"APIError: FL1001: Insufficient remaining available licenses\" error message whenever you try to interact. As a workaround, create another Imou account associated to a different e-mail address, take note of the new AppId and AppSecret, and bind the device there. Alternatively, you can also keep the device associated with the primary account, share it with the newly account and add it to HA through the integration\n- For every new device to be added, AppId and AppSecret are requested\n- Advanced options can be changed only after having added the device\n- Due to malformed requests sent by the Imou API server, in order for push notifications to work, Home Assistant must be behind a reverse proxy\n\n## Troubleshooting\n\nIf anything fails, you should find the error message and the full stack trace on your Home Assistant logs. This can be helpful for either troubleshoot the issue or reporting it.\n\n### Device Diagnostics\n\nDiagnostics information is provided by visiting the device page in Home Assistant and clicking on \"Download Diagnostics\".\n\n### Debugging\n\nTo gain more insights on what the component is doing or why is failing, you can enable debug logging:\n\n```\nlogger:\n  default: info\n  logs:\n    custom_components.imou_life: debug\n```\n\nSince this integration depends on the library `imouapi` for interacting with the end device, you may want to enable debug level logging to the library itself:\n\n```\nlogger:\n  default: info\n  logs:\n    custom_components.imou_life: debug\n    imouapi: debug\n```\n\n## Bugs or feature requests\n\nBugs and feature requests can be reported through [Github Issues](https://github.com/user2684/imou_life/issues).\nWhen reporting bugs, ensure to include also diagnostics and debug logs. Please review those logs to redact any potential sensitive information before submitting the request.\n\n## Contributing\n\nAny contribution is more than welcome. Github is used to host the code, track issues and feature requests, as well as submitting pull requests.\nDetailed information on how the code is structured, how to setup a development environment and how to test your code before submitting pull requests is\ndetailed [here](https://github.com/user2684/imou_life/wiki/How-to-contribute).\n\n## Roadmap\n\nA high level roadmap of this integration can be found [here](https://github.com/users/user2684/projects/1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuser2684%2Fimou_life","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuser2684%2Fimou_life","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuser2684%2Fimou_life/lists"}