SmartThings Community

[DEPRECATED] [RELEASE] Blue Iris Fusion - Integrate SmartThings and Blue Iris!

smartapp_cameras
smartapp_security
project_cameras
(David P.) #136

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
(David P.) #137

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

(Socbrian) #138

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

(Brian S. Lowrance) #139

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
#140

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.

(Brian S. Lowrance) #141

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
(Jason) #142

@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?

#143

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

#144

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.

(Jason) #145

A switch would be perfect

#146

It can be done without IFTTT, look at Blue Iris camera trigger from smart things

Sorry, I’m in a hurry, the link above he made it so smartthings would trigger BI to record a particular camera, I edited it so a motion detection in smartthings would allow me to set a particular PTZ preset for a camera.
To make a camera in BI work as a smartthings motion detector, look at Blue Iris motion detection to activate smart app or [WITHDRAWN] Camera HTTP Motion Endpoint . So, if your system was already in an armed mode, a motion detection would indeed alert you and could also be told to turn on a light, all depends on what you want for your circumstance. Maybe I’m not following your needs?

#147

Thanks @blazenmp! Those were the posts I’ve been trying to find. I’ve been PM’ing @jasonrwise77 to come up with a solution for him. I’ll post what we come up with.

(Sean) #148

First of all big thanks to jmz and to rayzurbock
I am still new to all this, i have be working on this all of yesterday on how to connect BI to smartthings and made a very quick write up to save the next person alot of time reading all the comments. Its really pour English but here it is.

1)log in to smartthings
2)go to My Smartapp
3)add new smartapp
4)choose from code
go to Parent App:
https://github.com/flyjmz/jmzSmartThings/tree/master/smartapps/flyjmz/blue-iris-fusion.src765
copy and paste
save then publish
then add another smartapp (child app)


5)Next go into BlueIris software and click on the opitons (gear on the top left)
BlueIris > Settings > User click Add button make sure to put a user and password you will need it for the next step and check the admin box
6)Next BlueIris > Settings > Web server click Advanced button
change the Require From: down Menu from all connections to Non-LAN only and then uncheck “Use secure session keys and login page”
also copy down the Local, internal (LAN) access ip address and server port you will need it in the next step
7)then go into your smartapp on your phone
market place => my apps
click on blue iris fusion
Click Local connections
Enter in the ip form BI web server tab without http:// (eg.192.168.0.100)
enter port number (eg.81)
enter the User and password Casse sensitive
click receive profile change notifications? to yes or no
click done
8)Click Automation tab => Blue Iris => add camera trigger
Camera name is Casse sensitive and is the short name found by right clicking on the camera => settings => General
then select an action and name it and you should be good to go

i could have mist something because i have been going back and forth so hope this helps

1 Like
(Sean) #149

also i think you have to use OAuth when settiong up the parent app but not 100% sure

#150

Can this work the other way? When the camera detects motion trigger a light to turn on?

#151

Nope, it only transmits to BI, it doesn’t receive. You have some good options though:

  • Check out Post #139 above for how I do it (virtual motion sensor for each camera, linked via IFTTT maker channel).

Or: Use a purpose-built smart app that “listens” for BI motion alerts:

I ultimately used the IFTTT option because every time you open the settings on one of those smartapps the web address regenerates, forcing you to retype it into Blue Iris, which was awful. I think if you did it via webcore it’d be a lot simpler, especially because you can just copy and paste from the browser to Blue Iris, and because you may be able to modify the webcore piston without it changing the address. I’ve seen posts in these threads about having webcore handle it (it could even do what Fusion does just fine), but haven’t tried it myself.

2 Likes
(Sean) #152

If you use the first link posted by JMZ that’s the one I did. I was using iOS and couldn’t copy and paste and the code changes every time you touch the link. So I created the http endpoint then went into the automation tab clicked on the http motion endpoint => next tab and it shows the code that has been set and you don’t have to rush.

(Jbeck22) #153

so I have just downloaded BI and I can see my cameras on my screen (laptop for now). I can access them using my local LAN IP and port number. I can see that BI is detecting motion b/c it is recording clips, but ST isn’t sending me the notifications or doing anything.

I followed the steps outlined here but still nothing.

Any ideas? Thank you!

(Sean) #154

I had the same problem until I went in to the advances tab and changed to Non LAN. Because BI is asking for a password when ST is sending a command. Let me know if this helps. Also when if you watch live view in the smartthings IDE it will send a command that has your IP address of BI fallows by a user pass all in one line. If u take that and past it in to a web browser it should send the command to BI but if it pops up with a user password then BI is blocking smartthings. Hope this helps

Sean’s iPhone

#155

To be clear, the BI Fusion app does not receive motion alerts from Blue Iris, it is for changing the Blue Iris profile and for triggering cameras to record when SmartThings motion/contact/etc activates.

If you are trying to get notifications from BI, then use one of the methods in this post #151 above: