Blue Iris - profile trigger

spent hours trying to get this going and still no luck.

blue iris app in smartthigns is detecting away day but not my home day routine.

10:36:24 AM: debug BI_modeChange detected. heat
10:36:07 AM: debug BI_Found profile 4
10:36:07 AM: debug BI_modeChange matched to Away Day
10:36:07 AM: debug BI_modeChange detected. Away Day

i ran home day routine after this which changes mode to home day and is setup in blue iris smartapp - but it never detects the change. it’s like the home day mode is buggy… .

it is doing this weird thing where when changing to home day - it says the below:

10:38:24 AM: debug BI_modeChange detected. heat
10:38:20 AM: debug BI_modeChange detected. heat
10:36:24 AM: debug BI_modeChange detected. heat

no idea what heat is… i have no mode called heat.

heat looks like its subscribed to some sort of ac unit instead of your ST
modes. To be honest, I havent messed with the app in some time. I want to
one day redo it to take advantage of ST newer coding commands.

I recently moved and am having some problems getting my security cameras to
be reliable in BI, and the BI android app is pretty buggy lately, but after
that, I’ll make a new smartapp.

yeh I do have an ac unit.

I am now redoing all my modes and applying them. there is no mode called heat but i did use thermostat mode director so that could have caused it…

what trouble you having with BI specifically? i’m sure you know the system well

any idea how I might be able to remove it’s subscription to heat for home day? I created a whole new mode today called Home DayTime and it’s still calling it “heat” and catches it multiple times.

4:08:15 PM: debug BI_modeChange detected. heat
4:08:14 PM: debug BI_modeChange detected. heat
4:05:06 PM: debug BI_modeChange detected. heat
4:04:53 PM: debug BI_Found profile 4
4:04:53 PM: debug BI_modeChange matched to Away Day
4:04:53 PM: debug BI_modeChange detected. Away Day

was going to email smartthings support to see if they can tell what “heat” is. but not sure if they’ll be helpful as it’s a custom app. i have deleted the app, reset smartthings and re set it up. but no dice

EDIT: I have tried using a completely different name for that home day profile as when i created a new one i called it “Home DayTime” - still had home in the name so maybe that is causing the re subscribe to the weird heat mode. I entered Present DayTime as the name instead…

it seemed to work with one routine manually run test in changing the mode to Present DayTime.

but i’ve just done it again and it hasn’t picked up by blue iris profile trigger. It’s not showing anything at all in the logs. so weird.

JPARK40, did you say yours works on the LAN?

Yes.

It’s been working perfectly without a single failure so far.

jpark40, I’m trying to get your app set up and it doesn’t work for me. Couple questions to see if my setup is correct:

  1. what do you have in Blue Iris’ Websever setting for authentication? I have “Non-Lan only”.
  2. should I type in ‘http://’ in the server when setting up your app in smartthings, or just the IP address by itself?

Thanks for your help. I’d really like to get this to work locally!

I have authentication as always so I have my login info entered in the settings.

You don’t need http, only the IP address.

Shoot, that’s what I have and still doesn’t work. When I look at the BI log, it shows the server connected to the IP for my hub, so it’s receiving the connection, it just won’t change the profile. When I type the whole path out in chrome (http://ip:port//admin?profile=2…) it takes me to the log in page but I still have to log in. Once I do, it just goes to admin?profile=2 in the address bar and nothing loads and nothing changes in BI. I’m not smart at all on GET or other HTTP stuff other than some simple hacks on smartthings code, so I’m probably saying some of this wrong.

Two more thoughts for you:

  1. are you using stunnel for https? (I am, but it’s running only for non-lan connections, and I’m using the normal lan IP and Port. Also, I turned it all off and tried it but still didn’t work)

  2. Are you using the default BI webserver files or bp2008’s UI2 version of them? I changed mine to the latter, so maybe that is the issue.

Just to run this to ground, I’m using BI version 4.4.6.2. I appreciate the help, I’d really like to get this function running locally so I can do some other network config changes.

  1. No stunnel for https, LAN only.
  2. Yes, default web UI.

The http command should include user/pass in the command.

http://ip:port/admin?profile=2&user=biUser&pw=biPass

Where biUser and biPass are your username/passowrd. If that doesn’t work then it’s probably related to UI2.

I’m getting closer! I reinstalled BI to get the default web UI back, and now when I type in the whole command line in a browser it’ll actually change the profile, but I have to sign in first, then when I sign it it actually changes it. I know it isn’t the same in a browser, but it didn’t do that before.

Yup, the http command has the user/pass in it, I just got tired of typing so I put in the ‘…’ :slight_smile:

The app still isn’t working though. I recopied the code into the api to make sure I didn’t mess up anything, and I ensured the IP, port, username, and password are all correct in the app. I have the same settings as you (the ones I asked about anyway). So I know I’m close here, when I change modes from my phone and watch the computer, I actually get the mouse to go to the spinning blue circle for an instant when BI is receiving the command. The BI status window logs a server connection to my smartthings hub IP address too. But it doesn’t log a login or a logout, like it does when I login from the website or BI iOS app. Any thoughts?

Do you have “Secure only” disabled in Blue Iris Web Server setting?

I did not, and looking at the original trigger app from Luma I see that app required it deselected as well. I tried it out, and still no luck. I’m just going to let it rest at this point. Almost a month of going back and forth with it is enough. I really appreciate your help though, thank you for sticking with me. My mod’d version of Tony’s app works great, so I’ll just roll with that despite it being stuck over WAN (the only thing I wanted to do was get the hub to send local commands so I could push my whole BI setup to connect via VPN, to make it more secure out on the web when I access it remotely. I don’t think there is a way for the smartthings cloud to connect to the BI server if I put it behind a VPN, so I was trying to get it to send local commands instead).

So has anyone figured out how fix the “0” not triggering inactive status? Pretty important feature for me. Thanks! After further testing, “0” should work and does when I send the command directly in a browser. It just doesn’t seem to want to work in the integrator.

After messing with the code and ultimately readding the original code, “0” now works to make BlueIris inactive. No explanation as to why it works now.

This is perfect… I’ve been looking for this and it works perfect at my house. I do not expose anything through my firewall, so no WAN address. When I connect remotely from my mobile, I first use OpenVPN, then open up Blue Iris mobile and it always connects on LAN address.

That means I also could not use geofence in Blue Iris because it requires a WAN.

This solved everything and is working flawlessly so far.

I setup my profiles, installed this SmartApp, put in my LAN address and username/password, set my mode mappings to profiles, and it’s worked every time tonight.

Awesome!

1 Like

I got it to work!!! No idea what happened. I changed the BI user name to a different account randomly, and everything works. Either way, thanks for all the help! I have your method integrated into my Blue Iris Fusion app, it combines profile integration and camera triggering, and has the option to work locally via the hubaction or externally via json interface. It’s on a different thread:

https://community.smartthings.com/t/release-blue-iris-fusion-integrate-smartthings-and-blue-iris/54226

1 Like

I know what happened finally. “Secure Only” must be unchecked in Blue Iris’ Webserver Settings. I tried that earlier:[quote=“jpark40, post:91, topic:17522, full:true”]
Do you have “Secure only” disabled in Blue Iris Web Server setting?
[/quote]

Not sure why it didn’t work then, I think I had a bad install on top of this setting. Thought others might want to know.

I’m curious if your code can enable ST to ingest alarms from Blue Iris.

In other words, if my Blue Iris front door camera is triggered (because it sensed motion), can I get ST to play barking sounds from my Sonos speaker?

Not the Blue Iris Fusion code, but the best way I’ve found to do what you want is a IFTTT integration and a virtual motion sensor/switch device. Its discussed a lot in the thread, starting at post:

Just keep reading down from there, and check out this thread:

Post 8 in that thread has a link to my virtual device code. Set that up and every time your camera detects motion the virtual motion sensor in Smartthings will go off, and you can use that motion trigger to whatever you want!

1 Like