Using Serial Interface on Blue Iris Server to Open or Close a Garage Door?

Inphosys

n3wb
Joined
Jun 26, 2018
Messages
16
Reaction score
4
Location
Savannah, GA
Hey, IP Camera Talk folks!

Long time reader, first time poster here.

My significant other loves to leave the garage door open, A LOT! So much so that my neighbors often call late at night and ask, "do you know your garage door is open?" ... to which I begin trying to call my girlfriend so I can get her to close it, but she's already gone to bed, or phone is on silent, and of course I'm out of town traveling so I can't do it. The neighbor doesn't want to do it either because they're older and can't push the button in the garage and run fast enough to get out the door and jump over the IR safety sensor.

Enter my solution ...

I have Ethernet cabling pulled all throughout my house, I'm going to put an extra IP camera in the garage looking out so I can check it before going to bed at night.

My Blue Iris Server is safe behind my VPN firewall (I actually launch my VPN app before launching my Blue Iris mobile app).

My garage door opener is very simple, the button on the wall to open / close the door looks like a doorbell. All the button does when you push it is cross the two wires that are connected to the back of the opener and presto ... open or close is performed.

My Blue Iris Server is not very far (distance) from my garage door opener.

Can I use the serial interface on my Blue Iris Server to essentially cross two of the serial pins so I can signal the opener to close?

I ran an Ethernet cable to my opener so I have 8 conductors just sitting there. If I could figure out how to make my serial interface (RS-232) just bridge two of the pins together, I could trigger it from inside the Blue Iris app without having to develop another solution or use a separate app ... I like the safety I currently have over my network and don't really want to add something else that might require additional safety measures to keep from getting hacked.

Your thoughts?

As always, thanks for all of the awesome knowledge that you all share, this forum is invaluable!

Best regards,
Inphosys
 

Terk

Pulling my weight
Joined
Feb 14, 2018
Messages
247
Reaction score
106
The two pins on your garage door opener would most likely pass 12v through when the button is pressed which would likely cause issues with your RS-232 port you'd probably want to use a dry contact relay and you would need to make sure it is a temporary connection (would connect the wires then disconnect them within a second or so) There are devices like this for Home Automation hubs and there are some that could be triggered just by plugging it in or unplugging it with something like wifi plug module
 

Inphosys

n3wb
Joined
Jun 26, 2018
Messages
16
Reaction score
4
Location
Savannah, GA
HOLY COW THOSE ARE EXPENSIVE!!!!!!!!!!!!!

Thanks for the advice on the voltage, would never have thought of that. Next thing you know I go running 12 VDC through my serial interface and burn the motherboard on my Blue Iris server out.

Looks like I'm going to go with my original plan ... Raspberry Pi or Arduino with PoE and do some sort of iPIO or eI/O.

Thanks again for keeping me from frying my system!
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
You really need a relay connected to a Pi or Arduino or ESP8266 (arduino with wifi). Close the relay for one second to open or close the garage door.
Highly advice using openVPN to access your network for something like this, so its secure.

I think the easiest way to implement would be a relay board connected to an ESP, and run espeasy on the esp.

For example, with espeasy, you can send a command from a browser in the form of something like
http://192.168.x.xxx/control?cmd=event,switch01
to turn on switch01.

They sell little relay boards that you can connect to an esp fairly easily.
I use the wemos mini d1 ESP boards, they work well for me and are cheap for what they can do.

Yeah, the commercial options are kind of pricey, compared to what you can do yourself, but it does take some time to put something like this together.

Randy
 

Inphosys

n3wb
Joined
Jun 26, 2018
Messages
16
Reaction score
4
Location
Savannah, GA
Randy -

Thanks so much for the advice!

Yes, my entire system is behind a firewall and VPN. Because I'm so paranoid, I actually have to launch my VPN client before I open the Blue Iris app on my phone (I don't fully trust Stunnel and NGROK against vulnerabilities).

With the wemos mini D1, do you recommend the "Simple Relay Shield"? Or should I look to something different?

Also, (hopefully last question) .... Can this be controlled from the DIO section on the Blue Iris mobile app? I don't want a camera to trigger this, I'm just going to trigger it manually if I check the garage door camera at night and see that it's been left open.

Again, thank you both (@Terk and @randytsuch ) for leading me in the right direction.

Best regards,
Inphosys
 

Inphosys

n3wb
Joined
Jun 26, 2018
Messages
16
Reaction score
4
Location
Savannah, GA
OK, I think I'm getting the hang of this! But unfortunately it's lead me to a couple of questions ...

Give a man a fish, feed him for a day. Teach a man to fish and he'll ask you questions about fish, lures, rods, and reels for the rest of your life!! :lmao::rofl::lol:

I found this ...
WHDTS ESP8266 WiFi 5V 1 Channel Relay Delay Module(links to amazon) ... Looks like it's an all-in-one ESP8266 with WiFi and relay already put together that I can place next to the opener and then send the commands either with EasyTCP or ESP Easy.

Questions ...
  1. Does this look like it's the right fit to do the job?
  2. Can I use a DIO trigger in the mobile app to execute a script that talks via EasyTCP or ESP Easy instead of talking over a COM serial port?

Again, many thanks for tolerating a newb's questions!

Best regards,
Inphosys
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
OK, I think I'm getting the hang of this! But unfortunately it's lead me to a couple of questions ...

Give a man a fish, feed him for a day. Teach a man to fish and he'll ask you questions about fish, lures, rods, and reels for the rest of your life!! :lmao::rofl::lol:

I found this ...
WHDTS ESP8266 WiFi 5V 1 Channel Relay Delay Module(links to amazon) ... Looks like it's an all-in-one ESP8266 with WiFi and relay already put together that I can place next to the opener and then send the commands either with EasyTCP or ESP Easy.

Questions ...
  1. Does this look like it's the right fit to do the job?
  2. Can I use a DIO trigger in the mobile app to execute a script that talks via EasyTCP or ESP Easy instead of talking over a COM serial port?

Again, many thanks for tolerating a newb's questions!

Best regards,
Inphosys
I'm not sure you will be able to reprogram that amazon device, or at least not easily reprogram it

One very nice feature of the wemos esp is you just plug in a micro usb to a PC, and then you can reprogram. There are tons of esp variants, and the cheaper ones need a serial to usb adapter, and also you need to feed it 3.3v.
The wemos has a 3.3v converter, so you can power it with 5v from a usb port. This also makes it easier to power up as a stand alone device, you just need a little usb power plug and a micro usb cord.

Wemos also makes a relay shield that will work fine as long as you just need one relay.

On software, with easyesp, you don't need blue iris. You will be able to bookmark a http link that will open and close your garage door. So its open vpn connection, open browser and select the bookmark that closes the garage door.

I did look into blue iris and discretes a while ago, but from what I saw you needed to buy some fairly expensive devises to interface with blue iris, and in the end I could not find a reason to interface it with blue iris.

Randy
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.

Nanookofthenorth

Young grasshopper
Joined
Jul 13, 2014
Messages
84
Reaction score
17
I don't know . . . maybe get a new door opener with wifi, close it with the phone app. So simple a caveman . . . .
 

Inphosys

n3wb
Joined
Jun 26, 2018
Messages
16
Reaction score
4
Location
Savannah, GA
@randytsuch Thank you again for all of the advice! I was doing a bunch more reading after I posted that and decided to pull the trigger on exactly what you suggest, wemos + relay shield. I also went ahead and bought the other amazon one too, the all-in-one ESP8266 and relay, I also bought a USB to 4 pin serial connector with onboard USB to serial converter along with some 4 pin ribbon cables, just to play with them to see if I can program them the same way you program a wemos. They're both ESP8266 based, so I can't see how it would be too incredibly difficult, but I promise I will post back to this thread with my findings.

Again, many thanks! (I know you can "Like" a reply on here, but can you give someone kudos or major props for being awesome?)
 

Inphosys

n3wb
Joined
Jun 26, 2018
Messages
16
Reaction score
4
Location
Savannah, GA
I don't know . . . maybe get a new door opener with wifi, close it with the phone app. So simple a caveman . . . .
LOL @Nanookofthenorth !!!
I like a challenge. ;)

Plus, if I can get this to work, I'm going to use this same relay principle in other applications as well. Not to mention, this whole fishing expedition is going to cost me around $17. Cost of a new, WiFi enabled garage door opener? $$$$$

Thanks again to all of the contributors, and best regards,
Inphosys
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Good luck. One other think with programming esp's, I have one really cheap esp-01, and to program it you need a serial adapter, and a switch to put it in boot mode. That might be a esp-01 on the amazon board, so if you have trouble you'll need to look at that.
esp-01

My other comment is I'd avoid any software that runs from the cloud and opens your garage door. Me being paranoid, but I only have stuff I don't care if its compromised on the cloud.

I don't consider openvpn as cloud based, since you have a secure key file required on both ends to make the connection.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
Check out OpenGarage

Chamberlain/Liftmaster/Craftsman openers with keypads for entry can typically be closed by pressing the enter button without a code (this can be disabled). They can also be made compatible with MyQ by replacing the push button on the wall with a special model and buying a myQ gateway.

One thing to note is that some of the newest openers now use a form of serial communication and a relay / doorbell button doesn't work anymore. You have to solder to an extra remote.
 
Last edited:

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
15,521
Reaction score
22,657
Location
Evansville, In. USA
I suggest you show her the many Home Invasion videos, that leaving the garage open is inviting.
I'll bet she doesn't lock the man door to the house either. ;)

I have a better solution, a small switch activated by the garage door. With a relay timer, if the door isn't shut in a set amount of time, say 20 minutes, set off a 110db siren in the house. She'll learn real quick. ;)
 
Last edited:

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
I suggest you show her the many Home Invasion videos, that leaving the garage open is inviting.
I'll be she doesn't lock the man door to the house either. ;)

I have a better solution, a small switch activated by the garage door. With a relay timer, if the door isn't shut in a set amount of time, say 20 minutes, set off a 110db siren in the house. She'll learn real quick. ;)
They can be a bit dangerous, but there are also products that simply close your door automatically after a few minutes. Depending on your opener, there may be options like this: ** not compatible with all liftmaster openers.** edit: not recommended
 
Last edited:
As an Amazon Associate IPCamTalk earns from qualifying purchases.

Inphosys

n3wb
Joined
Jun 26, 2018
Messages
16
Reaction score
4
Location
Savannah, GA
I wanted to thank everyone again with a special thanks going out to @randytsuch !!!

I'm polishing up my project right now and I'll be creating a new post that shows the DIY products used, steps, code, etc.

I ended up buying two, WeMos D1 Mini boards and one 5V relay shield.

WeMos #1 is a bare, WeMos D1 Mini, no add-on shields, and it's plugged into a USB port on the back of my BI server (shows up as COM3). In BI I went to ... Option -> Digital IO and IoT -> Under "Serial port" -> Enable (check) "Open DIO device on serial port", select "COM3" (because that's the one my WeMos board is assigned to in Windows Device Manager), select "Single byte I/O (Arduino) -> click OK

On WeMos #1 I'm running code that is listening on the serial port for an ASCII character, it will simply be an ASCII 1 through 8. (In my case and for this project, I'm listening for an ASCII character '4'). On my mobile device, in the Blue Iris Android App, when I go to "Remote Control" and trigger DIO output 4, the BI server sends the byte for ASCII character '4' to COM3. My WeMos #1 (again, which is connected to the back of my BI server) hears the incoming byte and then sends an http request across my WiFi network to WeMos #2 which is sitting on top of my garage door opener.

WeMos #2 is a WeMos D1 Mini with a 5V relay shield soldered to it. I also purchased a cheap voltage-selectable AC to DC transformer and set it to 7.5 volts DC, the + and - are soldered directly to the WeMos D1 to supply power instead of using a cheap USB transformer with a micro USB cable. (I found several articles online that say running a WeMos D1 Mini with add-on shields can fail over time by supplying too low (5 VDC) or too high (higher than 12 VDC); it seems that the sweet spot is between 7 VDC and 12 VDC, so I picked 7.5 volts. The Normally Open (NO) and COM of the 5V relay are connected to the two screw-down connectors on the back of my garage door opener, the same two connectors that the opener button on the wall are connected to. WeMos #2 is also connected to my WiFi network, same network as WeMos #1 (so they can talk to each other)

On WeMos #2 I'm running the ESP8266 Web Server code and code to activate the 5V relay. When the web server hears the http request from WeMos #1 activate the relay, it performs the task and down goes the garage door! Added bonus, if someone locks themselves out of the house, they can call me and I can trigger DIO output 4 from my phone and let them in!!

Again, as soon as I have everything polished, I'll create a new post with pictures, instructions, and the Arduino IDE sketches that I used to program the firmware into the WeMos D1 Mini boards. None of this would have been possible without the help of this forum, you folks are awesome!
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Very nice!!
Glad to know you got it figured out and working.

FYI, I run all of my wemos' on 5v, and don't have any problems.
However, I do not use the micro usb connector, found that they can be problematic if you have other stuff on the wemos like relays, so I've been cutting up old USB cords, and solder the wires directly to the wemos, which is sounds like you are doing.
I just looked at the mini d1 schematic. It shows a ME6211 as the 5v to 3.3 v converter. The ME6211 datasheet shows a max input voltage of 6.5V. Its a low dropout reg, and should work fine on 5v.
So I'm don't think you should be running it from 7v, you may want to look at that again.

As an aside, Wemos also makes a dual base and a tripler base. I use them like a motherboard, and plug the wemos into the base along with any other boards I need. Also makes it easier to connect other wires.

EDIT:
I missed that there is a diode drop between the 5V usb line and the 5V converter.
So if you feed it 7V on the other side of the diode, it should see about 6.5V at the 6211, and be right at the limit. I would not run the 6211 at its limit though, definitely not recommended.


Randy
 
Last edited:

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
Transformers output AC voltage.

There's no point in using 2 wemos or serial at all. Blue Iris could directly trigger "wemos #2" over your network. Then again is there really any point in using Blue Iris to control the door in the first place.

The OpenGarage product I mentioned before is actually based on an ESP8266. Even if you don't replicate their hardware, you could probably modify and use some of their open source software for a more polished experience: OpenGarage/OpenGarage-Firmware
 

Nanookofthenorth

Young grasshopper
Joined
Jul 13, 2014
Messages
84
Reaction score
17
I really like the OpenGarage, and even the OpenSprinkler, and I'm thinking to order one. His videos and FAQ's are well done and it's just a cool task specific app. Tangent, do you have one? You seem knowledgeable on the product.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
I really like the OpenGarage, and even the OpenSprinkler, and I'm thinking to order one. His videos and FAQ's are well done and it's just a cool task specific app. Tangent, do you have one? You seem knowledgeable on the product.
No, but I've thought about getting one. I'm currently doing something a little different for garage door control.
 
Last edited:
Top