Blue IRIS and IOT ( Internet of things)

Kevern

n3wb
Jun 27, 2015
28
12
Hi Everyone.

Firstly a big thank you to IP CamTalk for having such a rich and open platform, ... thanks you guys are amazing!

OK, in my last "FreeBee" post far below I hinted that I was working on a new wireless solution......................

Further below you will find my "FreeBee" post on integrating Arduino and Blue Iris, If you want to plug a Arduino in with a Serial cable, well that's good and fine but for some of you, you will rather want to integrate Blue Iris with limitless cross-functional IOT (Internet of things).
So.. I have started a new post called Blue IRIS and the IOT ( Internet of things), again donations are welcome to keep up the R&D and you are welcome to PM me on iot1@kldtechnologies.co.za with subject BI-IOT if you are interested in purchasing detailed document ($10 for +- 60 pages) practical real-world working code, professionally laid out PCB build, how to's for setting up Arduino UNO, Ethernet Shield, OpenHAB, MQTT and the wireless IOT chips the ESP8266-01 and ESP8266-12 (Firmware, locked loops, coding etc.)
For those of you who purchase the documentation will be able to download all code and reference material.

O.K, so let's get started.
We are NOT going to connect Blue Iris alerts via a serial cable to an Arduino anymore but we will still be using the following components.

for ..BLUE IRIS BITS:
Arduino UNO
W5100 series Ethernet Shield

for..IOT BITS:
OpenHAB
MQTT Mosquitto
Ubuntu Server
ESP8266-12

In this post I will cover the general concept of what we are doing and stop at the point after the Arduino with Ethernet Shield setups.

CONCEPT:
Blue Iris Camera Alerts are setup to send and alert email to a POP mail server with a specific subject (this is not your Arduino), you can setup these in you BI software on the fly.
The Arduino is powered on and connected to the network constantly checking for emails.
The Arduino has an attached Ethernet Shield Board and the Arduino is setup to retrieve the email and publish a message to a MQTT broker(the MQTT could be your own or something like thingspeak etc.).

The IOT bit....
The MQTT broker service in turn updates OpenHAB and controls the GPIO pins on the ESP8266-12.(7 switchable GPIO's per ESP-12, unlimited ESP-12's)
Basically if you can switch a GPIO/LED either ON/OFF or PULSE (ON then OFF) then you can integrate it into anything you like.

Conceptualization in a drawing:

attachment.php

So here is a demonstration of this in action using OpenHAB, however as Blue Iris emails are converted to MQTT messages the alerts from BLue IRIS will have the same effect as me switching on and off the LED's using OpenHAB as I did in the video.
Please note I have thoroughly tested the working EMAIL -> MQTT conversion.
Additionally any MQTT client or application be it Linux, Windows, or Mobile devices IOS, Android of WindowsMobile that has an app that can publish to a MQTT broker service will also be able to control your devices.... no absolute dependency on Openhab!!!
You can also run a small MQTT broker service on your Windows PC.



A lot of thought time and coding went into this project and I will gladly share all I have for a donation, I have displayed the technical abilities in my first "freebee" post so here is the link below and if you would like to get all my designs, builds and working code for all components please donate and PM me on iot1@kldtechnologies.co.za.

Additionally, I would ask that Blue Iris consider adding MQTT subscription capability to the software set which will further enhance its capability.
Ken, any thoughts or insights from your side?

Bye for now.

Here is a link to my older post or use this URL: http://www.ipcamtalk.com/showthread.php/4201-Arduino-amp-Blue-Iris-Integration
 

Attachments

  • IOT.png
    IOT.png
    1.5 MB · Views: 498
Last edited by a moderator:
  • Like
Reactions: abelmj
I know this looks like an old, dead thread, but I would like to second the request to have MQTT subscription capability integrated into Blue Iris. It would greatly expand its capability to interact with home automation software.
 
You're barking up the wrong tree dawg; you need to contact the Blue Iris developer. We are simply a bunch of IP camera geeks, some of whom use Blue Iris software.
 
I don't think you need MQTT in BI... the HTTP functionality and other already built-in features should do everything you want. Ken included everything for in/out operations.

And probing EMAIL every x times a minute is highly inefficient and likely has a huge delay. Here's an example of a $2 chip I bought that talks directly to WiFi and BI just to see how easy it is. No third party brokers or services.

 
I want to use MQTT because I'm already using that protocol for the rest of my home automation (OpenHAB). It's very lightweight, and from what I've read, very well suited for this application.

I think I've found a good solution, but I haven't had a chance to fully test it. Mosquitto is a lightweight command line MQTT broker that can easily be installed on Windows. I don't need it for the broker, just the client capabilities. I should be able to execute a script as part of a Blue Iris alert action to directly publish to MQTT topics.

So far I don't believe I have a need to feed information in the other direction (OpenHAB -> Blue Iris) so I haven't really thought about the reverse direction. I know others have figured it out already.
 
gmaster1: What hardware are you using? Please give us some more information about your project.
 
It's just an ESP201 (esp8266 variant) chip that is running EasyESP on it (It turns the chip into a web server with control over all of the IO pins. You can ideally hook it up to MQTT and cloud services to do a laundry list of things, or you can use it like I did in the example to send a basic command to turn a light on and off in real-time as opposed to running around extra servers and whatnot.)

sOFrWCI.jpg

If you were feeling really nerdy and had, for example, 7 cams, you could just solder 7 LED lights on it and make a sort of "activity board" that would light up the corresponding LED to the camera it's monitoring.

I have one in the master bedroom as an auxiliary to tell me whether or not the garage door is open at night.

I use another at my office with a little screen to tell me how many e-mails I have in which account.

You can use them to relay as well. If I wanted to (going back to garage door example) I can wire one into the garage door controller via relay and open/close it with simple HTTP commands.

Ar9thIF.jpg

Keepin' it simple.
 
I can wire one into the garage door controller via relay and open/close it with simple HTTP commands.

i use a raspberry pi serving a web page with some door contacts and a relay to control my garage door and provide status. also triggers BI when the doors opens (http commands to BI). could of done it with an arduino as well I suppose, but I have a the raspberry pi doing a bunch of other stuff (weather station and tracking my internet usage)

always tinkering with something!
 
  • Like
Reactions: abelmj
Yep that's how I'm currently running the garage relay. Using an IR break sensor to do the whole LED status above the entrance and Web status etc. I threw a 3wire Dallas in the garage as well off the same cat5. I just want to start reversing some of this eventually just to simplify it a tad.
 
That all seems complex. Can't you just use I/O on Onvif compatible cameras / encoders for IO?
 
I am running OpenHAB on a raspberry pi, which is why I'm wanting to use the lightweight MQTT. I currently have an Arduino and relay acting as a driveway gate controller. I have a few nodemcu's that I want to use to expand the system (garage door controller, temperature sensors, etc). I currently have 3 IP cams on blue iris and feeding their alerts into OpenHAB is my next step.

I also want simplicity and more importantly reliability. I'm very interested in other's experience with this stuff.
 
I am running OpenHAB on a raspberry pi, which is why I'm wanting to use the lightweight MQTT. I currently have an Arduino and relay acting as a driveway gate controller. I have a few nodemcu's that I want to use to expand the system (garage door controller, temperature sensors, etc). I currently have 3 IP cams on blue iris and feeding their alerts into OpenHAB is my next step.

I also want simplicity and more importantly reliability. I'm very interested in other's experience with this stuff.

i hadn't known about mqtt before this thread! might have to play with it a bit. I currently have my arduinos serve up what is essentially a text file through a web server for my raspberrypi to read. the raspberrypi in my setup is the brain. i used the arduinos simply because i couldnt run sensor wires that long from the raspberrypi (temp, pressure, humidity, dust, co2 in multiple locations). no real limit on the door sensors or relays so i run those all back to the raspberrypi. the pi does all the logging and runs the webserver for the weather data and garage door. the pi also monitors the door sensors and triggers BI through http. i'm always looking for ways to make it simpler too, but it always seems to go the other way.... :P

im kind of going the other way, where you want to have your camera alerts feeding to you pi, i wanted my pi to feed trigger events to BI.
 
I am impressed and had no idea there was an open source message queing solution out there. I worked with IBM's MQ Series and Message Broker years ago that was used to send device telemetry to a central database repository. To achieve notification from device to BI, i built a simple serversocket client server app on the Pi. It works but man, if I knew I could have leveraged a true MQ transport, that would have been kick a$$. I may have to revisit my project to see if I should rengineer it to use MQ. WOW!!!

Thanks for the post. This is awsome.