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

That’s it, and the version mine is using is directly uploaded to Github, so they are the same. When you go to https://github.com/flyjmz/jmzSmartThings/tree/master/smartapps/flyjmz/blue-iris-fusion.src, to the right of the file name it should say “typo fixed” (that’s my comment when I uploaded). You could try copying the code from there into the smartthings app directly and skip the github integration piece, but that shouldn’t matter.

Anyone else getting the null pointer exception?

Yea i am doing that. Odd.

I just uninstalled both and re-added them. same error each time.

error java.lang.NullPointerException: Cannot get property ‘localOnly’ on null object @ line 125

You’re seeing this error in the Live Logging section of the API, right? It is odd that you’re getting it at line 125 still. It should be line 126 after you updated your code.

Is that from the parent or child app? I can post that line for you.

Here’s from the child app
if (parent.localOjnly) localTrigger()

The odd thing is it’s only happening when I click the trigger item and the error logs are only showing for the child camera that I’m using.

Alright, let’s get on the same page. [quote=“BBoy486, post:45, topic:54226, full:true”]
I just copied and pasted the code from post #1.

Maybe the repo is wrong?Is this your github repo: flyjmz/jmzSmartThings (master)
[/quote]

The code in post #1 is simply a link to Github, so there isn’t a difference between it and the repo (the repo IS github).

I think I know where this may go, you said:

You shouldn’t be “installing” both. You need to have both the “Blue Iris Fusion” and “Blue Iris Fusion - Triggers” code as separate smartapps in the API, and when you go to install the smartapps on your phone it’ll list them both separately, but only install the parent app, “Blue Iris Fusion.” When you click “Add Camera Trigger” at the top of that parent app, it is actually installing the child app. That’s how parent/child apps work. If you install the child separately, it won’t have a parent app to connect through, and you’ll have all the troubles you’ve described.

I think the line 125 error is from the child app, that’d explain why the line number didn’t change in the error. Line 125 of the child app pulls the parent app’s value for localOnly, if you’ve installed the apps incorrectly it won’t have a parent to get the value from.

To confirm this, when you look at the “Live Logging” section in the API, you should see multiple apps for this. One is called “Blue Iris Fusion” and that is the parent app. Then there should be another app listed for each trigger iteration you’ve created, and are named whatever you named them.

That should solve it. Uninstall the separate child apps you have, install the parent, and set it up inside there. You said you didn’t care for the profile integration part, just leave those inputs blank on the bottom.

So I installed both Smart Apps, but I did install the child app under SmartApps > More > BI Trigger. That explains it!

I just did that and the logs show no error. I am not getting the cameras to take a picture nor the BI Fusion to send me a push notification but ill start fresh and attempt to troubleshoot.

I must admit, I’m extremely confused. So you previously installed it incorrectly, but now you fixed it and only installed the parent app (and add triggers within the parent)?

Now that it sounds like the install is correct, as long as your webserver and user settings are correct, any issue you have would be on the Blue Iris settings side.

It doesn’t not send notifications for triggers, only profile changes (and actually only when externally controlled, there is no local feedback so I can’t make it say whether it changed the profile or not). The debug lines in live logging will show, but that is it for now (it’s on my to do list to add). My Super Notifier App is a great notification tool if you want: [OBSOLETE] Super Notifier - All your alerts in one place!

I must admit that the labeling is what is throwing me. I assumed the notifications (which I did set-up) would be for any trigger event in the app. But now I knows it for profile changes.

I am using the SN app and love it!

My last question is how does your app work when the cameras have different UN and PW within BI? Are you just passing access to BI and then the command goes on within that app?

There should be a note in the app that explains what notifications are sent, I’ll double check, but it is confusing I agree.

The camera’s username and password are only so BI can access them. Once you log into BI with your username and password you have access to any camera that username has access to within BI. All the recording, etc is simply a BI function, the camera only provides the video, once BI receives the video, the camera is irrelevant.

1 Like

Makes sense. I’ll mess around with it some more. The cameras aren’t triggering even though I see the trigger event in the logs. Thanks for all your help.

I am having some trouble with this. I don’t get the function to add triggers if I do not publish the child app. Even when I do, I have not seen evidence that it works for me. Should this trigger an alert and record it as if the camera saw motion?

EDIT
I have notifications turned on and it says “Could not trigger Blue Iris”

EDIT AGAIN:
Instead of deleting this post I will confess my error. I did not include “http://” before the external ip address. The instructions are clearly there…

I am all up and running!

One feature request, can you add groups to this app, so instead of having to have separate trigger items all of these sensors can trip these group of cameras?

You still have to add and publish both the parent and child apps in the
API, it’s just when you go to actually install the app on your phone, only
install the parent app, “Blue Iris Fusion.”

It sends a trigger to the camera (you’ll see it in the log as an 'external’
trigger), so the the camera will behave as it would if it were triggered
normally. (So whatever record settings you have set up in Blue Iris).

I test it by using a light switch next to the computer I have Blue Iris on
as a trigger. I set up the app, open Blue Iris, then turn on the switch. I
look at the log and the camera view. Should see the log in, the external
trigger, and the camera should show recording.

Biggest issues are not having the IP and port entered correctly, and if
you’re using local, make sure you’ve deselected “Secure Only” in the Blue
Iris web server settings.

Nice! That is a good idea! I’ll have to think on that, it may not be
cosmic. You could try creating a group in Blue Iris, and use that group
name as the camera name in the smart app. No idea if that works, but it’d
be simple to test and implement.

1 Like

I was not putting http:// in front of the external address. Works great and thank you for writing it. I will learn a lot by reading through the code.

Let me ask you this. Is it possible to make a “virtual” device in ST? In other words, could a camera be defined which runs the code that does the trigger so that they could be added into SHM or triggered otherwise “as cameras”?

Considering that Stunnel will only allow it to connect via https, I think we’re safe. Did you change yours back to local now? How is it working giving the settings I mentioned?

I’d have to say, mine is working like a champ. I have no issues with this setup… working well, thank you. I seem to remember in another post, someone claiming this was impossible, glad it isn’t the case. BI’s geofence sucked, particularly with multiple phones on android and ios.

Great work creating this Blue Iris configuration. I was able to set it up and confirm it works correctly. One note, however, is that I don’t receive push notifications, although I have it marked as “yes,” when a trigger occurs. Just an FYI…doesn’t change the value I get out of the work done.

You sure can! Have Blue Iris’ Alerts set for each camera to trigger a virtual switch/motion sensor via IFTTT. When BI detects motion, it uses IFTTT to “turn on” the motion sensor, and you can use SHM or any alert app you want. Here’s a thread describing how to set it up, and I have a post in there with a link to my virtual device code:

If I can figure out feedback locally (probably some roundabout way of local control from smartthings to BI but then externally from BI to smartthings) we’ll get this sorted further…

1 Like