Imou Life does not yet ship a built-in download to local disk button.
You can still save short MP4 clips on your Home Assistant host after an alarm by recording from the existing cloud HLS live stream** with Home Assistant’s camera.record action.
This is post-event local recording—not continuous NVR recording, and not a download of Imou cloud history.
A common question from Imou + Home Assistant users:How do I download / keep Imou camera video on my NAS or HA disk?
| Column 1 | Column 2 |
|---|---|
| Goal | Supported by this guide? |
| Keep a 30–120s clip after motion / human alarm | yes |
Until native Imou Life recording lands, this YAML + automation path is the supported self-host recipe.
What you need
- Imou Life configured in Home Assistant, with at least one
camera.*entity - Permission to edit
configuration.yamland restart HA - A writable folder for MP4 files
- (Optional for real alarms) Event push enabled with a reachable callback URL (public / Nabu Casa / tunnel). Without it, you can still test with a manual
camera.recordcall.
Quota note: Each recording pulls the cloud live stream and consumes Open Platform live-view quota. Check My Resources on the international console.
Step 1 — Enable the Stream integration
camera.record needs Home Assistant’s core Stream component.
It does not appear under Settings → Devices & services → Add integration (searching “Stream” only shows unrelated brands).
Add to configuration.yaml:
stream:
Save the file. Restart later in Step 3.
Step 2 — Create a folder and allowlist it
HA will only write recordings under paths listed in allowlist_external_dirs. Creating a folder alone is not enough.
The filename in Steps 4–5 must use the same allowlisted directory.
Example A — Home Assistant OS / Supervised (/media)
mkdir -p /media/imou
homeassistant:
allowlist_external_dirs:
- /media/imou
Valid paths look like:
/media/imou/test_20260810_153000.mp4/media/imou/{{ trigger.event.data.device_id }}_20260810_153000.mp4
Example B — Core / development
mkdir -p /path/to/config/www/imou
homeassistant:
name: Dev # keep your existing keys
allowlist_external_dirs:
- /path/to/config/www/imou
Merge allowlist_external_dirs into your existing homeassistant: block—do not duplicate the key.
Step 3 — Check config and restart
- Developer tools → YAML → Check configuration
- Restart Home Assistant
- Wait until Imou camera entities are not
unavailable(Developer tools → States)
Calling camera.record too soon often returns:
Referenced entities camera.… are missing or not currently available
Step 4 — Manual recording test
- Open Developer tools → Actions (formerly Services)
- Call
camera.recordwith your real entity ID - Put
filenameunder the allowlisted directory from Step 2
Example A (/media/imou)
action: camera.record
target:
entity_id: camera.YOUR_CAMERA_ENTITY
data:
filename: /media/imou/test_{{ now().strftime('%Y%m%d_%H%M%S') }}.mp4
duration: 30
lookback: 0
Example B (/path/to/config/www/imou)
action: camera.record
target:
entity_id: camera.YOUR_CAMERA_ENTITY
data:
filename: /path/to/config/www/imou/test_{{ now().strftime('%Y%m%d_%H%M%S') }}.mp4
duration: 30
lookback: 0
Tips
- Keep
lookback: 0— pre-roll is not reliable on cloud HLS - Find the entity under Settings → Devices & services → Imou Life → device → entities, or search States for
camera. - Dual-lens devices may expose two cameras (e.g. PTZ vs fixed)—pick the correct
entity_id - After ~30 seconds, confirm the MP4 on disk (or Media Browser if that path is exposed)
Step 5 — Automate on Imou alarms
5.1 Enable event push (for real alarms)
Settings → Devices & services → Imou Life → Configure → Event push
- Enable event push
- Include message type alarm
- Make sure the callback URL is reachable from the Imou cloud
HA events:
| Column 1 | Column 2 |
|---|---|
| Event | Meaning |
| imou_life_event | All accepted pushes |
| imou_life_alarm | Security / alarm-type messages only |
Useful payload fields: device_id, channel_id, msg_type (e.g. human, videoMotion, mobileDetect).
5.2 Example automation
Keep filename on the same allowlisted root as Step 2.
alias: Imou alarm — save local clip
description: Post-event record via camera.record (cloud HLS)
mode: single
max_exceeded: silent
triggers:
- trigger: event
event_type: imou_life_alarm
# Optional filters once you know payload values:
# event_data:
# device_id: "YOUR_DEVICE_ID"
# msg_type: human
actions:
- action: camera.record
target:
entity_id: camera.YOUR_CAMERA_ENTITY
data:
filename: /media/imou/{{ trigger.event.data.device_id }}_{{ now().strftime('%Y%m%d_%H%M%S') }}.mp4
duration: 60
lookback: 0
For Example B, only change the filename prefix to /path/to/config/www/imou/.
mode: single drops overlapping runs. Use queued or parallel if you need overlapping clips (watch Open Platform quota).
5.3 Test without a public webhook
Developer tools → Events → Fire event:
event_type: imou_life_alarm
event_data:
device_id: "test"
msg_type: human
channel_id: "0"
Confirm the automation runs and a file appears.
Limitations (please read)
- Cloud HLS only — same source as live preview; a few seconds of latency is normal.
- Post-event only — no dependable pre-alarm buffer without keeping a continuous stream open (extra quota / complexity).
- Quota — every clip consumes live-stream quota for the AppId.
- Encrypted alarm images in push payloads are not usable as notification thumbnails; use
camera.snapshotfor stills. - This is a YAML / automation workaround. A first-class Imou Life feature is planned later.
Troubleshooting
| Column 1 | Column 2 |
|---|---|
| Symptom | What to do |
| Stream integration is not set up | Add stream: to configuration.yaml, restart. Stream is not installed via the brand picker. |
| Can’t write …, no access to path! | filename not under allowlist_external_dirs, folder missing, or absolute path mismatch. Fix and restart. |
| Referenced entities … missing or not currently available | Wait until the camera is not unavailable after restart; verify entity ID. |
| No imou_life_alarm | Enable event push + alarm; fix external URL; check Diagnostics → event_push.recent_msg_type_counts. Privacy mask (openCamera / closeCamera) fires imou_life_event only. |
| Never see human / videoMotion | Enable motion/human detection on the device; confirm the cloud actually pushes those types. |
| Empty / failed MP4 | Stream URL expired, network issue, or quota; retry; check logs around getLiveStreamInfo / stream / ffmpeg. |
Roadmap — native support
We plan to productize this flow in a later Imou Life version, for example:
- A dedicated action/service (record clip for a camera entity)
- Optional “auto-record on alarm” settings (duration, path, message types)
Until then, this post is the recommended customer / self-host recipe. Track progress via Issues / Releases on Imou-Home-Assistant.
Related links
- Open Platform: Cloud Video And AIoT Services - Imou Open Platform
- Quota / My Resources: console resource page
- Official HA integration repo: Imou-OpenPlatform/Imou-Home-Assistant
- HA guide (docs): Home Assistant Development