Kernel watchdog, sensor re-init after gateway reconnect, camera keeps node on ONVIF trouble, ONVIF position limits #26

Merged
ClaudeAI merged 11 commits from fix/camera-keep-node into master 42 minutes ago
Collaborator

Combines the three open fix branches (fix/kernel-watchdog -> fix/sensor-reconnect-reinit -> fix/camera-keep-node). All were tested on the real system.

Kernel watchdog (fix/kernel-watchdog)

  • The watchdog is fed from its own thread while the kernel loop makes progress; a stalled step is logged by name (slow step / busy / stalled).
  • Long blocking work moved out of the kernel loop: report-day delete runs in a background thread, mediamtx restart uses systemctl --no-block and is rate limited, IP UART connect has a timeout, the Ethernet2UART gateway validates itself.
  • watchDogDaemon: line buffer, monitoring ends on client EOF, handler cleanup fixed, bind checked; la_mojo sends getpid().
  • targetPipeLine compile fix.

Sensor after a gateway reconnect (fix/sensor-reconnect-reinit)

  • The transport counts its connections (connect epoch); the sensor re-initialises after the gateway reconnected instead of staying offline until a restart.
  • The log says why a gateway connection dropped (closed by the gateway / socket error, TCP info).

Camera (fix/camera-keep-node)

  • ONVIF trouble re-creates only the PTZ protocol; the camera node and its video stream are kept. A recovered protocol goes straight back to ready (no full re-initialisation).
  • Only a major problem (3 failed protocol re-creations in a row after it worked: camera power / network) or a changed camera record rebuilds the node, which then fully initialises the camera.
  • Video stream is restarted only after a lasting stall (~15 s without frames), not after one 5 s gap.
  • ONVIF AbsoluteMove: the ROI orientation is clamped to -1..1 (tilt=1.34 was rejected with ter:InvalidPosition); endless pan wraps the azimuth; pOnvif clamps to the camera limits as a last safety.
  • Debug: AbsoluteMove coordinates (DEBUG_PONVIF_PTZ in ponvif.h), camera position spaces / limits, ROI target direction.

Generated with Claude Code

https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16

Combines the three open fix branches (fix/kernel-watchdog -> fix/sensor-reconnect-reinit -> fix/camera-keep-node). All were tested on the real system. ## Kernel watchdog (fix/kernel-watchdog) - The watchdog is fed from its own thread while the kernel loop makes progress; a stalled step is logged by name (slow step / busy / stalled). - Long blocking work moved out of the kernel loop: report-day delete runs in a background thread, mediamtx restart uses `systemctl --no-block` and is rate limited, IP UART connect has a timeout, the Ethernet2UART gateway validates itself. - watchDogDaemon: line buffer, monitoring ends on client EOF, handler cleanup fixed, bind checked; la_mojo sends getpid(). - targetPipeLine compile fix. ## Sensor after a gateway reconnect (fix/sensor-reconnect-reinit) - The transport counts its connections (connect epoch); the sensor re-initialises after the gateway reconnected instead of staying offline until a restart. - The log says why a gateway connection dropped (closed by the gateway / socket error, TCP info). ## Camera (fix/camera-keep-node) - ONVIF trouble re-creates only the PTZ protocol; the camera node and its video stream are kept. A recovered protocol goes straight back to ready (no full re-initialisation). - Only a major problem (3 failed protocol re-creations in a row after it worked: camera power / network) or a changed camera record rebuilds the node, which then fully initialises the camera. - Video stream is restarted only after a lasting stall (~15 s without frames), not after one 5 s gap. - ONVIF AbsoluteMove: the ROI orientation is clamped to -1..1 (tilt=1.34 was rejected with ter:InvalidPosition); endless pan wraps the azimuth; pOnvif clamps to the camera limits as a last safety. - Debug: AbsoluteMove coordinates (DEBUG_PONVIF_PTZ in ponvif.h), camera position spaces / limits, ROI target direction. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
ClaudeAI added 11 commits 43 minutes ago
a77f34253a
Kernel watchdog: feed from its own thread while the kernel loop makes progress
0d043cd106
Kernel loop: move long blocking work out of it
6cdca3c075
watchDogDaemon: line buffer, end on client EOF, handler cleanup; la_mojo sends getpid()
ec409b37ca
Sensor: re-initialise after a gateway reconnect; say why a gateway connection dropped
a7c5e76e54
Camera: re-create only the PTZ protocol on ONVIF trouble, keep the node and its stream
ab477ca497
Video stream: restart only after a lasting stall, not after one 5 s gap
87a11e6679
Camera PTZ recovery: no full re-initialisation; a major problem rebuilds the node
21674ad9ca
ONVIF PTZ debug: log AbsoluteMove coordinates and the camera's position limits
5dc051623a
ONVIF absolute move: keep the position inside the camera limits
ClaudeAI merged commit 74d7cf9ed8 into master 42 minutes ago
The pull request has been merged as 74d7cf9ed8.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.