Manual PTZ control is overridden by check_and_restart_patrol after ~30 s

Aperta
#490 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Start by reading SystemController.check_and_restart_patrol() in pyroengine/core.py and the camera API handlers for POST /patrol/stop_patrol and /control/start_move and /control/move. Trace how patrol restarts are scheduled and how control requests reach the camera. Done means manual PTZ control holds its position for a configurable delay, then patrol resumes; the issue does not name a test to run.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happens

SystemController.check_and_restart_patrol() (pyroengine/core.py) runs every engine round and restarts the patrol of every camera whenever no stream is active. As a result, POST /patrol/stop_patrol on the camera API only lasts until the next round: an operator who steers a PTZ camera through the API (/control/start_move, /control/move, ...) without an active livestream, for example from a multi-camera view, sees the camera go back to its pose about 30 s later.

Today the only way to hold a PTZ camera on a manual position is to keep a livestream open on it.

Suggestion

Honour an explicit manual control, e.g. a "manual hold until" timestamp set by stop_patrol and by control commands, expiring after a configurable delay (a few minutes), after which check_and_restart_patrol() resumes the patrol as it does now.

Found while running a self-hosted instance with a Hikvision PTZ camera (VAB Toscana, Italy).

Lingua principale
Python
Stelle
21
Fork
10
Merge medio
4g 4h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pyronear/pyro-engine

Tutte le issue di pyronear/pyro-engine

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.