Lockdown Pro 2 Brings Material Design and Media Support

Back in March of this year, we took a look at a rather innovated security application … more

Mural Watchface Brings 500px to Android Wear

On a traditional watch, you can’t really do too much to change its appearance once … more

Android 5.0 Favorite Features, Release November 3rd? – XDA TV

Google Confirms Android 5.0 Lollipop for November 3rd! That and much more … more

Prepare Your Build Machines: Ubuntu 14.10 Utopic Unicorn Now Official

Today is an important day for any and all Linux enthusiasts. One of the … more
Post Reply

[App][Project][Cool] JsChiSurf's "OpenSezMe" Android Garage Door Opener Application

OP JsChiSurf

22nd October 2010, 09:43 PM   |  #1  
JsChiSurf's Avatar
OP Recognized Developer
Hacksville
Thanks Meter: 1,230
 
2,334 posts
Join Date:Joined: Feb 2010
Donate to Me
I wanted to create this post to show fellow XDA members a cool project I've been working on, and figured that like-minded XDA members (techno-geeks) would think it was pretty sweet as well, so this post is nothing more than to "show off" what I've done and perhaps inspire others to do something similar once they see how I accomplished this .

I set out to develop a simple android application to turn my phone into a "virtual" garage door remote, with the requirements that the application only successfully function when / if I am within a 1 block quadrant of my home, and be protected by a pin code. Both of these requirements help to prevent accidental opening / closing of my garage both at home, or in some remote location half-way around the world. You will see the end product from the application side in the youtube demo video at the end of this post.

I happen to have an old linux box running as a mail / web server in my garage that also has a serial port. So I said to myself, "self", wouldn't it be cool if I could interface the serial port on the linux box to a relay switch that would enable me to send commands out, via the serial port, to toggle the relay switch on/off, with the goal of mimicking the button press of a garage door pad on your garage wall, and control all of this via my phone?

So, I picked up a cheap serial port relay controller and connected it to my linux box's rs232 port. The controllers are available in a variety of interfaces, such as USB, ethernet, etc, but for me, serial was the way to go due to my existing setup, and ease of programming to the port, etc.

I then wrote a set of serial port communication classes in PHP for sending the necessary commands out the serial port, as outlined in the relay controller's specs, for toggling the relay on/off.

I tie it together by having the android application I wrote first look for the correct PIN code and geolocation, and when correct / within range, present a "virtual remote" on screen. When the remote is pressed, it makes an HTTP call to the webserver in my garage, that when called successfully issues the necessary serial port commands to toggle the relay switch.

The end result? A pretty bad ass virtual garage door opener app I call "OpenSezMe" that allows my phone to double as my opener. When I go on walks, jogs, etc, upon return, I can simply open my garage via my phone for entry back into the house. I know I could install a keypad, but what's the fun it that?

This application is very specific to my needs / setup, so doesn't really have any value for anyone else. I just thought it was pretty cool and figured you guys would too, and, at a minimum, could spur you to come up with something similar, unique to your environment.

The Following User Says Thank You to JsChiSurf For This Useful Post: [ View ]
22nd October 2010, 10:16 PM   |  #2  
Mast3rpyr0's Avatar
Senior Member
Flag Columbus
Thanks Meter: 1
 
282 posts
Join Date:Joined: Jan 2010
More
Very cool! I would love something like this, you know, if I actually had a garage. :P But maybe something for my lights in my room, I hate getting up to turn them off :P
22nd October 2010, 10:22 PM   |  #3  
JsChiSurf's Avatar
OP Recognized Developer
Hacksville
Thanks Meter: 1,230
 
2,334 posts
Join Date:Joined: Feb 2010
Donate to Me
Quote:
Originally Posted by Mast3rpyr0

Very cool! I would love something like this, you know, if I actually had a garage. :P But maybe something for my lights in my room, I hate getting up to turn them off :P

That's the cool thing about it, and the world of possibilities it opens.

You can get these cool controllers that have multiple (dozens) of relays to control different things. I just got a cheap single relay controller to start, but with a multiple relay controller, you can start building an app to control lights, the garage, or anything else you want.
22nd October 2010, 10:55 PM   |  #4  
Rydah805's Avatar
Recognized Contributor
Flag Ventura County, CA
Thanks Meter: 1,176
 
3,837 posts
Join Date:Joined: Oct 2008
Donate to Me
More
Quote:
Originally Posted by JsChiSurf

That's the cool thing about it, and the world of possibilities it opens.

You can get these cool controllers that have multiple (dozens) of relays to control different things. I just got a cheap single relay controller to start, but with a multiple relay controller, you can start building an app to control lights, the garage, or anything else you want.

Awesome but don't think my patents would let me wire **** up and I don't have a lenix box.

Sent From My HTC Evo 4G Using Tapa Talk Pro!
22nd October 2010, 11:06 PM   |  #5  
JsChiSurf's Avatar
OP Recognized Developer
Hacksville
Thanks Meter: 1,230
 
2,334 posts
Join Date:Joined: Feb 2010
Donate to Me
Quote:
Originally Posted by Rydah805

Awesome but don't think my patents would let me wire **** up and I don't have a lenix box.

Sent From My HTC Evo 4G Using Tapa Talk Pro!

This is just my specific setup, but you could have any type of environment, just depends on what you have / know how to use, etc.

At any rate, thought it was a fun project that, for no other reason, would hopefully inspire others to try it out, or do something similar, if they have the wherewithal.
22nd October 2010, 11:38 PM   |  #6  
Senior Member
Northern NJ
Thanks Meter: 673
 
2,335 posts
Join Date:Joined: Jul 2010
Donate to Me
More
This...is AWESOME! I don't blame you for wanting to show off - this what android and open source is all about!

Sent from my blah blah blah blah
22nd October 2010, 11:43 PM   |  #7  
JsChiSurf's Avatar
OP Recognized Developer
Hacksville
Thanks Meter: 1,230
 
2,334 posts
Join Date:Joined: Feb 2010
Donate to Me
Quote:
Originally Posted by fachadick

This...is AWESOME! I don't blame you for wanting to show off - this what android and open source is all about!

Sent from my blah blah blah blah

Ha, thanks! It was fun to do, and very rewarding when it all came together, seeing the door open/close on the inaugural button press .
22nd October 2010, 11:54 PM   |  #8  
jagox5's Avatar
Senior Member
Thanks Meter: 16
 
154 posts
Join Date:Joined: Jun 2007
More
wow
wow nice job!
23rd October 2010, 01:14 AM   |  #9  
Sporkman's Avatar
Senior Member
Thanks Meter: 3
 
2,598 posts
Join Date:Joined: Mar 2009
that was pure win !!! nice work !
23rd October 2010, 01:23 AM   |  #10  
JsChiSurf's Avatar
OP Recognized Developer
Hacksville
Thanks Meter: 1,230
 
2,334 posts
Join Date:Joined: Feb 2010
Donate to Me
Quote:
Originally Posted by Sporkman

that was pure win !!! nice work !

Thanks. The discerning eye will notice that it's speaker cable wire that I used to hook up the relay to the opener. Didn't have any "standard" low voltage wire lying around, so I made due with the speaker cable .

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes