Presets
Presets let you save and recall PTZ positions by name. They’re persisted in state.json and survive daemon restarts.
Saving Presets
Section titled “Saving Presets”emeet-pixyd preset save home # Save current position as "home"emeet-pixyd preset save desk # Save another positionWeb UI
Section titled “Web UI”Type a name in the preset input field and press Enter (or click Save).
Recalling Presets
Section titled “Recalling Presets”emeet-pixyd preset load home # Recall the "home" presetWeb UI
Section titled “Web UI”Click a preset name chip to recall it.
Deleting Presets
Section titled “Deleting Presets”emeet-pixyd preset delete home # Delete the "home" presetIn the web UI, click the x button on a preset chip.
Listing Presets
Section titled “Listing Presets”emeet-pixyd preset listHardware Mirroring
Section titled “Hardware Mirroring”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:
emeet-pixyd preset push home # Mirror the "home" preset into a hardware slotemeet-pixyd preset pull # Sweep hardware slots into hw-1, hw-2, ... presetsemeet-pixyd preset pull --dry-run # Preview the sweep without storing anythingpreset 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.
Limitations
Section titled “Limitations”- 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
HTTP API
Section titled “HTTP API”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 |
Storage
Section titled “Storage”Presets are stored in state.json under the Presets key as a PresetMap. The SortedNames() method provides alphabetically sorted iteration for consistent display.
Where to go next
Section titled “Where to go next”- PTZ Control — the axes presets are built on
- CLI Reference — all preset commands
- Web UI — manage presets from the browser
- Configuration — state persistence details
- Architecture Overview — API endpoints reference