Cloud recordings - cbrightly/hass-aidot-cameras GitHub Wiki

Cloud recordings (Media Browser)

Cameras with an AiDot cloud storage plan expose their recorded events in the Home Assistant Media panel under AiDot -> <camera name> -> Cloud.

Each camera splits into two sources: Cloud (here) and On device, which lists what is on the camera's own SD card and needs no plan - see On-device recordings.

Each event shows a thumbnail (fetched from the CloudFront CDN) and a title with the event type and timestamp. Tapping an event plays the clip directly inside Home Assistant.

Requirements

  • The camera must have an active AiDot cloud storage subscription. Check the AiDot mobile app to confirm the plan is active.
  • Home Assistant must have the Media Source integration enabled (it is by default). Home Assistant 2026.6+ does not auto-discover media_source.py in custom components, so this integration registers it explicitly on setup.

How it works

The AiDot cloud returns each recording as a short HLS stream (M3U8 + .ts segments) on CloudFront, encoded as H.265/HEVC video + AAC audio - which browsers cannot decode via MSE, so a plain <video> element (or hls.js) just shows an endless loading spinner.

To make clips playable, the integration registers a local HTTP view at /api/aidot/video that hands the HLS stream to ffmpeg, transcodes the video to H.264 (keeping AAC audio), and streams a video/mp4 the browser plays natively. ffmpeg's output is streamed to the browser as it is produced (so playback starts in ~1 s regardless of clip length) and teed to a per-event cache under aidot_clips/, so replays are served instantly with seeking. If a VAAPI/QSV hardware encoder is available it is used, falling back to libx264.

The view takes only device + event; it resolves the (short-lived, signed) CloudFront URL server-side from the AiDot cloud and never trusts a client-supplied URL. It carries no Home Assistant auth token (the media-browser <video> request cannot send one), so each playback link is signed instead: an HMAC over the device, event and an expiry time. A link from the Media browser is valid for six hours and a link inside a notification for a week. The signing key is kept in Home Assistant's storage, so links keep working across a restart. A link with a bad or expired signature is refused (HTTP 403).

Nothing shows up

If a camera has an active plan but its cloud recordings stay empty - and motion notifications never fire either - check whose account Home Assistant is signed in with. AiDot only populates the cloud event and recording lists for the account that owns the home. An account the home is merely shared to (a member) reads empty lists for both, even while the owner's phone in the app shows everything. It is an account-role limit on AiDot's side, not a fault in the integration: sign Home Assistant in with the home-owner account - the one the cameras were originally added under.

Troubleshooting

If clips show blank or won't play, the most common cause is an inactive cloud plan - see Troubleshooting.

⚠️ **GitHub.com Fallback** ⚠️