This week we’re breaking out the breadboard for an oldschool Hak5 mod — the Internet enabled garage door opener. Because when it comes to garage entry, what could be easier than writing an Android app to access a home Apache server, hitting a PHP script that interfaces with a USB Teensy over serial, activating relays connected to a remote. Duh.

Download HD Download MP4 Download XviD Download WMV

Garage Door Opener

void setup()
{
  Serial.begin(9600); // USB is always 12 Mbit/sec
  pinMode(17,OUTPUT); //Door
  pinMode(18,OUTPUT); //Gate
}

void loop()
{
   char c = Serial.read();
   
  if(c == '0')
  {
    //open door
    Serial.println("Open Door and Gate");
    openDoor(18,1000);
    openDoor(17,1000);
  }
  if(c == '1')
  {
    //open door
    openDoor(17,1000);
  }
  if(c == '2')
  {
    //open gate
    openDoor(18,1000);
  }
}

void openDoor(int pin,int d){
  digitalWrite(pin, HIGH);
  delay(d);
  //stop opening doors
  digitalWrite(pin, LOW);
}

If you want to know the latest on Hak5 be sure to follow us on Twitter or Facebook.

Also, now is also a great time to grab some swag from the HakShop – including the new airport friendly WiFi Pineapple with free world-wide shipping.

And finally if you’d like to suggest a topic for a future show feel free to hit up feedback@hak5.org

Leave a Reply

Your email address will not be published. Required fields are marked *

*

30 Comments

  • Can you post the code for Teensy and PHP?

    • It’s in the show notes now.

      • Alex Palmer 3 years ago

        Where are the show notes? I see the teensy C code but cannot find the PHP code.

        Thanks,
        Alex

        • Still looking for the PHP code for the garage door opener project. I’ve got my teeny up and running, and am ready to start the php part of this.
          Thanks,
          rob

      • Tikko 3 years ago

        I also would like the PHP code and don’t see it ?

  • Great segment, but Aqua Net.. What’s up with that?

  • [3w'Sparky] 3 years ago

    on next weeks one you should make an audio level meter that sits next to the camera so you know that your mics are working :o)

    i like the sound of linking electronics to PC’s

    i thought we were going to see the pineapple using some cgi-bin todo this

    tiny network powered switching

  • simon 3 years ago

    domain dot com is the worst host i have ever had the misfortune of giving money to
    they have no support
    my dns has been hijacked before it even went online
    do not waste your money with them, godaddy is better(lol)

    this spam filter is too strong as can be seen by teh number of comments, all probably about how domain dot com ripped people off

    snubs is cute so no killing rampage yet…

    • simon 3 years ago

      big wow, my bad

      MY ISP’S DNS WAS COMPROMISED thus directing just MY domain to some shady holding pages
      changed to googles dns servers – 8.8.8.8 and its all fine now

      I REPEAT IGNORE TEH ABOVE OK THEIR SUPPORT STILL HASN’T REPLIED BUT REALLY THEY HAD NO NEED TO.

      guys feel free to delete both of these posts

      lol@me being the crazy guy (i’m normally taking the c r a p )

      mmm snubs is hot :)

      • simon 3 years ago

        //update

        dns issue has been sorted with the isp
        but
        so many issues with domain dot com that they ahven’t even replied to yet that i’ve cancelled everything and moved to go-daddy
        cheaper, faster page times and was fully setup without a single issue in 3 hours

        only prblem is i had to register the .net name as domin dot com wont let teh transfer of new domains for 60days so i’m using their url forward to forward teh doamin they have till the 60 dyas is up
        i will never use them again, for the difference in performance, lack of support and generally all round suckyness. they suck

        i now have huge doubts over this show as you constantly peddle this crap – are you sell outs or just really poor?
        goto stuff is good
        you need a camera man with headphones if mike pack batteries can spoil a take
        darren your ideas are good, your a fellow biker but your bad domain advice just cost me money and time.

        snubs, youre still awesome ;)

  • Castro 3 years ago

    I think it’s a bunch of crap that you use Go To Meeting in the show because they are an advertiser and have a video call where they dont offer that feature. Dont you think we notice that you are using Skype for the video part. This is why I dont like regular TV because they are a bunch of liars, dont turn into that crap. Love the show, is it me or is the last 1/2 and this season look like this show is falling apart. I dont see a season 9 if this continues…….

    • We use Go To Meeting in the show because it allows us to easily pass the screen sharing back and forth. As it is currently the cast is quite separated! As for the video we either each record locally and transfer the video files or we’ll hop on Skype and I’ll use Vidblaster to switch cameras. I’ve never intended to imply that GTM has video features. I hope that wasn’t misleading but it is a video podcast. For example, last GTM round-table Shannon has multiple camera angles — I figured that was obviously not a Citrix feature.

      As for Season 9, it’s shaping up to be the best yet. We have some killer long term projects in the works that are going to totally kick butt. With Shannon moving out here and a proper set/studio getting back in place we’ll finally get back to what we had in Virginia. I appreciate everyones support during this time of transition and I’m sure if you stick with us you’ll see that our hearts are in the right place.

      • ph33rlus 3 years ago

        Hey Darren,

        I’ve been a Hak5 Fan for years, love the show!

        Just wondering what happened to “We’ll make it up next week” Regarding the Garage Door segment.

        We still haven’t seen any breadboard and relay action!

        :P

    • It is a bunch of crap – WEBEX – is the only one that offers linux compatible version.

      • Webex is iffy on Linux. They *claim* to support Linux, but the Linux version, when it works, supports less functionality.

        I usually have to spin up a Windows VM in order to use Webex from my Linux laptop.

        The old Hak5 sponsor DimDim does have working Linux support and they’re improving, but it still doesn’t match Webex on Windows. (Also, DimDim is completely free which is a big plus.)

        Also, not quite a complete solution, but YuuGuu works very well, for what it does, on both Windows and Linux. I have found YuuGuu is the most reliable way to do screen sharing and remote assistance on Linux with people who are not tech-savvy.

  • I love the “If we’re stuck out here because of a semi-colon… I swear!!” haha!

  • Here I was hoping for a garage door signal brute forcer :(

    But still good :)

  • Just wanted to tell you Clowns thx fir disabling my ability to vote
    I can see you dislike truth. Anyway keep up the good work at running the Circus you call hak5. Cause you are all a awesome bunch of Clowns

  • Darren,
    I’m setting up my own studio at home this fall and was wondering if you ever take viewer submissions for video segments?
    Keep up the good work and I look forward to Hak5 every week.

  • hee Darren,

    When is episode 806 comming online?

    Davy

  • Hey,

    I was excited about this project but where is the discussion of the hardware end of all of this? Either I am not finding the show notes or what is being put up as show notes needs a lot of work. Writing a 3-4 sentence synopsis is not show notes. The show notes should have a full discussion of all the topics with links to code, where to buy the hardware or links to descriptions of the hardware workings if people want to learn more, schematics, etc.

    Am I just missing something here?!?!

    Thanks!

    • I agree there show notes should show have a parts list, beside this episode cuts out. Leaving us hanging!

  • Krister 3 years ago

    If I were show notes, where would I be?

    Am i missing something?

  • Where do we get the breadboard diagrams?

  • Are you sure the output pins are in PWM mode….they look like they are set up for normal digital I/O?

  • Wayne 3 years ago

    Does anyone have the PHP code for this? I can’t get mine to work. THX