Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

onvif-ptz-interface

/onvif-ptz-interface

Implementuje usługi kamery ONVIF Profile S i T: Device, Media i PTZ przez SOAP oraz klienta, który działa z kamerami różnych producentów.

Repozytorium
ptz-simulator ↗
Licencja
MIT
Ostatnia zmiana repozytorium
12.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
5
Skrypty
1
Komentarze HTML
1
Adresy URL w SKILL.md
5
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
  • SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.

Skrypty: scripts/onvif_conformance.py

Co robi i kiedy

Implementuje usługi kamery ONVIF Profile S i T: Device, Media i PTZ przez SOAP oraz klienta, który działa z kamerami różnych producentów.

Oryginalny opis (EN)

Implement an ONVIF Profile S/T conformant PTZ service (SOAP 1.2 over HTTP): Device, Media and PTZ services with their operations, WS-Discovery on UDP 3702, HTTP digest and WS-Security UsernameToken (PasswordDigest) authentication, generic pan/tilt/zoom coordinate spaces (-1..1 / 0..1), spec fault chains (env:Sender/ter:InvalidArgVal/...) and timeout semantics. Use when building a camera-side ONVIF endpoint or an ONVIF client that must work with VMS like Milestone or Genetec; validate with scripts/onvif_conformance.py against the ptzsim reference.

Jak działa

  1. Implementation rules
  2. Validate
Sekcje z nagłówków SKILL.md, w oryginale · 78 linii, 550 słów
Podgląd SKILL.md
---
name: onvif-ptz-interface
description: "Implement an ONVIF Profile S/T conformant PTZ service (SOAP 1.2 over HTTP): Device, Media and PTZ services with their operations, WS-Discovery on UDP 3702, HTTP digest and WS-Security UsernameToken (PasswordDigest) authentication, generic pan/tilt/zoom coordinate spaces (-1..1 / 0..1), spec fault chains (env:Sender/ter:InvalidArgVal/...) and timeout semantics. Use when building a camera-side ONVIF endpoint or an ONVIF client that must work with VMS like Milestone or Genetec; validate with scripts/onvif_conformance.py against the ptzsim reference."
license: MIT
compatibility: The bundled conformance script needs only Python 3.8+ (standard library). The reference simulator ptzsim (https://github.com/stritti/ptz-simulator) runs on Python 3.8+ with no dependencies.
metadata:
  author: stritti
  version: "1.0.0"
  source: https://github.com/stritti/ptz-simulator
---

<!--
SPDX-FileCopyrightText: 2026 Stephan Strittmatter
SPDX-License-Identifier: MIT
-->

# ONVIF PTZ interface (Profile S / T)

Implement the ONVIF PTZ service the way the ONVIF Core and PTZ Service specifications
define it, so VMS and ONVIF clients (onvif-zeep, …) can discover and drive the camera.

Reference documents:

- [references/onvif-services.md](references/onvif-services.md) — the three services and
  their operations (Device, Media, PTZ, Imaging), which operations work without
  authentication, endpoint paths and ports.
- [references/onvif-spaces-faults-auth.md](references/onvif-spaces-faults-auth.md) —
  coordinate spaces and their URIs, value ranges, SOAP 1.2 fault chains and HTTP status
  codes, WS-Discovery (Hello/Probe/ProbeMatches/Bye), WS-Security UsernameToken and
  HTTP digest auth.
- [references/soap-examples.md](references/soap-examples.md) — ready-to-send SOAP 1.2
  envelopes for the core operations (GetCapabilities, GetProfiles, GetStatus,
  ContinuousMove, Stop, AbsoluteMove, presets) and a fault example.

## Implementation rules

1. **SOAP 1.2** (`http://www.w3.org/2003/05/soap-envelope`), POST with
   `Content-Type: application/soap+xml; charset=utf-8`. Unknown operations → SOAP fault
   `env:Receiver / ter:ActionNotSupported` (HTTP 500). Non-GET/POST methods → 405.
2. **Discovery**: answer WS-Discovery probes on UDP 3702 (multicast 239.255.255.250),
   types `dn:NetworkVideoTransmitter tds:Device`; send Hello on start, Bye on shutdown;
   ProbeMatches carries the XAddrs, e.g. `http://<ip>:<port>/onvif/device_service`.
3. **Authentication** (when configured): HTTP digest (RFC 2617, answer 401 with a
   `WWW-Authenticate` challenge, also for wrong credentials) and/or WS-Security
   UsernameToken with `PasswordDigest` = Base64(SHA-1(nonce + created + password)),
   nonce Base64-encoded, `Created` in UTC ISO-8601. `PasswordText` may also be accepted.
   These operations stay open without credentials (PRE_AUTH): `GetSystemDateAndTime`,
   `GetCapabilities`, `GetServices`, `GetServiceCapabilities`, `GetWsdlUrl`,
   `GetHostname`, `GetEndpointReference`.
4. **Coordinates** use the generic ONVIF spaces: pan −1…1 (≈ ±170°), tilt −1…1
   (−1 = −30°, 0 = level, +1 = +90°), zoom 0…1 (1×…20×), velocities −1…1. Declare the
   spaces in the PTZ node's `SupportedPTZSpaces` and use the `space` attribute URIs.
5. **Faults** use the spec chains, e.g. unknown profile → HTTP 400 + fault
   `env:Sender / ter:InvalidArgVal / ter:NoProfile`; out-of-range velocity, position,
   translation or speed → `ter:InvalidArgVal / ter:InvalidVelocity|InvalidPosition|
   InvalidTranslation|InvalidSpeed`; timeout outside PT0.1S…PT60S →
   `ter:TimeoutNotSupported`; an unsupported `space` URI → `ter:SpaceNotSupported`;
   `SetPreset` with an unknown `PresetToken` → `ter:NoToken`, while moving →
   `env:Receiver / ter:Action / ter:MovingPTZ` (PTZ spec 25.12, chapter 5); after
   `RemovePTZConfiguration` PTZ operations fail with `ter:NoPTZProfile`.
6. **Motion semantics**: `ContinuousMove` velocity 0 on an axis stops that axis; an
   omitted axis keeps moving; `Timeout` (default 5 s, PT0.1S…PT60S) ends the move and
   every new call extends it. `Stop` halts pan/tilt and zoom. `AbsoluteMove` takes
   `Position` (position-space URIs), `RelativeMove` takes `Translation`
   (translation-space URIs); both accept an optional `Speed`; out-of-range values fault.
7. **Media profile**: one profile (e.g. `Profile_1`) with a video source configuration
   (e.g. 640×360), an encoder configuration and a PTZ configuration token. `GetProfiles`
   must return it with the PTZ configuration; `GetStreamUri` returns the RTSP URI.
8. **Presets**: `SetPreset`/`GotoPreset`/`RemovePreset`/`GetPresets` with `PresetToken`;
   `GotoPreset` may carry a `Speed` that overrides the preset speed. The reference
   simulator parses tokens as **decimal** (`int(token)` in `OnvifCamera._preset_number`)
   and emits decimal tokens in `GetPresets` (`token="5"`), so use `0`…`99`; the hex
   `00`…`63` form is the VISCA command byte, not the ONVIF token — match the target
   camera's convention.

## Validate

```bash
python3 scripts/onvif_conformance.py --host <camera-ip> --port 8080
python3 scripts/onvif_conformance.py --host 127.0.0.1 --user admin --password secret --discovery
```

To validate a *client*, point it at the reference simulator (skill
`ptz-conformance-testing`): `ptzsim serve --onvif --onvif-user admin --onvif-password secret`
and let the client discover or enter `http://<ip>:8080/onvif/device_service`. A client
must send every axis in each `ContinuousMove` (velocity 0 for an axis that should stand
still): an omitted axis keeps moving. See the checklist section "Client side".
Pliki w paczce (5)
  • SKILL.md 6 KB
  • references/onvif-services.md 5 KB
  • references/onvif-spaces-faults-auth.md 5 KB
  • references/soap-examples.md 6 KB
  • scripts/onvif_conformance.py 22 KB

Wersje

W bazie nie ma innych skilli o nazwie onvif-ptz-interface.

Migawka bazy z 13.11.2026 · wersja paczki 3150734ce44a (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90ptz-reference-interface
    Implementuje zgodny ze standardem interfejs sterowania kamerami PTZ (VISCA, ONVIF) i sprawdza go w symulatorze ptzsim.
  • 100ptz-onvif
    Wykrywa i steruje kamerami IP przez ONVIF, czyli SOAP i XML z uwierzytelnianiem WS-Security, obejmując PTZ i strumienie RTSP.
  • 100ptz-conformance-testing
    Sprawdza zgodność implementacji sterowania kamerą PTZ, w protokołach VISCA lub ONVIF, z symulatorem referencyjnym ptzsim i skryptami testowymi.
  • 100ptz-docs
    Wyszukuje i pobiera dokumentację protokołów sterowania kamerami PTZ, czyli Sony VISCA i ONVIF, z profilami i formatem ramek.
  • 100wsdiscovery
    Skanuje protokołem WS-Discovery, aby wykrywać i wyliczać kamery ONVIF i urządzenia IoT w sieci.
  • 98ezviz-open-ptz-control
    Steruje kamerami obrotowymi przez platformę Ezviz Open: lista i stan urządzeń, sterowanie PTZ oraz zarządzanie punktami predefiniowanymi, z poświadczeniami o minimalnych uprawnieniach.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.