Cannot use Blue Iris to change mode


#1

1) Give a description of the problem
I am trying to use a piston to change Blue Iris’s mode. I’ve reviewed the post that @Robin posted, imported the piston, made the necessary changes, but it doesn’t work. I also created a new piston from scratch but that doesn’t work either. I’ve spent hours trying various permutations but nothing has worked so far. Here’s the post I started from:

2) What is the expected behavior?
I would like to use ST’s location mode to change the profile that Blue Iris is using. I can trigger a piston when the location mode changes but the piston isn’t doing anything in Blue Iris. When the piston fires, I immediately see the connect status message in the Blue Iris status window but the profile remains unchanged.

3) What is happening/not happening?
My piston fires, I see the connection has been made in Blue Iris but the mode does not change. I’m not sure if the problem is the piston, a setting in Blue Iris, or both. Or neither. I can successfully change the mode from the Blue Iris iOS appS

**4) Post a Green Snapshot of the piston

5) Attach any logs (From ST IDE and by turning logging level to Full)
12/6/2017, 6:33:15 PM +823ms
+2ms ╔Received event [Virtual Testing Switch].switch = off with a delay of 107ms
+89ms ║RunTime Analysis CS > 19ms > PS > 52ms > PE > 18ms > CE
+98ms ║Runtime (40556 bytes) successfully initialized in 52ms (v0.2.0fe.20171109) (96ms)
+99ms ║╔Execution stage started
+107ms ║║Cancelling statement #17’s schedules…
+126ms ║║Calculating (string) 192.168.x.xx + (string) : >> (string) 192.168.x.xx:
+130ms ║║Calculating (string) 192.168.x.xx: + (string) 81 >> (string) 192.168.x.xx:81
+134ms ║║Calculating (string) 192.168.x.xx:81 + (string) /admin?profile= >> (string) 192.168.x.xx:81/admin?profile=
+137ms ║║Calculating (string) 192.168.x.xx:81/admin?profile= + (string) 1 >> (string) 192.168.x.xx:81/admin?profile=1
+141ms ║║Calculating (string) 192.168.x.xx:81/admin?profile=1 + (string) &user= >> (string) 192.168.x.xx:81/admin?profile=1&user=
+144ms ║║Calculating (string) 192.168.x.xx:81/admin?profile=1&user= + (string) redactedusername >> (string) 192.168.x.xx:81/admin?profile=1&user=redactedusername
+146ms ║║Calculating (string) 192.168.x.xx:81/admin?profile=1&user=redactedusername + (string) &pw= >> (string) 192.168.x.xx:81/admin?profile=1&user=redactedusername&pw=
+149ms ║║Calculating (string) 192.168.x.xx:81/admin?profile=1&user=redactedusername&pw= + (string) redactedpassword >> (string) 192.168.x.xx:81/admin?profile=1&user=redactedusername&pw=redactedpassword
+155ms ║║Sending internal web request to: 192.168.x.xx:81/admin?profile=1&user=redactedusername&pw=redactedpassword
+158ms ║║Executed virtual command httpRequest (3ms)
+159ms ║║Requesting a wake up for Wed, Dec 6 2017 @ 6:33:35 PM MST (in 20.0s)
+164ms ║╚Execution stage complete. (65ms)
+165ms ║Setting up scheduled job for Wed, Dec 6 2017 @ 6:33:35 PM MST (in 19.995s)
+185ms ╚Event processed successfully (185ms)

This is what I see in the ST IDE (bolding is mine):

f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:11 PM: error java.lang.NullPointerException: Cannot invoke method tokenize() on null object
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: info ║ Setting up scheduled job for Wed, Dec 6 2017 @ 7:26:30 PM MST (in 19.995s)
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Calculating (string) 192.168.x.x:81/admin?profile=1&user=xxx + (string) &pw= >> (string) 192.168.x.xx::81/admin?profile=1&user=xxx&pw=
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Calculating (string) 192.168.x.xx:81/admin?profile=1&user=xxx&pw= + (string) xxx >> (string) 192.168.x.xx::81/admin?profile=1&user=xxx&pw=xxx
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Calculating (string) 192.168.x.xx:81/admin?profile=1&user= + (string) xxx >> (string) 192.168.x.xx::81/admin?profile=1&user=xxx
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Calculating (string) 192.168.x.xx::81/admin?profile= + (string) 1 >> (string) 192.168.x.xx:81/admin?profile=1
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Cancelling statement #17’s schedules…
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Calculating (string) 192.168.x.xx::81 + (string) /admin?profile= >> (string) 192.168.x.xx:81/admin?profile=
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Calculating (string) 192.168.x.xx:: + (string) 81 >> (string) 192.168.x.xx::81
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: debug ║║ Calculating (string) 192.168.x.xx: + (string) : >> (string) 192.168.x.xx::
f2d9103b-9f1c-45ce-ab24-f2804a508780 7:26:10 PM: trace ║ Runtime (40558 bytes) successfully initialized in 280ms (v0.2.0fe.20171109) (352ms)


#2

Can you post a screenshot of your BI web server setting page (with WAN IP redacted)


#4

You seem to be trying to call your variables wrong? In your Get request section. Use expression and enter this and it should work?

{LAN_IP_Address_Of_BI_Server}’:’{port_For_BI_Server}’admin/?profile=‘{desired_Profile}’&user=‘{userName}’&pw=‘{password}

Use sing quotes too not double quotes. I don’t have blue iris, but just from the code this should fix the Get request part


#5

Thanks for the suggestion. I tried using the actual command instead of variables and still no luck. It does appears the request is being formulated correctly when I look at how the expression evaluates.


#6

Here you go. Let me know if there’s any other info I can provide that might help figure this one out.


#7

can you click advanced and show me a snapshot of that as well please.


#8

Here you go. Thanks for your help.


#9

Doesn’t the url need http:// in the front? @Robin


#10

There it is, change authentication ‘require for all connections’ to non-LAN only.

You’re current BI settings are trying to get credentials typed into a dialogue box (try pasting your URL into a browser to test) and won’t accept the authentication built into the URL.

For LAN connections you’re safe to turn this off and allow credentials in the URL.


#11

I never needed to in my examples… not needed in a browser either so must be getting assumed.


#12

That was it. Thank you! That was the last piece in a project I’ve been working on for a couple of weeks and it was driving me crazy. It’s pretty amazing what ST + WebCoRE + Blue Iris can do. Throw Ask Alexa into the mix and it’s damn-near science fiction. :grinning:


#13

@Robin How would you show tiles for your BI Status (Schedules and Profiles)? I would think you can pull in similar to how you pulled in the ability to change a profile?


#14

I’m not sure… will have to take a look at available commands.

I’m not sure how to ask BI for its current mode, only how to tell it to change.


#15

Can’t find any HTTP requests that will return current mode, current traffic lights etc.?

I’ve emailed BI support as it would certainly make a nice addition to my FAQ.


#16

I think so. I like that feature in BI Fusion to have BI profiles match ST modes. But the ability to see like in the ST dashboard (and ensure it is working) would be great.