[OBSOLETE] BI Fusion v3.0 - Adds: Blue Iris Device Type Handler, Blue Iris Camera DTH, Motion Sensing

It was the resolutions or at least the full image stream. When i changed the Video feed in Blue Iris to the SUB one which is lower quality it worked fine. So video is fully working!

Quick question. Everything seems to be working fine in my setup. I can see videos and Smartthings picks up on the motion. I keep getting the following error, but I’m not sure how to go about fixing it.

“Error! A Blue Iris Profile number was passed outside of the 0-7 range. Check settings.”

@JMZ just a heads up. I setup an external connection to my blue iris system and the cameras weren’t working. I checked out the device settings in my IDE and found that the URL had an HTTP:// after the @. Your settings say to put http/s when externally connecting, but its putting it before the hostname in the URL as well as before the login credentials. It works fine without supplying it. You should just remove that requirement in the settings. Thanks again for awesome work.

@JMZ now I am getting new errors, I am getting BI Failure, turn on debugging and check logs. I did that and dont’ see any errors, any ideas. Also, I still cannot save a device page when I make any changes.

Is the error you get when trying to save your changes something about “Device still in use?” @Jrfarrar is getting that error because he tried to rename the shortname of some of the cameras, but the device network ID is tied to that shortname and the app will treat it like a new device and remove the old one. So it’ll give you that error if other smartapps are still using the device. You can look in the IDE Devices tab to see what the shortname is set to, and match it in the preferences within the BI Fusion smartapp to at least get it to let you save the settings, then you can go in and make other changes. I have a couple ideas I’m working on to workaround the issue, if this afternoon goes well I will hopefully at least have a small patch that will let you create/rename devices without deleting the old (then you’ll just have to manually delete the old ones).

If that isn’t the error, shoot me a PM more details on what it says and we’ll figure it out. I get a http status 403 error from mine about once a day, but everything works fine despite it, just FYI.

That is super interesting because I didn’t change much in the external setup and before you needed it. I don’t see anywhere it is adding HTTP at all (which is why the app asks you to enter it). Do you mind sending me a screen shot of the logs (black out your user/password/etc) so I can see what it looks like? It’s a easy fix, and I appreciate your input. I’ll change it in the next update, I’m mostly just curious to see what it looks like.

Thanks again!

EDIT - Forgot to ask, are you using http or https? It is external right, not a local connection setup without the server DTH? Also, if you’re willing to share, I’m curious what your setup is like that you’re still using external instead of the server DTH. It’d help me understand better the other things people are doing (so I can make the app and my own setup better!)

Best guess is when you typed in the profile numbers for one of your modes, you accidentally have a space or something in addition to the number. Double check your setting so make sure it is just the number, e.g. “5” and nothing else. Let me know if that doesn’t do it, there are not a lot of ways for that error to come up because most settings are auto-generated.

I appreciate your efforts here but feel you have seriously underplayed the significance of:

“In Blue Iris’s Advanced Webserver settings, “Use Secure Session Keys and Login Page” must NOT be checked”

This is a huge deal, and a deal breaker for me. I would never lower my security, introduce a vulnerability for a little convenience.

I am curious why this is a requirement anyway? I was able to use the “Advanced Rest Client” plugin for chrome and perform logins using JSON to execute commands like a PTZ move or mode change without touching my webserver security settings.

It doesn’t lower security because the Blue Iris server only has to be on your local LAN, not port-forwarded or anything out to the internet. My recommendations in the setup FAQ are to run it local using the server device, then everything is conducted on your local LAN directly between your hub and the computer. The commands are sent securely via SmartThings. The only way this becomes a vulnerability is if some has access to your LAN and also has the means and knowledge to break through Blue Iris log in security (it is still using username/password, just not as strong as the new method that unchecking the setting turns off). If you’re using an external login, then I highly recommend you use a good VPN and/or SSL, which would then provide the necessary login security.

I’m not positive, but I think you might be able to leave it on if you use BI Fusion in external mode, which does use the JSON interface with Blue Iris.

Local mode cannot use the JSON because it’s literally the hub talking directly to your computer, and JSON isn’t supported by SmartThings using HubAction (or so I understand, I know some folks have talked about trying it so there may be a way to make it work, but it’s beyond my time constraints to re-write it all right now).

For Home, Night, and Away, I have it set to “1”.

Well thats weird then.

BUT, I just updated the BI Fusion smartapp and the Blue Iris Server DTH in github. Now that you just checked it and confirmed it’s a 1, I don’t think this is going to help, but I changed the error message to include what it is being passed, so it should say something like “Blue Iris Profile number was passed ‘X’” and whatever is between the two apostrophes is what the app is getting an error for, so update and let me know.

@Jrfarrar, the BI Fusion update fixes the renaming problem. Just open settings and try click ‘Done’ to let it try reinitialize everything. It runs a method that resets the deviceNetworkId to a new one that isn’t dependent on the shortname, so you can rename all you want and it’ll just update that device.

Also, I added an option to disable the auto-deletion of unused camera devices, which is what was preventing you from completing the setup after making changes. It could become ugly, so first try the above step to have it redo the DNIs. So hopefully you don’t have to use it, but if you turn it on you’ll at least be able to complete the changes and then be able to fix anything else.

Thanks. I will update. I don’t do anything else besides copy/paste the updated code in IDE for BI Fusion smartapp, Blue Iris Server DTH, and Blue Iris Camera DTH, right?

To make sure it is fully working, yes copy/paste the new code (make sure all 4 apps are up to date: Blue Iris Fusion, Blue Iris Fusion - Trigger, Blue Iris Server, and Blue Iris Camera), or you can use the Github repository settings so you just click a couple buttons and don’t have to go copy/paste everything.

But also go into the BI Fusion smartapp settings on your phone as if you were going to change something, and then just click ‘Done’ in the top right corner. This will make it reinitialize, and will ensure the code and all the changes are incorporated.

EDIT - Note, EVERYONE should make sure they do the second step to make sure the deviceNetworkIds update correctly.

Thanks to @jasonrwise77 for helping work through a Trigger app bug! v3.0.4 in github now.

Also, confirmed it is working in external mode (I wasn’t sure if it still was), so that is good to know for future updates as I try expand it out further.

1 Like

Hi JMZ,

I upgraded to the latest version and same issue. I checked all the entries for Home and there are no typo’s or extra spaces. I even deleted my ST automation task and recreated it. I’ve also completely removed BI Fusion and BI Server and re-added, same thing.
I’ve managed to work around it at the moment by having Home and Away mapped to profiles 2 and 3 instead, with Profile 3 just set with no triggers or recording in Blue Iris. This seems to work as expected so it looks like it might be something to do with the defaults of “Home” or maybe the Blue Iris “inactive” profile.

Paul

I installed the new code. The Profile number it says I’m passing is (-1). I only have Mode Away, Night, and Home set to “1”. And I left the other BI profiles as default.

I just reread your original post here; I didn’t realize use were using BI Inactive (0) tied to one of your ST modes, sorry it took me so long to understand. I found the problem, it was treating the ‘0’ as false in two lines of code, it is now fixed and updated in github. I put a Blue Iris Fusion app (just that one needs updating) on Github as a 3.0.5 BETA for now, let me know if that works. I’m going to try help out @vashwood before posting it as a real v3.0.5.

@vashwood, I’m scratching my head pretty hard here. I use profile “1” as well, the app prevents you from entering a negative number, and it doesn’t do any math or change it in anyway. So, can you go into the preferences, click the little grey ‘X’ next to were you have typed in “1” for your Home, change it to 2 or something, click “done” until you’re back to the main app, then go back in and change it back to “1”? Just want to reset the variable completely to make sure that isn’t it. Also, do you get that error when changing smartthings modes (so BI Fusion auto switches profiles), or just when changing it manually with the BI Server Device, or both? Lastly, so you have Away, Night, and Home all set to profile 1? Unclear from your last post, just want to make sure each mode has a different profile. It may or may not matter, but I didn’t have that in mind while coding (i.e. someone having multiple modes tied to the same profile). @Automated_House has it working with two modes on one profile though, so I guess it is working out. Please make the changes above, and if it isn’t working still, please send me a private message with the screenshots from your logs (with debug logging on obviously). I can’t figure out what is happening without seeing more detail.

Hi Jmz,

Thanks for the reply. I’m actually overseas at the moment and won’t get a
chance to test this until the new year.

Paul

So I just found this awesome app and attempted to set everything up.

I followed the instructions to the letter and the server shows up in SmartThings and so do the 6 cameras I set up.

However, I have seen a 401 error and a 302 error in the server device and none of my cameras will actually show the feed… so I’m not quite sure what I’m missing…

If I disable the “secure login” setting and restart my blue iris instance I would expect this to take effect immediately.

Is there anything special I should be checking for other than what’s shown in your instructions above?

It should work fine as long as your settings are all good and your phone is on the same network as the BI Server computer.

401 is an unauthorized status, so check the username/password again (be sure no trailing spaces or something from an iOS auto entry), and 302 is some kind of redirect issue. So that screams to me something about your IP being wrong. Please confirm your setup so I can help.

Are you using the Server Device? If so, make sure you just used the IP address for the computer your BI server is on (192.168.0.10 or something), and make sure you have the port as well (The checkbox and number at the top of the Blue Iris Settings > Webserver tab).

If not, and you’re using external, then the camera video won’t work… (for now anyway, unless you want to change the URL to not include the http:// part and potentially have integration not work)

I can’t think of other settings to check at the moment, so let’s start there.