On Alert Web Request not Firing at Trigger

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
This is a strange one that I have tried everything, so I am not sure if it is a bug or I am missing something.

So in CAMERA SETTINGS > ALERTS > ON ALERT - I have had it set to send an email when it is triggered. That works fine just like it should.

I am now trying to add a web request on the alert. I key in the web request and hit the test trigger in the ON ALERT screen and it fires all the Alerts and I see the camera setting change per the web request. So I know it works from the test trigger from the ON ALERT page.

Now when I actually trigger the camera outside with motion or trigger it from within BI, the email trigger goes as it should, but the other alert doesn't?

I tried deleting the email alert thinking maybe you could only do one ON ALERT at a time, but no dice.

Any thoughts?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
From the help pdf...
Note that when testing, the action set runs in the console UI process. If you are running Blue
Iris as a service in the background, “real” action sets run in the service process, and this can
create discrepancies in what you experience


 

Brazeal

n3wb
Joined
Oct 6, 2019
Messages
18
Reaction score
22
Location
Florida
I also was having a problem with web alerts not working. I rolled back to the last stable release, and it starting working again. What are you seeing in the log screen in BI? I was getting a 400 error.
Does it work if you post the URL directly in a browser?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Also, if you’re using localhost in your web request, try 127.0.0.1 instead.
Others have reported localhost usage issues.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
Thanks everyone for the replies - unfortunately still no dice.

From the help pdf...
Note that when testing, the action set runs in the console UI process. If you are running Blue
Iris as a service in the background, “real” action sets run in the service process, and this can
create discrepancies in what you experience
I saw that in the help file, and with the exception of the email alert, I have never been able to get any sound or web requests to work. I would think something would work?


I also was having a problem with web alerts not working. I rolled back to the last stable release, and it starting working again. What are you seeing in the log screen in BI? I was getting a 400 error.
Does it work if you post the URL directly in a browser?
The BI log shows that it went when I trigger it. It says:

Web: HTTP/1.1 200 OK

I was running 5.2.9.18 and reverted back to 5.2.7.12 but still no dice.

Yes, putting the URL directly in a browser works.


Also, if you’re using localhost in your web request, try 127.0.0.1 instead.
Others have reported localhost usage issues.
I am using the IP address of the camera in the web request. I tried changing to 127.0.0.1 and no dice.

Any other suggestions?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
Can you provide a screenshot of the web request?
OK - here is where it gets messy and probably something you have never seen LOL.

I have a really cheap camera that is small but fits it's location perfectly.

Because it is so cheap, it doesn't have a day/night profile to run different shutter speeds. At night the auto gives just enough blur and I want to run it at 1/250 at night.

I was messing around with the View Source tool in Explorer and was able to determine that this command will change it to a 1/250 shutter:

192.168.100.124/?jcpcmd=aeawbblccfg%20-act%20set%20-aeCtrlMode%200%20-awbCtrlMode%200%20-redGain%20128%20-blueGain%20128%20-lowlightenhance%200%20-aewinweight%200%20-nightfacemode%200%20-defogenhance%200&_=

And then I have a similar command to put it back to auto.

I can run the test alert in the On Alerts and watch the shutter speed change in both BI and the Camera GUI. But it will not run when the camera is actually triggered.

I can also copy it into a browser URL and it changes the shutter speed.
 
Last edited:

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Perhaps a HTTP POST semantics issue? I don't have any suggestions for the Web request.

HOWEVER, my "Task Scheduler work around" might be of help.
Basically, it's 2 steps:
1. Create a new task in Task Scheduler to open Chrome with the URL above (this is an on-demand, unscheduled task).
2. Create a new Blue Iris 'Run a program or script' Action set item for your camera that executes the task in step #1.

I've previously posted a guide for this 'work around' in this thread...

Follow the instructions in step 1 until screenshot #4.
Instead, use the following screenshot as a guide
1593653610053.png

Then complete step 2.

If everything works correctly, now when your camera alerts, Chrome should open as a foreground process and execute your URL.

A downside is that Chrome will become littered with tabs; an upside is that the tabs are evidence that the action is working.

if you wonder why not skip step 1 and simply run chrome.exe from a 'Run a program or script' Action set item? The reason is that this executes Chrome as a background process. It not only will not execute the URL, but (on my machine) makes Chrome inoperable and requires killing all of its background process and sometimes a restart.

It seems that Windows Task Scheduler always runs a task in the UI process, even when it is executed from the service process.
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
@jaydeel - thanks for this - I will give this a try and see if I can get it to work!

Looking at that other thread you pasted here - is there a way with Task Scheduler to open up a camera URL and have Scheduler key in the user and password?
 
Last edited:

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Do you mean actually ‘typing‘ the credentials into fields? if so, I do not know of a way to do this.

Are you sure the camera cannot accept credentials via HTTP query parameters in the URL?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Do you mean actually ‘typing‘ the credentials into fields? if so, I do not know of a way to do this.

Are you sure the camera cannot accept credentials via HTTP query parameters in the URL?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
Do you mean actually ‘typing‘ the credentials into fields? if so, I do not know of a way to do this.

Are you sure the camera cannot accept credentials via HTTP query parameters in the URL?
Yeah, I was wondering if something like that was possible.

The camera accepts the credentials via HTTP query parameters in the URL as long as the camera GUI is logged in. The shutter will change with each command. But as soon as I log out or close the GUI, then the command quits working. I have not figured out the right combination to add USER and PASSWORD to the URL. I have an email into the seller, but like I said it is a cheapo so I doubt they even know or will even reply back.

So I was hoping to also figure out a way to automate having a browser open and login to the camera GUI automatically.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
From the help pdf...
Note that when testing, the action set runs in the console UI process. If you are running Blue
Iris as a service in the background, “real” action sets run in the service process, and this can
create discrepancies in what you experience
Also from the help file is this:

The service by default runs as a user called “local service” which does not have the same access to the system as your user account. For most action types, it’s recommended that you run the service with your own user account instead. This is changed by opening the Windows service manager (search for services) and edit the Blue Iris service entry Login page. See the Administration chapter for instructions.

I believe I have mine configured correctly. My BI service is ran by the same user and password as the computer login - is that correct? But that user and PW doesn't show up in the list of users set up in BI? Could that be the issue or am I reading too much into it.

I did turn off the run as service and then the Alert works, but obviously then if the computer or BI hiccups it will not restart. Maybe this is one of the few instances where it will not work?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
My BI service is ran by the same user and password as the computer login - is that correct?
Yes. You can confirm this looking at the ‘Blue Iris Service’ entry in services.msc.

1593821196154.jpeg

Did the Task Scheduler workaround not work? ... From your previous feedback it was not clear if you tried this and got stuck at the credentials page (when the browser is not already logged in to the camera GUI).

I had a thought that a keyboard automation utility might be a solution <examples>, but I’ve not tried them. And if you allowed the browser’s password manager to save the camera’s credentials, then you might be able to have Task Scheduler use the utility to send only an {ENTER} key after opening the URL.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Maybe you don’t need a utility at all?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
Yea, after I saw your way in that post above, I got sidetracked trying to address it in Task scheduler and got hung up on something.

Let me try this way and see if that may work.
 

tomgru

Young grasshopper
Joined
May 2, 2016
Messages
51
Reaction score
9
I'm having a similar issue.

I have an HTTP web request that used to fire perfectly on alert (and still works when i run it from a browser).

But if i run a test on the alert, i see this message:
Web: HTTP/1.0 200 OK

Followed by this message:
1 action/s skipped based on active profile or trigger service

The profile is correct... not sure what the "trigger service" is?

Love any thoughts here. Again, used to work. I haven't updated BI recently, so not sure what could have changed.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
@tomgru - so it sounds like somehow a profile got attached to the alert since you are getting the "1 action skipped based on..." message

My situation is from this screen if I hit the test alert lightning bolt at the bottom, the email will go, whichever profile I am in at the time of the test will trigger and work, and then the other is skipped. See if you have any of the profiles greyed out. Since you are getting that message, I think that is the case.

My issue is that it will fire from the action from the test, but not from an actual trigger.

1593975571395.png
 

tomgru

Young grasshopper
Joined
May 2, 2016
Messages
51
Reaction score
9
That kind of makes sense, as I have profile 1 (Home) selected, so it's not running the other alert. But i figured that since I've highlighted the Web alert, then hit the lightening bolt, it should only test that one...

Annotation 2020-07-05 121933.jpgAnnotation 2020-07-05 121933.jpg
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,438
Reaction score
47,563
Location
USA
The alert test will test them all to confirm it will not fire when it shouldn't, thus the skip message, so if you want to test the other one, then change the profile temporarily to the other profile.
 
Top