Unable to Run a Script from Camera Alert

pepperfr

Getting the hang of it
Joined
Feb 8, 2015
Messages
96
Reaction score
36
Location
Ohio
I just upgraded from BI3 to BI 4 on a Windows 10 machine. I was having no trouble running a script from the camera alert configuration in BI 3. After upgrading to BI 4, the script is no longer activated when the camera is triggered. I have tried using the "Test" button from the "Configure Run Alert" window. The script will not run that way either. The script is a Windows Batch File. I can double-click the script file itself and it executes perfectly. The code looks like this:

ECHO OFF
ECHO "Setting Sony SNC-RX570 Camera to Preset 2 then to Preset 1"
:: This batch program is triggered by Blue Iris when motion is detected on CAM5
:: The program commands the SONY SNC-RX570 camera to go to Preset 2 and pause for 5 seconds
:: Preset 2 is the Worship Center view
:: The program then commands the SONY SNC-RX570 to go back to Preset 1 which is the normal parking lot view
callurl http://192.168.1.202/command/presetposition.cgi?PresetCall=2,30
sleep 5
callurl http://192.168.1.202/command/presetposition.cgi?PresetCall=1,30
exit

The script (Preset2 Preset1.bat) is located at C:\Camera Scripts
Callurl.exe and sleep.exe are located located at C:\Windows\System32.

Operating System: Windows 10 Home 64-bit Operating System, x64-based Processor

Notes:
1. I had to install BI4 as 32-bit since some of my cameras require Vitamin Control
2. I am not running 3rd party Antivirus, just Windows Defender. I tried with Windows Defender turned off and that didn't help.
3. I tried with Windows Firewall turned off and that didn't help.
4. I am running Blue Iris as a service.
 
Last edited:

logbuilder

Getting the hang of it
Joined
Sep 30, 2016
Messages
125
Reaction score
30
Location
In the Cascades 90 miles NE of Seattle
In BI, on the alerts page for the camera, you have an option to "Request from a web service". In the configuration of that option, you can specify a URL to send when it is triggered and a URL to send when the trigger is reset.

I had problems running a script too when BI was a service. As a non-service, it ran fine. As a service, no luck. I seem to remember some advice was given as to the type of user that the service was running under. Once I found the "Request from a web service" option, I found I was able to do what I wanted without the script.
 

pepperfr

Getting the hang of it
Joined
Feb 8, 2015
Messages
96
Reaction score
36
Location
Ohio
In BI, on the alerts page for the camera, you have an option to "Request from a web service". In the configuration of that option, you can specify a URL to send when it is triggered and a URL to send when the trigger is reset.

I had problems running a script too when BI was a service. As a non-service, it ran fine. As a service, no luck. I seem to remember some advice was given as to the type of user that the service was running under. Once I found the "Request from a web service" option, I found I was able to do what I wanted without the script.
Thanks logbuilder. I tried the "Request from a web service" option you mention. It works, but it is only a workaround, since I have other more complex scripts that I can't duplicate as a url call. I am still trying to figure out why I can't run a script.
 

pepperfr

Getting the hang of it
Joined
Feb 8, 2015
Messages
96
Reaction score
36
Location
Ohio
Solved: I emailed Blue Iris support. Ken suggested that I try running a simpler batch script on the camera Alert configuration. I tried running a script that executed the XCOPY command. It worked. The script that didn't work incorporated a couple of programs (sleep.exe and callurl.exe) that I had placed at C:\Windows\System32. I tried moving these programs to C:\Camera Scripts where all of my batch script files are located. The script that didn't work before now works! Solved!

P.S. I was messing around with placing the script files in different locations. When I placed the scripts in C:\Windows\System32, I noticed that I couldn't even see them when trying to navigate to them in the camera Alert configuration. I could see pretty much all folders and files in C:\Windows\System32 except the files that I had placed there. It seems like Blue Iris 4 is being blocked from files that I place in System32. Blue Iris 3 didn't seem to suffer from this limitation.
 
Top