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 14:53] – added system requirements 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 ≠ 0 and stallCount mod 15 = 0 then | ||
+ | write log “Attempting to restart camera due to extended outage” color red | ||
+ | reboot() | ||
+ | end if | ||
end streamStalled | end streamStalled | ||
video.1669906385.txt.gz · Last modified: 2023/02/13 14:51 (external edit)