{"id":51792517,"url":"https://github.com/home-assistant-tools/imou-life","last_synced_at":"2026-07-20T23:39:38.096Z","repository":{"id":367759810,"uuid":"1281433785","full_name":"home-assistant-tools/imou-life","owner":"home-assistant-tools","description":"Pure Python Imou Life bridge for Home Assistant and Frigate with RTSP, ONVIF, WebRTC, and LAN talkback/TTS support.","archived":false,"fork":false,"pushed_at":"2026-07-01T00:04:24.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-20T23:39:18.371Z","etag":null,"topics":["camera","dahua","frigate","go2rtc","home-assistant","home-assistant-addon","imou","imou-life","onvif","p2p","rtsp","talkback","tts","two-way-audio","webrtc"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/home-assistant-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-26T14:51:46.000Z","updated_at":"2026-07-01T00:04:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/home-assistant-tools/imou-life","commit_stats":null,"previous_names":["home-assistant-tools/imou-life"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/home-assistant-tools/imou-life","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant-tools%2Fimou-life","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant-tools%2Fimou-life/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant-tools%2Fimou-life/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant-tools%2Fimou-life/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/home-assistant-tools","download_url":"https://codeload.github.com/home-assistant-tools/imou-life/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant-tools%2Fimou-life/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35703527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"ssl_error","status_checked_at":"2026-07-20T02:08:09.736Z","response_time":111,"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","dahua","frigate","go2rtc","home-assistant","home-assistant-addon","imou","imou-life","onvif","p2p","rtsp","talkback","tts","two-way-audio","webrtc"],"created_at":"2026-07-20T23:39:36.488Z","updated_at":"2026-07-20T23:39:38.090Z","avatar_url":"https://github.com/home-assistant-tools.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Imou Life Add-on App\n\nImou Life bridge app for Home Assistant, Frigate, and NAS/Dockge deployments.\nIt combines the reverse-engineered Imou/Dahua P2P transport with a local\nmanagement UI, go2rtc restreaming, ONVIF endpoints, PTZ helpers, and\nexperimental two-way talk/TTS work.\n\nThe app is designed to run as an add-on style container. It keeps camera video\nlocal to your network consumers while reaching remote Imou cameras through the\nsame cloud P2P relay path the mobile app uses.\n\n## Important Responsibility Notice\n\nThis project requires credentials that only the device owner or an authorized\nadministrator should have:\n\n- an Imou account login when you use the account import UI,\n- each camera's local device/RTSP username and password for streaming, talk, and\n  relay features.\n\nUse this repository only with cameras, accounts, networks, and cloud services\nyou own or are explicitly allowed to administer. You are responsible for\ncomplying with local law, the Imou/Dahua terms that apply to your account and\ndevices, and any privacy rules for people who may be recorded. The maintainers\ndo not operate your bridge, do not receive your credentials, and cannot take\nresponsibility for how you deploy it.\n\nStore `options.json`, Home Assistant secrets, Docker volumes, backups, and logs\nas sensitive data. Do not publish real account emails, passwords, access tokens,\ndevice serials, P2P keys, RTSP URLs with credentials, packet captures, or APK\nartifacts.\n\n## Pros And Cons\n\nPros:\n\n- No router port forwarding is required for remote P2P cameras.\n- Cameras do not need to expose their RTSP port directly to the Internet.\n- Frigate, Home Assistant, VLC, and local NVR software consume ordinary local\n  RTSP/WebRTC endpoints.\n- The bridge can warm streams so live view starts faster.\n- Local LAN cameras can stay on direct LAN RTSP when available.\n- The UI can show status for missing credentials, unavailable streams, and\n  retrying connections.\n\nCons and risks:\n\n- Remote P2P access still depends on Imou cloud control/relay availability.\n- You must provide valid Imou account credentials and camera device passwords.\n- Cloud/API behavior can change without notice and may break the bridge.\n- This is interoperability/research software, not an official Imou product.\n- Two-way talk, codecs, PTZ, and multi-stream profiles can vary by camera model.\n- Misconfigured credentials, logs, backups, or public repos can leak sensitive\n  camera access data.\n- Realtime quality depends on camera firmware, network path, relay path, CPU,\n  codec support, and Frigate/go2rtc player behavior.\n\n## What It Does\n\n- Restreams Imou/Dahua cameras through go2rtc for Frigate and Home Assistant.\n- Supports `p2p` cameras by serial and `lan` cameras by local IP.\n- Provides a React account/camera management UI.\n- Lets you add Imou accounts, list cameras, and choose which cameras are synced\n  into the bridge config.\n- Does not auto-enable cameras when an account is added.\n- Enables PTZ probing and talk/TTS automatically for every camera once Bridge is\n  turned on; unsupported PTZ cameras are filtered out by the capability probe.\n- Exposes enabled cameras through local go2rtc RTSP/WebRTC and local ONVIF\n  endpoints for compatible consumers.\n- Advertises a DLNA/UPnP media player per enabled talk-capable camera so Home\n  Assistant can discover it and send TTS/media to the camera speaker.\n- Includes pure Python Imou P2P/visualtalk tooling that has produced audible\n  TTS and Frigate talkback on tested camera speakers.\n\n## Install With Docker Compose\n\nUse the standalone Docker stack when you want to run Imou Bridge on a generic\nLinux host, NAS, or VM without installing it as a Home Assistant add-on.\n\n```bash\ngit clone https://github.com/home-assistant-tools/imou-life.git\ncd imou-life/deploy/dockge/imou-bridge\nmkdir -p data\ncp data/options.example.json data/options.json\ndocker compose up -d --build\n```\n\nThen open:\n\n```text\nhttp://\u003cdocker-host\u003e:8099\n```\n\nSee the full [Docker Deployment Guide](docs/docker-deployment.md) for ports,\nvolumes, environment variables, Frigate examples, Home Assistant usage, logs,\nupdates, and troubleshooting.\n\n## Install On TrueNAS / Dockge\n\n1. Copy `deploy/dockge/imou-bridge/` to your Dockge stacks directory on TrueNAS,\n   for example:\n\n   ```bash\n   rsync -a deploy/dockge/imou-bridge/ \u003cuser\u003e@\u003ctruenas-ip\u003e:/mnt/\u003cpool\u003e/dockge/data/imou-bridge/\n   ```\n\n2. Create the config file:\n\n   ```bash\n   cp data/options.example.json data/options.json\n   ```\n\n3. Deploy from Dockge, or run from the stack directory:\n\n   ```bash\n   docker compose up -d --build\n   ```\n\n4. Open the app UI:\n\n   ```text\n   http://\u003ctruenas-ip\u003e:8199\n   ```\n\n5. Click **Add account**, log in to Imou, then enable only the cameras you\n   want exposed. Fill the camera device password for enabled cameras.\n\n   If Imou asks for verification, this add-on displays the challenge inside the\n   login modal. The PCS API may return either an image-code challenge or a\n   Geetest v4 slider challenge; both paths are wired into the app UI.\n\n## Default Ports\n\n| Port | Purpose |\n| --- | --- |\n| `8654` | go2rtc RTSP restream, e.g. `rtsp://\u003chost\u003e:8654/\u003ccamera_slug\u003e` |\n| `11984` | go2rtc API/web UI |\n| `8655` | go2rtc WebRTC |\n| `8099` | Imou account/camera management UI |\n| `8600+` | internal P2P tunnels |\n| `8700+` | per-camera ONVIF endpoints |\n| `8800+` | per-camera DLNA MediaRenderer endpoints for talk/TTS |\n\n## Two-Way Audio / TTS Status\n\nOne-way audio to the camera speaker is proven through DHHTTP `visualtalk.xav`.\nTwo talk profiles are currently known:\n\n| Profile | Tested use | Transport | Camera codec |\n| --- | --- | --- | --- |\n| P2P TTS | remote camera | DHP2P `type 0` relay to port `8086` | camera-dependent; AAC/ADTS works on tested speakers |\n| Frigate talkback | LAN camera | direct LAN camera `8086` from go2rtc `exec` backchannel | browser mic `PCMA/8000` re-encoded to `AAC/ADTS 16000`, volume gain `5.0` |\n\nDo not assume one audio codec for every camera. The bridge keeps codec settings\nper talk route (`--output-codec`, `--sample-rate`, `--volume-gain`) because Imou\nmodels may accept AAC, G.711 A-law, or G.711 mu-law differently.\nFor REST/DLNA TTS, camera config can carry `talk_codec` / `talk_output_codec`\nand `talk_sample_rate`; leave existing G.711 profiles intact for cameras that\nneed them.\n\nRepeated talk sessions may need a short pause between attempts; opening a new\nsession immediately after closing the previous one can make the camera close the\nsocket before response headers. The `type 1` relay path is not reliable for this\ntalk route yet.\n\nThe add-on also exposes a direct REST TTS endpoint per camera:\n\n```bash\ncurl -X POST \"http://\u003caddon-host\u003e:8099/api/cameras/\u003cserial\u003e/tts\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"text\":\"Hello from Imou Bridge\",\"lang\":\"en\"}'\n```\n\nHome Assistant can auto-discover the per-camera DLNA media players, but it does\nnot have a generic standard for auto-discovering arbitrary HTTP TTS services.\nUse the DLNA `media_player` path for discovered playback, add a manual\n`rest_command`, or install a small custom integration that registers an HA\n`tts` entity backed by this REST endpoint.\n\n### Frigate two-way audio\n\nFrigate/go2rtc talkback is working for the tested LAN example LAN camera using a\ngo2rtc `exec` backchannel. The video/audio stream stays first so live view works,\nthen an `exec` producer receives browser mic audio as `PCMA/8000`:\n\n```yaml\ngo2rtc:\n  streams:\n    imou_lan_camera:\n      - rtsp://admin:\u003cpassword\u003e@\u003ccamera-ip\u003e:554/cam/realmonitor?channel=1\u0026subtype=1\u0026unicast=true\u0026proto=Onvif#backchannel=0\n      - exec:python3 /config/imou-talk/frigate_imou_talk_exec.py --direct --host \u003ccamera-ip\u003e --port 8086 --serial \u003cserial\u003e --username admin --password \u003cpassword\u003e --channel 1 --subtype 0 --type 0 --input-codec alaw --input-sample-rate 8000 --output-codec aac-adts --volume-gain 5.0#backchannel=1#audio=alaw/8000\n      - ffmpeg:imou_lan_camera#audio=opus\n```\n\nFor other camera models, change only the per-camera codec flags; do not\noverwrite the old G.711 profiles globally.\n\nSee the full [Frigate Talkback Integration Guide](docs/frigate-talkback.md) for\nLAN direct setup, helper placement, codec profiles, and debugging.\n\n## Frigate\n\nAfter enabling a camera, use the go2rtc RTSP restream in Frigate:\n\n```yaml\ncameras:\n  imou_camera:\n    ffmpeg:\n      inputs:\n        - path: rtsp://\u003ctruenas-ip\u003e:8654/\u003ccamera_slug\u003e\n          roles: [detect, record]\n```\n\nFor PTZ cameras, the stack can also run an ONVIF PTZ shim so Frigate can send\nPTZ commands through the bridge.\n\n## Documents\n\n- [Reverse API and Home Assistant Add-on Guide](docs/reverse-api-and-addon-usage.md)\n- [Docker Deployment Guide](docs/docker-deployment.md)\n- [Frigate Talkback Integration Guide](docs/frigate-talkback.md)\n- [Imou Cloud MQTT Realtime Events](docs/imou-cloud-mqtt-events.md)\n- [Dockge Stack](deploy/dockge/imou-bridge/README.md)\n- [Research Summary](docs/research-summary.md)\n- [Cloud API Surface](docs/cloud-api-surface.md)\n- [P2P and Media Flow](docs/p2p-media-flow.md)\n- [Phase 2 Local P2P Bridge](docs/phase2-local-p2p-bridge.md)\n- [Two-Way Audio](docs/two-way-audio.md)\n- [Talk Protocol — Binary-Level Reverse Engineering](docs/talk-protocol-reverse-engineering.md)\n- [Native Protocol Reduction Plan](docs/native-protocol-reduction-plan.md)\n- [Frigate and go2rtc Bridge Notes](docs/frigate-go2rtc-bridge.md)\n- [Next Steps](docs/next-steps.md)\n\n## Safety Notes\n\nThis project is for interoperability research with devices you own or are\nauthorized to test. Avoid publishing secrets, account tokens, device serials,\nAPK binaries, vendor code, or captured private traffic.\n\nThe local APK and decompiled artifacts are intentionally kept under `artifacts/`\nand ignored by Git. Do not commit APKs, native libraries, or decompiled vendor\ncode.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant-tools%2Fimou-life","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhome-assistant-tools%2Fimou-life","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant-tools%2Fimou-life/lists"}