[OBSOLETE] Blue Iris Fusion - Integrate SmartThings and Blue Iris!

Basically I set up a trigger (contact closing) then do several actions.

  1. Trigger camera 1 and 2 with the first link using “Location” and "make a web request "(one for each camera), using GET and FORM. Test the URL in your browser to make sure it works before wasting time trying to get it to trigger in webCoRE.

  2. Trigger camera 3 and set the PTZ to a preset (which is what preset=X is in the first URL - you don’t need it if you’re not using PTZ).

  3. Wait 2 minutes then put PTZ back to holding preset.

The the 2nd URL from above to change the profile.

Hope that helps!

Thanks for the info. I have never use a web request in WebCoRE but it will take a look and see if I can figure it out

Make sure you’re up-to-date on webCoRE. Web requests were fixed in today’s update.

works great thanks for your help!

Nice! I’ll update it in github so everyone gets the fix.

WebCoRE is a pretty good option, especially once it moves out of beta stage. Realize BI Fusion and WebCoRE control profiles and triggers the exact same way, the same GET statement. 95% of the issues anyone has had with getting BI fusion was due to either incorrectly installing the app or not having Blue Iris settings correct, you’ll still need to make the same Blue Iris setting changes to make WebCoRE work. I do like with WebCoRE that it SHOULD be much easier to backup all your work and transition to new locations and/or hubs in the future. The advantage BI fusion gives you is that you just have to enter the inputs and not deal with if/then or GET syntax, plus it encrypts the password within SmartThings, and you’re not sharing your username/password with a 3rd party (not that I’m too concerned about the WebCoRE creators). Good luck with your setup!

1 Like

Got it fixed, version 2.6 in Github now with your fixes. Thank you!

1 Like

@JMZ just wanted to say thanks. I installed a generic video camera device handler for my Hikvision and already use Blue Iris to monitor and was looking for a way to change profiles or send a video / image when an intrusion occurs from the security system, and your SmartApps solved this 100%.

Works flawlessly and is able to trigger the camera in Blue Iris when a contact opens and mode is ‘Away’.

Only issue I have is that it doesn’t list any Alarms for me to select. I am using a custom alarm device type, but it is hooked into Smart Home Monitor. So I guess my only request would be Smart Home Monitor integration to trigger when intrusion is detected, rather than mode + contact sensor.

@JMZ I have yet to install this solution but plan to do so in the near future.

I have a capability question in advance of exploring it. Can you kindly confirm if the following is possible. On the Blue Iris side, can a camera motion event trigger a Smartthings action. In simple use case, if a camera detects motion, an event is fired to turn on a light in ST.

I’ve not read back over the entire community post (a very popular thread :slight_smile: ) but recent posts refer to setting Blur Iris states when conditions occur in ST. That’s great too, just wondering if that’s possible the other way around as well.

Thanks and great work.

BI Fusion is the interface for Smartthings to control cameras (record,
change profile). There are a couple ways to can camera motion trigger
events in Smartthings, I use the IFTTT Maker channel, others have used
Webcore. There are also some apps people have written for it. I think your
best bet for that is using Webcore, it’s powerful and keeps it all inside
Smartthings for the most part. All of the methods use the Alert function in
Blue Iris to send a web command, it just depends on whichever receive
location you use. Lots of traffic on how to do that, I linked it several
times throughout his thread. When I get to a computer I can link it for you
again

I spoke to BI support and plan on working on either this code (forked) or my own. I have the JSON commands to pan, tilt, go-to preset and trigger recordings as well as set mode.

2 Likes

working on many things at work ATM… trying to get some time to get on this and the motion handler I want to write.

Hoping someone can help me get fusion to work on LAN. I have 192.168.x.x and port 81 set. The username and password work, and it is an admin account on BI. Works fine when I switch to WAN and use my external IP, however I can not get the LAN to work. I also updated to 4.2 both the trigger and main one. I have BI set to non authenticate for LAN and tried disabling the secure session keys as well. No luck. If I use the URL it generates on my PC on the LAN it works no problem, just the smartthings is not making it work, even though it is reporting it does in the ST logs

I just set this up and could not get it to work so I kept trying in my browser:
http://192.168.1.10:81//admin?profile=5&user=myusername&pw=mypassword

I kept getting login prompts no matter what even though I had in BlueIris > Settings > Web server ensured that “HTTPS LAN also” was off and that my user myusername had administrator permission (as well as LAN only). I found that under the Advanced button on this same page (BlueIris > Settings > Web server), you need to set “Required from” to “Non-LAN only” and then uncheck “Use secure session keys and login page”.

Keep trying in your browser using the URL that I posted above, swap out 192.168.1.10 with the IP of the computer running your BlueIris instance. Once it worked, it no longer showed a login page in my browser test, instead it showed:

signal=green
profile=5

and it changed the BlueIris profile to what was configured in slot #5.

All is well now and I no longer have to worry about providing WAN access for the SmartThings hub as well as a SSL certificate that the SmartThings ecosystem will accept.

1 Like

I spent the last couple days researching this and it seems there is no API support for SHM triggers. You can use smartapps to control the away/stay/off modes of SHM, but can’t subscribe to SHM’s alerts in order to execute some other code. If anyone knows what to subscribe to, it’s an easy addition to my smartapp.

It’s interesting your alarm isn’t being listed. As long has it’s DTH has “capability.alarm” it should show up to be selected. Anyone else have any issues here? I don’t have one to test with.

You can hook into SHM and get status changes.
I’m doing it in BigTalker.

subscribe(location, "alarmSystemStatus", onSHMEvent)
//BEGIN HANDLE SHM
def onSHMEvent(evt){
   if (evt.value == "away") {Do stuff}
   if (evt.value == "stay") {Do stuff}
   if (evt.value == "off") {Do stuff}
}

EDIT: I went back and read the post from who you replied to @automaton82. It seems they are wanting BlueIris motion to trigger an SHM alarm. One way to do this might be install a simulated motion sensor (from the IDE), then add that motion to your desired SHM alarm group (away, stay), then a BlueIris SmartApp would need to allow selection of the simulated motion to trigger on actual camera motion and finally call thesimulatedmotion.active() function which would cause SHM to activate an alarm condition. Sometime later the SmartApp would need to call thesimulatedmotion.inactive() to reset the state of the simulated motion back to inactive. (pseudo code, I’ve not tried any of this)

1 Like

@JMZ Question for you, does you app have the ability to change profiles separate from ST modes? Meaning is there a way to change the profile without tying it to a mode? If not can it be built in?

What would you want to use as a condition or trigger to change the profile?

Well I’m not sure what is requested now :slightly_smiling_face:, I thought @automaton82 wanted to have SHM alarm status (intrusion detected) to trigger BI cameras to record, which prompted me to write:

I actually was using your Big Talker app (awesome btw!) as an example until I realized it was just using the off/stay/away SMH modes and not alarm/intrusion triggers.

If you right about @automaton82’s request though, and I’m with you now, I have a similar set up to what you describe running on all my cameras:

I use a virtual motion/switch device type in SmartThings for each camera:

In IFTTT I use a maker channel, and the Alerts function in Blue Iris sends GET commands ("Alerts - Website) to the IFTTT applets. So I have an applet for motion on and a separate for motion off, which turn the simulated switch/motion device on and off. SHM monitors the motion of the devices. It’s been solid for 1.5 years. You do have to really tighten the motion detection settings in BI to not get a ton of false alarms.

The only way I know to get the actual camera motion trigger from Blue Iris is through the Alerts - Website GET/PUSH commands I use for my IFTTT Maker channel. I didn’t go with something like you described in the BI Fusion app because it added a lot of complexity (open up the smartapp to receive GET commands from BI, need OAuth, etc.) and a virtual motion device in ST tied to a camera’s motion detection is a device type handler problem, not a smartapp function. There are a couple smart apps and webcore pistons that do this so you don’t have to stick IFTTT in the middle. It makes more sense to me to keep the Camera “Devices” in Smartthings to run separately from the app designed to change BI modes and trigger recording. This way you have each camera as a motion sensor that can be used for anything in Smartthings and not require continual growth of one app.

A switch would be perfect