[Deprecated] BI Control - Local Blue Iris control

Sorry for the beginner question, I am new to all this and I have read the entire thread but not understanding this basic part.

I want to have a motion detection event in BI be communcated to HE which would then do some stuff like turn on a light and also control some things in BI like pan the camera and take a snapshot.
I have installed and set up BI Control and I think I understand how to use it to do stuff in BI like pan a camera. What I dont understand is how to get the camera motion detection sent from BI to HE. Lots of people in the thread mentioned that they set up a virtual switch, is this the part I am missing and if so can someone explain how exactly to do that?

The summary says both "uses hubitats standard virtual switches" and "devices are also available to use in rule machine", what is the meaning of these two points? I dont see any new virtual switches nor anything new if I look in rule machine.

Thanks for any help

1 Like

Welcome to Hubitat!

For motion detection, see the bottom of post #1.

Also, this code isn't being kept up anymore, all functions are now part of Event Engine.

Thanks

1 Like

I recently did this and it works flawlessly for BI sending commands to HE. As @bptworld said, the first post explains it, but here you go.

BI Control is one way, Hubitat to Blue Iris. BUT... there is a way to receive alerts from Blue Iris just using Rule Machine!
Note: This was written for BI4. If using BI5 results may vary.

  • In Rule Machine:
    • 'Create New Rule', 'Define a Trigger', 'Name the Trigger'
    • 'Select Trigger Events', 'Select capability' = 'Local End Point'
    • Note: you will need the 'Local End Point URL' in Blue Iris
    • 'Select Actions' to do whatever you like!
  • In Blue Iris
    • Select the Camera to use as a Trigger then 'Right Click' and select 'Camera Properties'.
    • Select 'Alerts' and then check-off 'Post to a web address...' and then click 'Configure'
    • Under the heading 'When Triggered', make sure that "Http://" is selected
    • Then next to that box, put in the 'Local End Point' URL from Hubitat. Note: do not include the Http:// ... just start with the ip address. (ie. 192.168.1.123/apps/api/....)
    • Click 'OK' and your done!
2 Likes

Thanks, I did see that and was able to get it working. What I was really asking was if people were able to create like a "virtual motion sensor" in HE from a camera that can be selected as a motion sensor since directly using the local end point everywhere isnt DRY code and also the state of it cant be checked in conditional statements etc.

Secondly, I was also trying to determine "devices are also available to use in rule machine" meant that installing BI Control would make its functionality like panning a camera available in rule machine or all the needs to be done directly in BI Control (I guess actually in Event Engine now).

I created virtual Motion devices for each area my cameras are covering (I set them to automatically change to inactive after a few seconds) then exposed those virtual sensors via Maker API which I then set to active via the Web request or MQTT option.

I see, and when you say you created them, that is all done in Maker API? If so I guess Ill look for a tutorial and hopefully can take it from there.

On the Devices page

  1. Choose the Add virtual device option at the top
  2. Name the virtual motion sensor
  3. Choose the virtual motion device type
  4. Hit save device.

On the devices page

  1. Choose 15 seconds for the auto inactive field
  2. Hit Save Preferences

Repeat for each camera area where you want virtual devices

Then on the Apps page

  1. Choose the Add Built-in App option at the top
  2. Choose Maker API
  3. Name the Maker API instance
  4. Only local access is needed
  5. Assign the virtual devices created above
  6. Click the Get all devices link to find the IDs for each to use in the Web request or MQTT option in the BI alerts
  7. Copy the "Send Device Command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value]" URL and substitute the device ID found on line 6 for one of the VM devices and substitute the [Command] with active so the line looks something like
    192.168.2.17/apps/api/6715/devices/1909/active?access_token=Fsdfjkhw3-erjoj4t-orjgoj4

Put that line in the Web Request or MQTT alert option in the cameras properties with the HTTP type that should activate the VM sensor in Hubitat when there is motion detected and alerted on via the camera.

3 Likes

Thank you so much, this worked perfectly great instructions.

It works great with BI 5 to control BI profiles with Hubitat modes.

However it doesn't do anything to make the camera's video streams available on the Hubitat dashboard. That has to be done with http commands and depending on your stream settings and browsers it may not always work the same.

I got this (Blue Iris feeding detected motion back to Hubitat Virtual Motoin Sensors) going the other day -- huge thanks to @bptworld who gave me a quick pointer on this.

The issue I'm having is finding the right balance between quick motion detection + false alarms. Anyone found a good mix of settings that works for them?

Indoors, I'm finding I have to set the max % object detection to something real small (30-35%) or else lighting changes will trigger motion, but then I have to balance that by cranking minimum object size + contrast waaay down otherwise it won't trigger on legitimate motion.

Open to the expertise of the community, who I'm sure have battled similar things.

Are you using DeepStack if not look into that. It integrates easily with BI now.

How fast do you think the object detection is using this method?

I'm currently using Camect for object detection, but I supplemented it with BI motion detection because I find it just fires too slow. The Camect object detection is accurate and I like how you can customize the alerts they throw -- but taking multiple seconds to flag a person walking up my driveway just wasn't working for me.

DeepStack is local as well but runs on your BI hardware unless you want to manage it otherwise, it's also free. Our DeepStack alerts usually happen through Hubitat to pushover in about 2 seconds after activation but it all depends on your hardware and settings. You can have it analyze multiple still shots per activation for people cars, cats, dogs, ... We usually know someone is approaching about 10 seconds before someone arrives at the front door. DeepStack will rarely see an insect on the lens as a person but that happens very infrequently.

I'm not sure if this is expected behavior or not. I have BI Control configured to "Camera Trigger" based on a separate motion sensor (battery-powered thing). This should then fire my BI trigger, and implicitly, my BI alert (SMS). Rather, it is simply creating a snapshot (as defined in the BI "Posts" area) and doing nothing further. It's as though it's not really performing a "trigger". Am I missing something obvious?

Please show how you have this setup (screenshots)

ended up doing an http get and its working now!

1 Like

Just wanted to give Kudos. This is awesome using end points and creating "virtual motion sensors" out of my BI cams. Very cool for text alerts for packages in weird places. They just started randomly putting packages in our alley and I almost ran over one with my car today. So now I have an alert that if motion goes off in a certain BI zone, and the garage door is closed & stays closed for a 1 minute (meaning a car didn't set off the motion), send a call back to BI and do an SMS alert of a whole camera group. This is seriously awesome.

2 Likes

Thanks! Few questions:

  1. would this work if the BI server is on a sub-NAT/separate LAN?
  2. do the passwords get sent in plain text? Even if I create a user that has limited access, this still bothers me a little. Not sure if it matters.
  3. does changing the secure session keys setting affect authentication in general for WAN connections? Can a single BI user have secure session keys turned off and all others require it?

Thanks!

  1. No idea
  2. yes, it's the only way
  3. No idea (and hurt my head)

:upside_down_face:

1 Like

Maybe a dumb question but not so obvious to me. where do I find the local end points for Rule Machine and BI?

  • In Rule Machine:
    • 'Create New Rule', 'Define a Trigger', 'Name the Trigger'
    • 'Select Trigger Events', 'Select capability' = 'Local End Point'
    • Note: you will need the 'Local End Point URL' in Blue Iris
    • 'Select Actions' to do whatever you like!
  • In Blue Iris
    • Select the Camera to use as a Trigger then 'Right Click' and select 'Camera Properties'.
    • Select 'Alerts' and then check-off 'Post to a web address...' and then click 'Configure'
    • Under the heading 'When Triggered', make sure that "Http://" is selected
    • Then next to that box, put in the 'Local End Point' URL from Hubitat. Note: do not include the Http:// ... just start with the ip address. (ie. 192.168.1.123/apps/api/....)
    • Click 'OK' and your done!