SmartThings Community

[RELEASE] Blue Iris Device Handler

Blue Iris Device Handler!

To my knowledge this is the only device type handler for Blue Iris. This creates a “Blue Iris Server” Device as one of your things in SmartThings, enabling 2-way communication between the Blue Iris Server (running on your computer) and your SmartThings hub.

If you’re unfamiliar with Blue Iris (BI):
Blue Iris is an outstanding Video Security/Capture NVR (Network Video Recorder) program that works with virtually every IP camera out there, creating a web server that manages them all and monitors them for motion, triggering recording. Big shout out to Ken, the program is great and his support is outstanding.

Device Handler Features:

  • Local Connection 2-way comms between BI and ST
  • Fast on-demand Profile switching, both hold and temporary
  • Traffic Light switching
  • Blue Iris server health and online status checking

I am working on a Service Manager helper smartapp for it, which will enable:

  • Push/SMS Notifications
  • Automated Blue Iris <-> SmartThings Profile/Mode Integration (just like my BI Fusion app)
  • Camera Triggering based on SmartThings events (just like my BI Fusion app)
  • HOPEFULLY a simple, clean Blue Iris Camera Device Type creation for receiving Camera Motion Triggers as SmartThings Motion Sensors (methods exist, but no clean or easy. See “Can I use it to trigger SmartThings actions when the camera detects motion (e.g. to trigger a light to turn on)?” at the link above )

Device Handler Specifics:

  • The “Sync BI to ST” tile changes your Blue Iris profile to match your SmartThings mode.
  • The tile labels mirror the actual profile name, not just the number. (but due to SmartThings limitations I can’t center them or change the color)
  • Inactive is BI profile 0, handled differently in BI so it looks different here, but you can turn it on and off like the other profiles
  • The Hold/Temporary tile switches between making a hold change or a temporary change to your profile. Hold changes will persist until changed again, even through computer restarts, etc. Temporary will last as long as you have temporary profiles set to run within BI’s settings, then revert to the BI scheduled profile.
  • The big tile at the top left is the current profile, now action assigned, just big so you can see it.
  • The traffic light cycles you through the BI traffic light. (Green = recording enabled)
  • Refresh just pulls the current status just like any other device.
  • It polls your server every 15 minutes (and obviously updates everything whenever you execute a change.
  • It returns errors as device messages only… Device Type Handlers apparently cannot send notifications, which is a big reason I’m holding off on the new thread to release this until I have the helper app to send them.
    *** It checks for profiles or traffic lights not changed correctly, bad server responses, and whether the server is even online (a separate check because if it is offline it’ll simply return nothing and you won’t know the status).

To Install:

  1. Add DTH to your API via repository update or copy/paste code
    a. Repository Settings: Owner: flyjmz, Name: jmzSmartThings, Branch: master
    b. Link to Code:
  2. Create a new device from within the API, selecting the “Blue Iris Server” DTH
    a. Set the name
    b. Just use “TemporaryID” or something for Device Network ID, the app will change it to the correct ID upon initialization
    c. Select your hub/location/published
  3. Open the SmartThings app on your phone, select your new device, and tap the gear icon to update your settings
    a. Make sure your IP address and port are entered correctly. Example: and 8000
    b. Unlike BI Fusion, you have to manually type your SmartThings Mode names for the Blue Iris Profile they match (it’s a device type limitation, another reason for the Service Manager app)
    c. Select whether you want debugging on and/or change the server response timeout threshold.
  4. Once you select done, hit the refresh button, and the device will initialize and update the labels and status. If it doesn’t, check your settings again, and watch the debug messages in the API’s Live Logging (it’ll help me help you!)

This is largely based of my BI Fusion App:

If you like BI Fusion, you’ll definitely this Device Type. Stay tuned for BI Fusion 2.0, which will work with this device type!

Please post questions, comments, ideas, ways to fix the todo’s and questions in my code. If it works for you, please like the post :wink: so others know how great it is! Hope this makes your Smart Home closer to the way it should be and a little easier to work with!

14Oct17 - v1.01 released. Accidentally reintroduced a bug I found in testing. Once you install v1.01, just hit refresh and it’ll update everything.


Sorry folks, I had I accidentally reintroduced where the network ID doesn’t get updated properly just before starting this thread. Please update your DTH, the repository/github has corrected v1.01 in it now.

The bug was that it doesn’t properly update the network ID from the updated() execution. It seems it must be run afterward. So once you enter your settings in the app, just hit refresh now in v1.01 and it’ll update everything.

Thank you for all your work here, I have it working with my BI. One question though, I have mine on 24/7 recording so my BI profile does not change, so I assume there is really nothing to put in the profile names for smartthings because the profile never changes? Really awesome work though, going to see if i can do some of your motion sensors for cameras next

Good work jmz once again.

Yup! It defaults to naming them 'Profile 1/2…" so you can just leave it blank. I’ll update the directions in the setup so it’s more obvious.

If we have your other apps do we leave them installed? Will they all be merged at some point?

I get the profile changing but what is the limitation of having the cameras in Smartthings? Similar to Arlo.

Yes. They can be used separately right now if you want, but leave them installed. I’m working diligently to make the major changes not effect your current setup, even after you update the code. So the device type and smartapp will still be able to be uses separately/independently, but if you integrate them the way it’ll be intended, all your settings will still be there for you. You’ll always have to have separate DTH and Smartapps installed on your API, but you’ll only have to perform setup actions in the smartapp on your phone, and it’ll update the device type.

The Device type handler is handling all the interactions using basic html, so we could very quickly be limited depending on what information is included in those messages. I’m pretty confident motion alerts will work, but if you’re asking about video, there is a good chance it’s a bridge too far. The difference is that the Blue Iris server is just one address with all the information. With all the other camera types I’ve seen, you connect to each camera individually. So with BI we have just one IP address that we need to be able to separate all the information from, and whereas if we connected to each camera independently we have a different address for each camera. I think it’ll still work, it is just much more complicated this way. It’s for a purpose to. Limiting contact to IP cameras helps with security. That’s a huge bonus with Blue Iris, the cameras only connect to Blue Iris, and it then talks to everything else. So you’re not dependent on the crappy firmware more IP cameras have for security.

1 Like

So my question is if a user had Dynamic DNS setup could you not have the Dynamic DNS tunnel into the server and then set up each individual camera IP individually?

That is essentially how IP cam does it.

You still have one for ventre but then once you’re in the network you can pull up the feed on each camera.

You can connect to each camera individually ignoring the BI Server login, which is not what I’m going for. I’m pretty positive I’ll be able to make it work the way I’m hoping for, I just need to get the testing setup.

Last night I finished updated BI Fusion to install the Blue Iris Server Device Handler, and the two to work back and forth, so a little code cleanup to do then I’ll start on a camera device that will act like a motion sensor.

If that works out well, I’ll publish it and then take a look at video. I’ve read a lot about it. It’s not too complex, but its a big add to this setup. Especially with how good the Blue Iris app is for handling the video already, it’s lowest on the todo list for this. That app lets you go back and watch recordings, etc. This will only ever let you view live and record snapshots on triggers (…SmartThings limits, not mine). So to enable all the features you need you’d still want to use their app.

1 Like

I mainly want to be able to see the live stream or alerts. I can use the main app for everything else.

1 Like

And have it work with the SmartThings security

1 Like

It’s here! Ended up going with OAuth for motion sensing to get this out now instead of continued late-nights trying to get the method I want to work. But I got some good info recently so I’m hopeful.

I’m getting the following error when I try to add the two SmartApps using update from Github Repo method (no previous version installed). I’ve tried logging out and back in of both IDE and the Smarthings App. The device handlers pull in from the Repo just fine, but not the apps. Any ideas?

Oh No! Something Went Wrong!
500: Internal Server Error
Reference Id
Sun Dec 03 22:38:25 UTC 2017

Thank you,

I’ve been getting a weird error when I upload changes too, but they always
upload fine (I upload from the IDE into Githib when I change things), so
something happened in the last week. It could be you, me, or SmartThings, I
don’t know which. Are the apps not updating to the new version (just open
them up and look at the version number and history, it’s in the top section
of code)?

I ended up installing from the raw code the 3.05 beta version and it seems to work haven’t fully configured/tested yet though. thanks for the reply and the app!

I got that same error when I tried to install both smartapps at the same time. Figured out that if I do the server first, then the camera, they both worked!

Interesting, thanks for the tip!

My BI Server does not seem to stay synced with Smartthings. If I hit the SYNC BI button in the device handler it will update the profile although will not change automatically as my smartthings mode changes Any ideas?

Are you using just the device handler or the full BI Fusion smartapp (that includes the handler)? For just the device handler, there is a setting called “Auto Sync BI Profile to ST Mode?” that you need to turn on. If that is already on and it isn’t auto syncing, let me know.

If you’re just using the device handler, I’d encourage you to upgrade to BI Fusion, it gives you the same capability plus a lot more:

Thanks for the info. While going through the installation i seem to be getting an unexpected error when installing the cameras through the smart app installation. Any ideas?