Skip to content

Presets

Presets let you save and recall PTZ positions by name. They’re persisted in state.json and survive daemon restarts.

Terminal window
emeet-pixyd preset save home # Save current position as "home"
emeet-pixyd preset save desk # Save another position

Type a name in the preset input field and press Enter (or click Save).

Terminal window
emeet-pixyd preset load home # Recall the "home" preset

Click a preset name chip to recall it.

Terminal window
emeet-pixyd preset delete home # Delete the "home" preset

In the web UI, click the x button on a preset chip.

Terminal window
emeet-pixyd preset list

Presets can be mirrored to and from the camera’s on-device motor slots (slots 1–8). Push moves the camera; pull is read-only:

Terminal window
emeet-pixyd preset push home # Mirror the "home" preset into a hardware slot
emeet-pixyd preset pull # Sweep hardware slots into hw-1, hw-2, ... presets
emeet-pixyd preset pull --dry-run # Preview the sweep without storing anything

preset pull never moves the motors and never overwrites your named presets — pulled slots land as additive hw-<slot> presets. Slots that are set but do not expose their position are counted as “set (position not exposed)” instead of stored. The sweep aborts after 3 consecutive unreadable slots (one success resets the counter) so an unresponsive device cannot stall the command, and --dry-run runs the identical sweep report-only: nothing is stored, persisted, or broadcast.

  • Maximum 16 presets (pixy.MaxPresets)
  • Names must be non-empty and 32 runes or fewer
  • Names cannot contain path separators (/, \) or control characters
  • Names are validated at both CLI and HTTP save boundaries

Presets are also accessible via HTTP:

Endpoint Method Description
/api/preset/save/{name} POST Save current PTZ as preset
/api/preset/load/{name} POST Recall a preset
/api/preset/delete/{name} POST Delete a preset
/api/preset/push/{name} POST Mirror a preset into a hardware slot
/api/preset/pull POST Sweep hardware slots into hw-N presets

Presets are stored in state.json under the Presets key as a PresetMap. The SortedNames() method provides alphabetically sorted iteration for consistent display.