Overriding profile with external trigger

General discussion about Blue Iris
Post Reply
strogg
Posts: 5
Joined: Thu Apr 16, 2020 3:20 am

Overriding profile with external trigger

Post by strogg »

Hi,

I am trying to figure out a way to manually set profiles using an external program. Basically, I want a certain profile to be set when I'm home, and a different profile to be set when I'm away. I already have code written up to determine such occurrences, but I cannot figure out how to tell Blue Iris to change the profile accordingly. I'm thinking macro? I'm not sure. Any help would be appreciated. Thanks in advance.
strogg
Posts: 5
Joined: Thu Apr 16, 2020 3:20 am

Re: Overriding profile with external trigger

Post by strogg »

I figured it out. It ended up requiring more effort than I was expecting, but it's not that bad.

Basically, I ping my phone on a regular basis over the LAN. If it responds, then it assumes I'm at home. If it doesn't, then it assumes I'm not. When that event changes, it will change the profile through the web service (I had to enable that) via API calls. Blue Iris is goofy. It takes two calls to log in before you can make the change with a third call.

For those who have trouble reading the manual (like I did), the first call is command is "cmd":"login" to get a session ID of some sort. The second call is also the command "cmd":"login" with the session ID and credentials hashed. That will validate the session. At that point, you can change the profile with the next call, then a fourth call to end the session. It would be a lot nicer to be able to do it with a single call, but oh well. For a software this cheap and with so much functionality, I have no place to complain at all.

Everything tested fine. Now I can get alerts tailored to my comings and goings.
Post Reply