Home AssistantCamerasPTZ

Driveway storm timelapse

Turn a PTZ security camera into a storm-chasing timelapse rig: park on a saved sky pose, refocus, and sweep while snapping frames — then put tracking back when you are done.

Difficulty · IntermediateSetup · 1–2 hoursHA · current stable
Get the pack · from $19LEMON SQUEEZY PLACEHOLDERHave us set it up

Some hardware links on this page are affiliate links. We may earn a commission if you buy through them, at no extra cost to you. See the affiliate disclosure.

A PTZ security camera already has a motor, a zoom, and a snapshot path. This workflow parks it on a sky pose, turns auto-tracking off, retriggers autofocus, then walks pan between two helper numbers while it writes frames. When you stop, tracking and the previous pose come back.

The write-up talks about an outdoor PTZ, not about which opening, yard, or window a camera covers. Point it at sky, not at neighbors.

How it works

  1. Start script — turn auto-tracking off, set zoom near zero, tilt/pan to the sky pose stored in helpers, fire autofocus, wait a beat.
  2. Sweep — a repeat loop pans between sweep_start and sweep_end on an interval you pick (clouds: slower; fast cells: faster).
  3. Snapshot — each tick writes camera.snapshot into a dated folder in HA media (or a mounted share).
  4. Stop script — cancel the loop, restore tracking, optionally return to a “watch the approach” pose of your choosing. That restore pose stays in your config; it is not in the public snippet.
  5. Stitch — an ffmpeg one-liner in the pack turns the folder into an mp4.

No stills from a real property ship with the pack. Test with a bench camera or a cloudy sky.

Snippet

Entity ids are blueprint inputs, not a live install:

script:
  storm_timelapse_start:
    sequence:
      - service: switch.turn_off
        target:
          entity_id: !input ptz_auto_tracking
      - service: number.set_value
        target:
          entity_id: !input ptz_zoom
        data:
          value: 0
      - service: number.set_value
        target:
          entity_id: !input ptz_tilt
        data:
          value: "{{ states('input_number.sky_tilt') }}"
      # autofocus retrigger + sweep: full scripts in the pack

Helpers to add

  • input_number sky tilt
  • input_number sweep start / sweep end (pan)
  • input_number interval seconds
  • input_boolean timelapse running (so a second start is a no-op)

Troubleshooting

  • Soft frames. Autofocus was still hunting. The start script waits; bump that delay or retrigger focus every N frames.
  • Integration has no zoom/tilt numbers. Some camera brands expose PTZ only as services (onvif, manufacturer). The pack includes a service-call variant.
  • Disk fills up. Interval of 2 s on a 4K cam is a lot. Start at 5–8 s; prune the dated folder after ffmpeg.
  • Tracking does not resume. Stop script must run even if you abort. Bind it to a dashboard button, not only to an automation.

Privacy

Do not publish timelapse frames, EXIF, or a map of where the camera sits. This page is the control pattern only.

Changelog

v1.0 · DATE: First publish.