Change Brightness via Http post command

BPet

Young grasshopper
Joined
Oct 8, 2017
Messages
45
Reaction score
9
I am able to change profiles via http post, but I am now trying to change the brightness on a specific camera and I must be doing something wrong? I am using the following:

http://127.0.0.1:PORT/cam/StreetView/pos=25&user=USERNAME&pw=PASSWORD

I am using 25 based on the JSON info that indicated that brightness is button 11-26. The http response I get indicates "ok". But when I go back into Blue Iris and select the camera and then PTZ/Control and then Brightness, I see that it is still at level 4 - it did not change. It works fine if I manually click on brightness, in this case number 9, and so I know that the camera is getting the info from Blue Iris.
 

BPet

Young grasshopper
Joined
Oct 8, 2017
Messages
45
Reaction score
9
Figured a way to do this by making request directly to Foscam camera using AutoHotKey and a little text file, posting it in case anyone else wants to do the same. I have an automation program run one file at night and then it runs another file at daybreak so I can set cameras settings differently for day/night.

poststrings =
(Ltrim
http://192.168.1.XXX:PORT#/cgi-bin/CGIProxy.fcgi?cmd=setHue&hue=50&usr=USERNAME&pwd=PASSWORD
http://192.168.1.XXX:PORT#/cgi-bin/CGIProxy.fcgi?cmd=setBrightness&brightness=26&usr=USERNAME&pwd=PASSWORD
http://192.168.1.XXX:PORT#/cgi-bin/CGIProxy.fcgi?cmd=setContrast&constrast=49&usr=USERNAME&pwd=PASSWORD
http://192.168.1.XXX:PORT#/cgi-bin/CGIProxy.fcgi?cmd=setSaturation&saturation=60&usr=USERNAME&pwd=PASSWORD
http://192.168.1.XXX:PORT#/cgi-bin/CGIProxy.fcgi?cmd=setSharpness&sharpness=50&usr=USERNAME&pwd=PASSWORD
)
loop, parse, poststrings, `n,`r
{
poststring := A_LoopField
URLDownloadToFile,%poststring%, response.html

}
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,701
Reaction score
14,085
Location
USA
I don't know about sending brightness commands to BI's web server, but you can customize one of the PTZ presets in Blue Iris's PTZ settings to have it do something else.
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
I use the method bp2008 mentioned; it's fairly newb friendly, but has it's downsides too. I have no use for 'pure IR on/off'. So I setup Custom HTTP to use "IR on/off" to switch my cameras between day/night mode. I also customized the 'focus far' BI command to refocus my cameras after switching modes (because sometimes switching modes triggers an autofocus on certain cams, which usually times out before the exposure settles in).

There are more than enough custom http functions to choose from. A nerd can go crazy with custom commands, but go too far and you'll have to have a good way of remembering what button does what for each camera, LOL.

For that reason, I'd really like to see Blue Iris add a feature that allows us to edit command names in the Custom HTTP drop down list. For example, for my setup it would make a lot more sense if I could rename "IR on" to "Night Mode", "IR off" to "Day Mode", "Zoom in" to "Refocus", etc... Such a feature would make the custom HTTP far more user friendly. Also, it doesn't even have to be an "edit", even better if we could just "add" a new function/name to that list (oh yeah, I don't care if you have to get rid of the button hover pop ups).

Kevin
 
Top