video
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
video [2022/12/01 17:05] – [Stream Stalled Handler:] as number check for string parameter James Sentman | video [2023/05/12 14:56] (current) – [Stream Stalled Handler:] added better reboot handling example James Sentman | ||
---|---|---|---|
Line 96: | Line 96: | ||
rebooting or power cycling it if needed. The count will increase until the interface is restarted or | rebooting or power cycling it if needed. The count will increase until the interface is restarted or | ||
the camera starts responding again. | the camera starts responding again. | ||
+ | |||
+ | By checking for a mod 15 you will attempt to restart the camera only every 15 times it tries to restore | ||
+ | and so will not just keep rebooting it every 10 seconds and potentially never let it actually come | ||
+ | back up again. | ||
+ | | ||
+ | The “reboot()” command comes from the Camera API for Amcrest Cameras, but others have similar commands. | ||
+ | |||
*) | *) | ||
on streamStalled( stallCount) | on streamStalled( stallCount) | ||
- | write log " | + | write log " |
- | if (stallCount | + | |
- | write log “running a failed camera | + | if stallCount |
- | | + | write log “Attempting to restart |
+ | reboot() | ||
end if | end if | ||
+ | |||
end streamStalled | end streamStalled | ||
video.txt · Last modified: 2023/05/12 14:56 by James Sentman