Watchdog to power cycle cameras on HP ProCurve POE Switches

Joined
Dec 5, 2021
Messages
2
Reaction score
6
Location
MidWest
Blue Iris has a watchdog option for each camera. If a loss of signal is detected, it can be configured to "Run a program or script". I came up with a script that uses SNMP to power cycle that camera's port. It should work on most HP ProCurve POE switches. If anyone is interested, it could post the script and instructions.
 

CiscoGIRL

n3wb
Joined
Feb 10, 2023
Messages
2
Reaction score
0
Location
Missouri
Blue Iris has a watchdog option for each camera. If a loss of signal is detected, it can be configured to "Run a program or script". I came up with a script that uses SNMP to power cycle that camera's port. It should work on most HP ProCurve POE switches. If anyone is interested, it could post the script and instructions.
Hey i want your script!
 
Joined
Dec 5, 2021
Messages
2
Reaction score
6
Location
MidWest
Hello there. I forgot I posted about this. Here is a quick guide.

You must disable this script when uploading firmware updates to the cameras. You could brick a camera if BlueIris power cycles a port when the camera is busy updating.


I use a command line tool called "SnmpSet" from ezfive.com/snmpsoft-tools/snmp-set/ I am using this on my private NVR. Review the license requirements before use.

This guide does not cover the configuration within the HP switch. You must login to the switch and enable SNMP. The SNMP write community string is set to "private"

1) Place snmpset.exe in C:\Blueiris
2) Place Reboot-Camera.bat in C:\Blueiris (See the end for the contents of Reboot-Camera.bat)
3) In the "Watchdog" tab of a camera. Define the settings circled. Then click "On loss of signal"
image1.png



4) Click the + sign, click "Run a program or script"

image3.png

5) Use the settings below. In this example, "17" is port 17 on the HP ProCurve. That's it.

image4.png


The script will make a log file called "CameraReset.txt" Example contents:

Port 21 was power-cycled on Fri_12_06_2019_195621_39
Port 24 was power-cycled on Fri_12_06_2019_195621_43
Port 24 was power-cycled on Fri_01_31_2020__23838_90
Port 21 was power-cycled on Fri_01_31_2020__71657_17
Port 23 was power-cycled on Tue_03_10_2020__80534_91



Reboot-Camera.bat In the example below, the switch's IP address is 192.168.50.2 The write/private community string is named "private"


@ECHO OFF
set port=%1
set datetime=%date%_%time%
set datetime=%datetime: =_%
set datetime=%datetime::=%
set datetime=%datetime:/=_%
set datetime=%datetime:.=_%
C:\BlueIris\snmpset.exe -r:192.168.50.2 -c:"private" -val:"2" -tp:"int" -o:1.3.6.1.2.1.105.1.1.1.3.1.%port%"
ping 127.0.0.1 -n 10
C:\BlueIris\snmpset.exe -r:192.168.50.2 -c:"private" -val:"1" -tp:"int" -o:"1.3.6.1.2.1.105.1.1.1.3.1.%port%"
echo Port %port% was power-cycled on %datetime% >>C:\BlueIris\CameraReset.txt
set port=
set datetime=
 

Attachments

Top