Author Topic: Vera Blue Iris Unofficial Plugin  (Read 187945 times)

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +65/-0
Re: Vera Blue Iris Unofficial Plugin
« Reply #675 on: March 09, 2018, 06:44:18 pm »
I'm coming late to the party and this is a long thread, so if I've missed the boat/point/window I apologize, but I wanted to suggest that if all that is needed is to get Vera to know when BlueIris senses motion (which it's really good at), you can use the VirtualSensor plugin to be the motion sensor emulation on the Vera side, and configure BlueIris to send an action to the Vera to trip and reset the VirtualSensor device when a camera is triggered or untriggered (for motion or any other event that BlueIris can detect, e.g. audio).

Specifically, install the VirtualSensor plugin, and create one device instance for every camera you want to respond to. Name them and record their respective device numbers. Leave them in Disabled state, because they will be operated programmatically by BlueIris only, and disabled stops any automatic operation. They can be armed or disarmed as needed, as any other motion sensor would be used.

Then, in the BlueIris camera properties for each camera, on the Alerts tab, check "Request from a web service" and hit the Configure... button. For "When triggered" enter this:

Code: [Select]
http://your-vera-ip/port_3480/data_request?id=action&serviceId=urn:toggledbits-com:serviceId:VirtualSensor1&action=Trip&DeviceNum=your_vsensor_device_id
Then check the "Request again when trigger is reset" checkbox, and enter this URL to untrip the sensor:

Code: [Select]
http://your-vera-ip/port_3480/data_request?id=action&serviceId=urn:toggledbits-com:serviceId:VirtualSensor1&action=Reset&DeviceNum=your_vsensor_device_id
It's a bit "crafty," but then, so much is, and it will be a lot lighter weight on the Vera than anything involving the video stream directly. You can also poke at the ModeStatus variable to get the arming state configured right for the various house modes, as you would with other security sensor devices.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline Gr8hifi

  • Jr. Member
  • **
  • Posts: 59
  • Karma: +0/-0
Re: Vera Blue Iris Unofficial Plugin
« Reply #676 on: March 15, 2018, 11:51:06 pm »
Out of curiosity, is there a way to make Vera talk to the blue iris server?  What I?d like is to set ?away?on my Vera and have that tell blue iris to start recording on motion detection.  Then, when I deselect away, I?d like Vera to tell blue iris to stop recording on motion.   I know I can set up schedules, but our lives don?t seem to do the same thing at the same time with any regularity. 

Thank you

Offline kfxo

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +2/-0
Re: Vera Blue Iris Unofficial Plugin
« Reply #677 on: March 16, 2018, 08:51:04 am »
Out of curiosity, is there a way to make Vera talk to the blue iris server?  What I?d like is to set ?away?on my Vera and have that tell blue iris to start recording on motion detection.  Then, when I deselect away, I?d like Vera to tell blue iris to stop recording on motion.   I know I can set up schedules, but our lives don?t seem to do the same thing at the same time with any regularity. 

Thank you

You can send some http commands to the blue iris server. For example set up profile for recording and profile for not recording. Then switch profiles in blue iris using this lua code

local status, result = luup.inet.wget("http://ServerIP:ServerPortNumber/admin?profile=DesiredProfileNumber&lock=2&user=YourUserName&pw=YourPassword", 5)

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1272
  • Karma: +31/-32
Re: Vera Blue Iris Unofficial Plugin
« Reply #678 on: March 16, 2018, 07:59:53 pm »
And the Blue Iris cameras can become virtual motion sensors in Vera.
Vera 3, 1.7.1030, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb

Offline Gr8hifi

  • Jr. Member
  • **
  • Posts: 59
  • Karma: +0/-0
Re: Vera Blue Iris Unofficial Plugin
« Reply #679 on: March 17, 2018, 05:04:37 pm »

You can send some http commands to the blue iris server. For example set up profile for recording and profile for not recording. Then switch profiles in blue iris using this lua code

local status, result = luup.inet.wget("http://ServerIP:ServerPortNumber/admin?profile=DesiredProfileNumber&lock=2&user=YourUserName&pw=YourPassword", 5)

I coupled your code with the House Modes Plugin and this works great! 
Thank you so much,
Jason

Offline jhanson999

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: Vera Blue Iris Unofficial Plugin
« Reply #680 on: May 15, 2018, 02:35:36 pm »
I've been using the blueiris plugin for years without any real problems until now.  I just added a new camera to blue iris, so I added another vera device via the vera blueiris plugin menu.  I can get everything working, except after some time, the camera goes offline.  I think this is related to the fact that I cannot set the username and password.  Anytime I try, I get "Unable to change the camera's username/password" in a warning message across the screen.  It works at first when I hard set the username and password in the URL variable, but it won't take at the device level. 

Running the "/data_request?id=user_data&output_format=xml" command and looking at the device, it is missing the username and password options in the device that all the other cameras I'm using have.  I'm pretty confident that it's failing because it can't set variables that don't exist, but I've tried removing and adding it a few times and it always has the same problem, like the plugin has a compatibility issue with the newer firmware or something, but I can't figure out how to resolve it.  Any ideas anyone, or is anyone else seeing this issue?

Offline jswim788

  • Hero Member
  • *****
  • Posts: 750
  • Karma: +49/-2
Re: Vera Blue Iris Unofficial Plugin
« Reply #681 on: May 15, 2018, 04:59:34 pm »
it's failing because it can't set variables that don't exist
You can add the variable manually if that's what the plugin needs.  A plugin can create variables, but maybe this one chooses not to?  Just make sure you add it with the correct SID as well as variable name (match the working one).  Case matters.

Offline jhanson999

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: Vera Blue Iris Unofficial Plugin
« Reply #682 on: May 16, 2018, 09:05:19 am »
it's failing because it can't set variables that don't exist
You can add the variable manually if that's what the plugin needs.  A plugin can create variables, but maybe this one chooses not to?  Just make sure you add it with the correct SID as well as variable name (match the working one).  Case matters.

I know how to create variables that show up in the "states" section of the device, but not on the device itself.  What method do I use to accomplish this?  Also, what is the SID, I'm not seeing that option at all, maybe that's my problem.

Offline andreysunomb

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Vera Blue Iris Unofficial Plugin
« Reply #683 on: May 24, 2018, 02:21:46 am »
Hi. Sorry if this is the wrong forum.
I bought Video Enhancer, and I read I could contact you, and get a key for the VirtualDub plugin as well?

Thank you.

Offline Learic

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-1
Re: Vera Blue Iris Unofficial Plugin
« Reply #684 on: July 11, 2018, 12:26:37 pm »
I know how to create variables that show up in the "states" section of the device, but not on the device itself.  What method do I use to accomplish this?  Also, what is the SID, I'm not seeing that option at all, maybe that's my problem.

Have you had any progress on this? I have a blueiris configuration with 4 cameras. 2 cameras were configured a long time ago and they show the "Current Username & Password" fields to have a value filled in. I just tried to add 2 new cameras that are working on my blueiris server to Vera and the video is streaming but I get a big prompt from Vera on top saying I need to change the default password and the "Current Username & Password" fields are blank on these 2 and when I try to add a "New Username & Password" it fails. So running on the same blueiris server, I have 2 cameras working fine but they were configured in Vera a long time ago and now any camera I add has the annoying prompt from Vera ontop of the camera's streaming video.

I went to properties of the devices and cannot find any way to create a new variable called username, or password to inject something. Any help is greatly appreciated if you found a solution...

Offline Learic

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-1
Re: Vera Blue Iris Unofficial Plugin
« Reply #685 on: July 12, 2018, 04:10:28 pm »
Nevermind. I found a workaround for the regarding the username and password field. I had to delete the cameras that I was adding, ignore creating the cameras through the blueiris vera app; I just added a generic IP camera from the standard Add Device page with the IP information for my blueiris server. During a manual "add device" for IP camera, I was given a username and password field where I typed the values and it configured the device. I then had to go to the newly created camera, add the implementation file in the field "l_blueiris.xml" and save. After a few minutes, I could then go and change the URL value, DirectStreaming path, and the "name" variable for blueiris. The Current Username and Password field are still filled in from what I entered during the "Add Device --> Generic IP Camera" so no more nagging even though my blueiris doesn't need the values...