Blue Iris - profile trigger

Nice! I’ll try that out today hopefully.

I changed the password input type to “password” so now it’s at least encrypted within the app and cloud, works great still.

Question though - it makes a temporary profile change in BI. If the command was sent twice it’d make it a “hold” change (so that it’d stay in the profile until something changed it again, instead of just going back to the scheduled profile at the end of the temp period). It can log out in between or stay logged in, it just needs the effect of being clicked on twice on the web UI. I’m not a programmer, so my idea was just to do a loop with the command inside, but you’ve set it up really well with a lot of error checking, etc., so is there a good place to loop or should I just make it loop everything inside the the try() iteration of takeAction()? Or is there a more elegant way? I could make a preferences input on whether the user wants a temp or hold change, and have it run in an if() on that too. Then people could do what they want. What do you think?

There is a setting in Blue Iris that disables temporary profile changes. It might be the “ignore schedule” setting. This is how I have it set up.

Hey Tony. This is still annoying me. Blue Iris is accessed remotely fine. I put the blue Iris directly into my router rather than the network switch. It still works sometimes.

What’s the url I could test the connection with that mimmicks what the code does to get more info?

I might re setup my router. Or even blue Iris server.

If you look in the blue iris help, there is a section on the JSON Api. Those are the URLs and parameters. You can use a program like PAW to make a collection of test calls. Or the browser, but there are a few calls just to get logged in.

1 Like

I see the Enable checkbox in the Schedule tab, which enables or disables scheduling. I had that off originally, but when the temp profile timed out it’d go to “Profile: None” in the log. But I went with a simpler solution - BI apparently lets you put very large numbers in the temp time for each profile, so I left the schedule enabled (I have Away scheduled for all the time, so if it ever does time out it’ll just go to Away), but I doubt that’ll ever happen. You can set a couple weeks in the temp time at least…you’d have to not have a profile change in Smartthings for that long before BI would go back to the schedule (or none if it is disabled). Thanks for the help! You app is amazing by the way. Works great and makes BI/Smartthings integration simple.

Tony, I guess this is beyond me. Can you please elaborate? The letsencrypt site directs you to run the certbot client, but I don’t understand which options to choose (BI runs on Windows, and what type of webserver is it?). If not using certbot, where do I go to setup the cert? Finally, once I figure out the cert, what does the stunnel config look like? The link for adding it isn’t very clear. Right now my stunnel.conf file only says:

[blue-iris]
accept = 1234
connect = 4321
cert = stunnel.pem

Do I just download the cert and change the cert line to direct to the new one, and add the key line? What should the config file look like? (I changed the port numbers above obviously)

EDIT: I figured it out! Here’s the skinny for anyone else wanting to set this up for HTTPS (which works awesome btw, thanks Tony!)

  1. Have your ddns service account at a level that supports making txt records on your hostname (e.g. noip.com’s Plus service).

  2. Set up certificate at zerossl.com (one of Let’s Encrypt’s clients) using their online tool. Follow their steps, entering your domain (e.g. mydomain.ddns.net) and then generating the CSR. Then generate the key (save both of these files to make renewals simpler…no way to make this automatic with zerossl, so if someone else uses a different client, like one for windows, that does auto-renew, please let me know). For the verification step, use DNS verification, and follow their instructions to add the txt record to your hostname. After waiting the 15-30 minutes, and completing verification, download the domain-crt.txt and domain-key.txt files. Go back to your ddns account and delete the verification txt records.

  3. Finish stunnel setup: open stunnel.pem, delete everything, then copy in the domain-key.txt file contents, then the domain-crt.txt file contents below that. Save it, and reload configuration in stunnel. You’re done!

If anyone has any better way to do this, please reply so I can fix mine too. Hope this helps.

Cant seem to get this to set inactive on my BI. It will set 1-7 for any mode, but not inactive.

Sorry, it was only developed with the numbered services in mind. You can do trial and error on how to set inactive via the json api, and then copy what you find out into the app script.

Instructions say to use 0 for inactive.

Messages sent are strictly the opinion of my iPhone!

Ah, so they do. I havent tested that. What does it do?

are you planning on implementing changing of profiles in your app also? lan only with no auth would be more stable for myself - i have spent hours trying to get mine to constantly change the profile (via auth https) but gotten no where. works only sometimes. Blue iris support can’t help more either

Is your router reliably forwarding the port to the BI server? Is your bi server set up with a static LAN IP?

yep and yep. :slight_smile: can access it fine from outside the LAN

Unfortunately nothing for me. I have Away and Night Stay set to profile 1. I set Home and Night set to 0, hoping to set to inactive (per instructions). When I set mode to away it changes to 1 with no issue. When I set to mode to home it does nothing.

Alternatively I thought, ok set profile 2 to not trigger or record. Set home and night to profile 2. BI still seems to want to save clips of movement. :frowning:

Messages sent are strictly the opinion of my iPhone!

I have been completely unable to get what I had to change profiles only via the LAN. I also cannot get it to work via https (stunnel) over the WAN and I’m not going to open it up to http logins to let it work. I did get the PTZ to work directly over the LAN, so I can’t see why I can’t get it to change profiles via the LAN.

My code does not work over the lan. At the time it was written smartthings did not support good command/response http calls over the lan…you could send out commands but all responses would come back to one function with no association to the original command. This probably works for things like ptz where you dont care about the response. Things might have changed and it might be better now, but this code only works over WAN.

1 Like

I have a theory as to why I’m having issues. Just checked my laptops stats that is running blue iris. It’s pretty much maxed out on cpu usage all the time. I have 3 720p camera running and two 1080. That could be why it’s dropping commands.

What CPU does it have? Just curious

Core i7. With 500 go ssd and only 8gb ram.

Hmm, there are varying powers of i7, but I’m curious whether it’s that or the RAM. There are also a lot of settings in Bi that can lower usage, but mine never gets above 40, with the same # of cams