Blue Iris Integration with Indigo

Posted on
Sun Feb 11, 2018 3:00 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Blue Iris Integration with Indigo

At the suggestion of several members, I am starting a new thread to address questions related to integrating the (PC based) security camera management program Blue Iris (BI). Mods, please feel free to move if this isn't the best location for the new thread.

This is an outgrowth of this thread:
http://forums.indigodomo.com/viewtopic.php?f=152&t=19897&p=154512#p154512

Please go there to see the conversation from before this post.

Hopefully this can become a thread for continued discussion of this application. Also note that there is a very robust Blue Iris forum over on IP Cam Talk:
https://ipcamtalk.com/forums/blue-iris.30/

Now back to my question (sorry, I think this is the best I can do to quote from a different thread):

Re: Video Surveillance
Controlling Blue Iris from Indigo

On this I have rehashed from a similar post to do it in another product.

This changes BlueIris to "Profile 7"

Code: Select all
http://user:password@192.168.1.200:8030/admin?profile=7


Where
IP Address for Blue Iris = 192.168.1.200
Blue Iris port = 8030
Blue Iris Profile = 7
(user:password@ can be omitted if you are not using authentication for your Blue Iris web server)

The full list of commands is

Code: Select all
/image/{cam-short-name}?h=100 You may also specify a specific height (h) or width (w) instead of scale.
/mjpg/{cam-short-name}/video.mjpg An M-JPEG stream. This stream is compatible with "Blue Iris MJPEG stream request."
/file/clips/{filename}&mode=jpeg&speed=100 An M-JPEG stream of a clip from your New clips folder. You may include additional subdirectory names in the filename. The speed parameter is optional, a percentage of normal playback speed.
/thumbs/{filename} A thumbnail image from a specific file in the New clips folder.
/alerts/{filename} A JPEG image from the Alerts folder.
/admin?profile=x Temporarily change the active profile to x. Use x=-1 to toggle the lock status.
/admin?camera=x&trigger Trigger camera x (short name)
/admin?signal=x Changes the traffic signal state and returns the current state. x=0 for red, x=1 for green, x=2 for yellow. This requires admin authentication.
/audio/{cam-short-name}/temp.wav Pull a raw audio stream (MIME type audio/x-wav).
/cam/{cam-short-name}/pos=x Performs a PTZ command on the specified camera, where x= 0=left, 1=right, 2=up, 3=down, 4=home, 5=zoom in, 6=zoom out
/cam/{cam-short-name}/pos=100 Causes a snapshot image to be captured from the specified camera.
/h264/{cam-short-name}/temp.h264 Pull a raw H.264 stream (MIME type video/H264). This stream will play in a tool like VLC, and may be used in future versions of the ActiveX control.
/h264/{cam-short-name}/temp.ts Pull an MPEG-2 transport stream (MIME type video/MP2T).
/h264/{cam-short-name}/temp.m or .m3u8 Pull a virtual M3U8 file (MIME type application/vnd.apple.mpegurl). This will play in QuickTime, iPad and the iPhone using the iPhone Live Streaming format.


So for example if you wanted to force a trigger on a camera as your alarm is sounding so it records, you would do the following

Code: Select all
http://192.168.1.200:8030/admin?camera= ... en&trigger


Where "backgarden" is the short camera name you set in BlueIris.

To do that from Indigo you can run an embedded python script action as follows.

Code: Select all
import requests
url = "http://192.168.1.200:8030/admin?camera=backgarden&trigger"
requests.get(url)


Try the url in a browser first, and it seems it can be fussy about authentication, in my example you would set BlueIris not to require authentication on the local LAN. I am afraid if you run into authorisation issues then I am stuck, but could probably point you in the right direction to use curl in an external script. Let me know if you need more.



I have sucessfully gotten BI to trigger actions in Indigo, and have also been able to pull down snapshots from BI for using in control pages.

But thus far I have been unable to get BI to recognize http commands sent from Indigo (or just from a browser). I have tried both with and without my credentials in the http string, and with setting the authorization to "off LAN only" in BI.

BI is seeing the request, and registering it as a login in the log, but the requested action doesn't happen (say, a profile change or a camera trigger). In the BI log, I am showing a login (though oddly from a user called "anonymous", which the program will re-create even if I delete it), then will log out this user exactly a minute later. I even tried changing the permissions of that newly created user to Admin level to see if that would work, but it did not.

I looked around in the BI settings to see if there was perhaps some check box that I needed to enable to allow http calls (is that what this would be called?) but nothing jumped out at me.

I realize I could also ask this question over on the BI forums, but figured I'd start here since it seems we have some users who have integrated the two programs well.

I am envisioning using Indigo to manage the BI profile schedules/changing since I already have various automatic and triggered house states, etc. in Indigo that will mesh nicely with security camera monitoring/alert settings. Hopefully there is a way to do this.

Thanks for any suggestions.

Posted on
Sun Feb 11, 2018 3:23 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Blue Iris Integration with Indigo

First thing to try is doing in in Safari. If you end up with the "Authorisation Required" message then the issue is at the BI end.

If you check in BI Settings on the Web Server tab, and under the "Advanced" options then you should make sure the "use secure session keys and login page" is unchecked.

On a lot of the forums this does the trick, and if it successfully returns then you should get some return information from BlueIris in the browser. In all the other threads I can find this was the source of the issue.

I cannot get it to work on mine (I don't actually use it) bit that may be because I have installed the beta web UI from a third party. I do have a suspicion it may be a wider issue, and I see the same symptom as you in that the login works but not the api call.

I also saw an earlier user struggling with authorisations although it was not explicitly mentioning BlueIris it was the profile change, maybe they can pitch in if they fixed it.

http://forums.indigodomo.com/viewtopic.php?f=81&t=19910&hilit=profile

But it wasn't mentioned if seeker ever figured it out.

Posted on
Sun Feb 11, 2018 4:01 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Blue Iris Integration with Indigo

If you check in BI Settings on the Web Server tab, and under the "Advanced" options then you should make sure the "use secure session keys and login page" is unchecked.


Thanks,

Unchecking the box didn't seem to help. I tired in Safari (had been using Chrome before) and got the "Authorization Required" response. Even tried with a few different created user credentials. This is despite putting in my login info in the HTTP address, and having "non-LAN only" set for authentication.

Interestingly, in that other thread you sent, that user was able to get a response in Safari, which I was not.

I appreciate all the help. I'll see if anyne else weighs in.

It's not a deal breaker if I can't bring it under Indigo control. I just like having all of my automation centralized in that one place. But if I have to just do the scheduling in BI, then so be it.

Posted on
Sun Feb 11, 2018 4:10 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Blue Iris Integration with Indigo

So this is a little weird, I played around with the settings and temporarily switched off all authorisations and back on again.

The other thing is the user you are using with BlueIris must have admin rights, and I added that back in.

Anyway one of those two things worked and it is good for me. I inserted the following in an embedded python script action

Code: Select all
import requests
url = "http://192.168.1.200:82/admin?camera=backgarden&trigger&user=<blueirisuserwithadminrights>&pw=<blueirispassword>"
requests.get(url)


And it is triggering away, so I tried the following an it also changed the profile, in this case to profile 3

Code: Select all
import requests
url = "http://192.168.1.200:82/admin?profile=3&user=<biuser>&pw=<password>"
requests.get(url)


and it did the trick

Posted on
Sun Feb 11, 2018 4:28 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Blue Iris Integration with Indigo

YES, that did it! Both types of triggers worked.

No idea why toggling all authentications off then back on worked, but it did. I did have to leave the "Use session keys and login page" toggled off. Do you think that is OK security-wise?

Again, thanks a lot for all of your time trouble shooting this with me.

Posted on
Sun Feb 11, 2018 9:08 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Blue Iris Integration with Indigo

The full list of commands is


Code: Select all
/image/{cam-short-name}?h=100 You may also specify a specific height (h) or width (w) instead of scale.
/mjpg/{cam-short-name}/video.mjpg An M-JPEG stream. This stream is compatible with "Blue Iris MJPEG stream request."
/file/clips/{filename}&mode=jpeg&speed=100 An M-JPEG stream of a clip from your New clips folder. You may include additional subdirectory names in the filename. The speed parameter is optional, a percentage of normal playback speed.
/thumbs/{filename} A thumbnail image from a specific file in the New clips folder.
/alerts/{filename} A JPEG image from the Alerts folder.
/admin?profile=x Temporarily change the active profile to x. Use x=-1 to toggle the lock status.
/admin?camera=x&trigger Trigger camera x (short name)
/admin?signal=x Changes the traffic signal state and returns the current state. x=0 for red, x=1 for green, x=2 for yellow. This requires admin authentication.
/audio/{cam-short-name}/temp.wav Pull a raw audio stream (MIME type audio/x-wav).
/cam/{cam-short-name}/pos=x Performs a PTZ command on the specified camera, where x= 0=left, 1=right, 2=up, 3=down, 4=home, 5=zoom in, 6=zoom out
/cam/{cam-short-name}/pos=100 Causes a snapshot image to be captured from the specified camera.
/h264/{cam-short-name}/temp.h264 Pull a raw H.264 stream (MIME type video/H264). This stream will play in a tool like VLC, and may be used in future versions of the ActiveX control.
/h264/{cam-short-name}/temp.ts Pull an MPEG-2 transport stream (MIME type video/MP2T).
/h264/{cam-short-name}/temp.m or .m3u8 Pull a virtual M3U8 file (MIME type application/vnd.apple.mpegurl). This will play in QuickTime, iPad and the iPhone using the iPhone Live Streaming format.


In the interest of adding to the knowledge base...

I was tinkering around trying to find http commands to move a PTZ camera to its BI presets. This was to add some buttons to an Indigo CP.

I couldn't find anything online, except for an older BI help file that suggested pos=101-120 would take the camera to position 1-20. These did not work when I tested them.

However, through some trial and error, I found that you can access the presets by starting at pos=8. I don't know how far down the preset list this goes, but 8-12 definitely hit presets 1-5 on my system.

So this code will bring the camera to preset 1:

Code: Select all
import requests
url = "http://<BI IP:Port>/cam/<camera short name>/pos=8&user=<BI Username>&pw=<BI admin password>"
requests.get(url)


Just figured I'd pass it along

Posted on
Sun Feb 11, 2018 10:02 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Blue Iris Integration with Indigo

Also, you can whitelist a local IP address by specifying it in the advanced box preceded by a carrot (^). This allows you to keep the secure sessions token checked, and not have to send login credentials in the url.

https://ipcamtalk.com/threads/only-sent-out-email-when-alarm-is-set.22403/

Posted on
Mon Feb 12, 2018 12:31 am
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Blue Iris Integration with Indigo

Hi

Have put together the beginnings of a BlueIris IndigoPlugin

See here:
https://github.com/Ghawken/IndigoPlugin-BlueIris
& here:
viewtopic.php?f=222&t=20174

Glenn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests