Main > Diary > Technology

« DanceShanty | Main | XBee Pulse I/O »

February 1, 2012

XBee Garage Door

Introduction

The XBee Garage Door is an automation project which allows you to connect your automatic garage door lift to your mobile telephone via an Android or a mobile web application. This project was featured in Make Magazine Vol. 30 in the article "12,000-mile .

The XBee Garage Door project uses a Digi XBee to communicate and attaches to the door using a hardware design called the XBee Pulse I/O—a general purpose, open-source hardware design for simple automation projects.

xgd_rumble_rumble.png

There are four components to making your own XBee Garage Door:

  1. An Breadboarded or populated printed circuit board (PCB) XBee Pulse I/O
  2. A door-closure sensor and length of wire to connect to your existing automatic garage door lift button
  3. A ConnectPort X gateway running the XIG application or a computer running the XIG with an XBee module attached
  4. Using the Android or Web application to monitor and control your door remotely

Building Your Own XBee Pulse I/O Board

You can build your own your XBee Pulse I/O from a prepared PCB or by breadboarding your own. Complete instructions are available on the XBee Pulse I/O page.

Attaching the Sensors and Garage Door Lift

Installing the XBee Pulse I/O into your garage is easy. Follow these simple steps:

  1. Affix the free end of the door closure sensor to the bottom of your garage door
  2. Attach lead wires to the other half of the sensor; attach it to the wall opposite the sensor when the door is in the fully closed position.
  3. Connect this sensor to input 1 of the XBee Pulse I/O PCB, or between XBee pin AD1 and ground on the PCB.
  4. Attach two wires in parallel to the button used to open your garage door
  5. Attach the other side of these two wires to the pulsed output of the XBee Pulse I/O or between the normally open and common terminals of the relay on your breadboard.
  6. Power the XBee Pulse I/O with 4.5v-9v power.
  7. You're done installing!

Obtaining the XIG and Using a Gateway

Obtain a Digi ConnectPort X2 gateway from someplace such as SparkFun or order a second XBee Series 2 module and attach it to your computer using a USB or serial adapter such as the SparkFun XBee Explorer USB.

Download and install the XBee Internet Gateway from the XIG site on Google Code and follow the documentation to get the XIG running on your Digi ConnectPort gateway or PC.

Using the Android or Web Application

If you have an Android phone install this application from the Android Market. The source for the application can be found on the GitHub repository jordanh/xbee-garage-door-android.

If you have another smartphone or if you'll be experimenting with a web browser, use this website. The source, by Margaret McKenna, can be found on GitHub.

Next follow these steps:

  1. Create a free developer account on iDigi, the iDigi webservice will be used to connect your gateway and make it securely accessible from anywhere. This will make it so not just anybody can control your garage door.
  2. Add your gateway to the iDigi Device List by using the "plus" button, selecting "Add Manually" and then choosing your Digi ConnectPort gateway (found on a sticker on the gateway) or XIG-on-a-PC's MAC address (found in the UI)
  3. Start the Android or navigate to the web application
  4. Select your gateways device id as it is specified from the iDigi device list
  5. Select the XBee address which is installed in the XBee Pulse I/O attache to your garage door lift
  6. Voila! you can now monitor and control your garage door from anywhere!

Posted by jordanh at February 1, 2012 5:14 PM |

Trackback Pings

TrackBack URL for this entry:
http://jordan.husney.com/mt/mt-tb.cgi/413.

Comments

Hi,
really nice project, and can be extended to have control over lots of electric devices at home.
I have worked on a project where I used a ZigBee mesh network. I am planning to extend that project by uploading the information from the network to the internet. I have already got the ConnectPort X2, but I have one problem. The XIG code works only for AT mode while my XBEE modules work with API mode.
I would highly appreciate an advice from you on how to resolve this issue.

Regards,
Musab

Posted by: Musab at May 8, 2012 2:50 AM

Hi Musab,

Thank you for the kudos,

You may absolutely use the XIG with an API mode radio in addition to an AT mode radio. The XIG will work just fine. Instead of transmitting and receiving unpacketized serial data you'll be sending and receiving X-API Explicit TX and Explicit RX frames. When using the XIG with API mode radios you'll have to be aware of the XBee X-API payload size limit and therefore if you ask the XIG to fetch a URL that is longer than the payload you'll have to break it up into two packets. For example:

ExplicitTX("http://www.example.com/some/very/lar")
ExplicitTX("ge/url/file.txt\r\n")


Jordan

Posted by: Jordan at May 8, 2012 7:31 AM

Hi,
I have successful connected my zigbee network to the internet through the gateway. I can retrieve data from the internet. But this is not exactly what I want. I would like to be able to make the gateway write to a php file.

I have already made an android app that reads from a php file (i.e from the Zigbee network).

Is that possible with XIG ?
also, can I use idigi developer cloud as a server to upload the php file?

Your suggestions are highly appreciated.
Thanks,

Posted by: Musab at May 11, 2012 8:26 AM

You really have two options to upload data from an XBee module connected to the XIG. The first would be to access a URL of a server script (such as a PHP script) by calling a URL with parameters:

http://myserver.net/somescript?name='sample'&value=42

Or, uploading the data to iDigi via the idigi_data command of the XIG:

idigi_data:names=sample&values=42

Then asking iDigi from your web-server script (i.e. your PHP script) for all of the the data occasionally:

(from PHP) GET http://developer.idigi.com/ws/DiaChannelDataHistoryFull

You cannot host your PHP script up on iDigi. iDigi is a cloud service to connect to devices (such as the ConnectPort gateway and XBee modues). It doesn't host web scripts.

I hope that helps!

Posted by: Jordan at May 11, 2012 9:47 AM

Thanks

one final question. Is the Android app an open source ? . If it is, can email it to me please.

Regards

Posted by: Musab at May 15, 2012 6:08 PM

Hi Musab. I've posted the Android source code here: https://github.com/jordanh/xbee-garage-door-android

It's also referenced up above in the article. Please check back if you have any questions!

Posted by: Jordan at May 19, 2012 3:04 AM

Hello. I’m contemplating a project whereby I could use a web interface to command my remotely-controlled awning to a certain opening position, say 0%, 25%, and 100% open. This would allow me, say from work, to close the awning if the wind picks up. Initial thought is to send a 4-bit word with the percentage "open" to the receiver unit, which would use a timer to command OPEN and then after X seconds command STOP. Might your system work for something like this?

Posted by: Steve Wourms [TypeKey Profile Page] at June 5, 2012 5:37 PM

Hi Steve, you positively could use the basis of what I've developed in order to automate your awning! The approach I would take is to find an existing electric awning system (or, if you're very ambitious design your own!) and begin by using my electronic design to control the fully open, fully closed operation of the awning.

From there, I'd consider adding some intelligence to the system in the form of a Arduino or Digi XBee Programmable based design that would control the amount of the awning is open. It'll be easy to send a string from the Internet to the awning via iDigi to the ConnectPort gateway running the XBee Internet Gateway. As you suggested, you can send a simple command string such as a 4-bit word or even something such as simple string such as "0" (closed) "20" (20% open) or "100" (all the way open).

You'll have to investigate whether this is best controlled by running the motor for a time interval or actually adding sensors to the awning for some real feedback.

Let me know how your project progresses and as you hit bumps we can talk them out.

J

Posted by: Jordan at June 6, 2012 12:40 AM

I'm sorry if I just cut in the conversation but it'd be really easy if the awing has a motor just to add an encoder or a turn counter to the main rotary axis and then just count the amount of turns it takes to get to each of the desired positions, then it's just a matter of counting up or down. It'll be an open system but definitely easier than adding multiple sensors in the path of the awing, again sorry to intrude just my opinion, the awesome project by the way

Posted by: Andrés Provero at June 18, 2012 11:10 AM

The log-in url needs to point to the new US device cloud log-in @mydigi.com, since the merging of the devolpment cloud and device cloud after 8/1/12. I can't seem to register for an account and log-in using this app. I love to start using this.

Posted by: David DeMambro at September 5, 2012 5:31 PM

I downloaded the source, changed the log-in url, and recompiled. Now I can open and close the garage door, but I have not had any luck in getting the input to work. I built a dual relay IO pulse and I have the reed switch hooked into port 3. I checked the input with a multimeter and I get 3.3vdc when open and 0 vdc when closed. Could I have broken something, in the app, when recompiling?

Thanks,
David

Posted by: David DeMambro at September 11, 2012 9:02 PM

David - what log-in URL did you use? I tried 'my.idigi.com', but that didn't work.
Thanks,
Hans

Posted by: Anonymous at September 18, 2012 2:06 AM

Hans,
I used "my.idigi.com". Just like you have. I had to change it in line 31 of the App.java file, for the android app, and in my connectport. If you are trying to log into the Europe cloud, its "my.idigi.uk.co"

I haven't been able to get the input to work, but the door opens and closes. Still working on it.

Posted by: david at September 23, 2012 3:50 AM

I found that the input does work and the xig is getting the status, by issuing an "IS" command using rci callback. At this point I, think I have to look in the app. Does anyone have this working and could you provide advice?

Thanks,
David

Posted by: David Demambro at October 7, 2012 8:17 AM

Thinking I want to get after this project. Do you have any updates? Thanks.

Posted by: steve at February 2, 2014 1:31 PM

Post a comment




Remember Me?