Blink Thrice To Let Me In

Automatic garage door opener

Now here’s a really cool home hack. [Luis Rodrigues] has automated his garage door to open, simply by flashing his headlights at it.

But wait, doesn’t that mean anyone could break into his house? Nope. At first we thought he had just added some photo-sensors and a bit of computer logic in order to turn a pattern of lights into an output to open the garage, but no, it’s actually specific to his car only. Which is awesome because if anyone ever tried to copy him to break in, all they break into is a very confused state of mind.

You see how it actually works is the headlight output is connected to a control box under the hood of his car. A Moteino (RF Arduino variant) reads the input signal of the headlights flashing three times, and then communicates wirelessly to the garage door in order to open it.

But [Luis] also has a gate outside his property — so if you hold the lights on for a second, both the garage door and the external gate will open as well.

Pretty awesome — mind you, is a garage door button really that much harder to use? This is definitely safer if someone steals your car and happens to have your address though!

52 thoughts on “Blink Thrice To Let Me In

  1. So basically he may as well have used a store bought push button wireless thing, it really has nothing to do with the headlights.

    I would have at least experimented with doing time or intensity to send the pass code through the lights themselves…

    1. You didn’t get it at all. All this project is about is the bright (hehe) idea to use the headlight flashing recognition _in the car_ to save the extra button. Also: Using a headlight pattern is imho too easy to record and play back.

      1. Not sure you got it either Mike… Using a headlight pattern is too easy to record? Recording the pattern wouldn’t do anything because it’s not actually sensing the lights. The control module inside the car notices the light pattern and sends a wireless signal to open the door.

        1. Mike means it “would be” too easy to record and play back. If the headlight flashing actually did encode the signal.

          Which it wouldn’t, really. Who carries round a light-recorder with them? Building one would be easy, but would be a lot of effort just to steal one car somewhere in the world.

          1. @Tony, sorry I accidentally clicked the report button on you, meant to reply. Anyway, the recording of the lights would be kind of a wasted effort wouldn’t it? If someone really wanted in they could just drive into the door couldn’t they? It is kind of intended to keep honest people honest.

          2. A video camera, at 50FPS. And I suppose you’d just turn the screen up really bright and point it at the light sensor? I can think of several really obvious reasons that wouldn’t work. Number one would be flashes less than 1/50th (or 1/60th) of a second.

    2. Which could in turn be repeated by an outside observer to gain access to his property…
      This way, his solution doesn’t provide less security than the original fob, while still seeming curious and strange from the outside.

    3. You mean those boxes that get clipped to the sunvisor? Those boxes that any thief would recognise with a simple glance through the very breakable window and could use to enter the garage should he ever park on the driveway?

      With his solution there is nothing obvious for the thief to see. It’s not perfect. If the thief is a neighbor he might make the connection that the blinking lights have something to do with opening the door. But thief still has to figure out that it HAS to be his own car. Then he has to somehow flash the lights without the car key. Modern cars are very hard to hotwire as the wires travel through the steering column which is built almost like a safe.

    4. To make it completely automated you would need
      A sensor that detects that the car is in garage.
      A sensor that detects the car turning on.
      A sensor that detects the car being started.
      a Compas
      bluetooth or a radio link.
      and maybe a link to the ODBCII bus.
      If car is in garage and you turn on the key open garage.
      If car is in the garage and you turn off the key close garage.
      If you are approaching the gate to leave “GPS location and compass direction” open gate.
      Gate closes when radio link is out of range.
      If you are approaching the gate to come home same as above.
      Same logic to open the garage door.

  2. If he’d have looked up, while sitting in the driver’s seat of his Audi, he might have noticed the three built-in programmable buttons designed to open such things as gates and garage doors. Bet his next project will be to turn on the TV by clapping morse code.

    OK, that’s harsh, but a little true. If you don’t have a built in garage door opener, this is an impressive hack that might even make your non-geek friends pay attention.

    … But if someone steals your car, has your address, knows when you’re not home, and drives a stolen car to your house, do you think they’ll call it a day when they can’t figure out the garage door opener?

    I’ll let you know when I get my gate working w/ RF or geo-fencing, so it’s open when I get there.

        1. Well yeah, I could have figured that out myself. I just wondered if anyone, for example impressiver, could tell me here. I’m curious as to how a manufacturer might implement such a thing (CAN bus? Empty switch terminals?), but I’m not actually gonna build it. I don’t have an Audi for one thing.

    1. My car doesn’t have those nice buttons. It was an extra that was not installed. My TV turns on when I say “Turn the TV on”. And I can also tell my house automation system to select a specific channel. In Portuguese.

  3. If only he’d have looked up, while sitting in the driver’s seat of his Audi, and found the three built-in programmable RF buttons for things like garage doors and gates. OK, that’s harsh, but a little true. This hack would be slick, and one that might actually impress your non-geek friends, if you didn’t already have something easier built into your car.

    … and James: if someone steals your car, finds your address, and drives a stolen car to your property, what do you think the chances are they’ll call it a day when the button in the console doesn’t open the garage?

  4. And now that nature is putting on light shows again, strikkke-open?
    Gated spaces should have their own police, fire, and, medical emergency operations. Also maintenance and service, even piano tuning.

    1. I don’t live in a gated community. Hell, most of the world lives ‘out there.’ Unless you are being sarcastic, I’m truly concerned for why you feel they deserve their own emergency services. God forbid an ambulance comes to pick up someone because they had a bad reaction to botox. It’s unusual, however entirely true, but you are safer being next door to danger than to be down the road.

      1. calm down mcnugget….. calm down…..
        What he is saying is that if you have a gate on your property there should be provisions within the gate access system to allow police, fire, and medical emergency vehicles through the gate so they can actually enter your property if you have need of them. And before you go all postal on people who live in gated communities, some of the nicest people I have ever met while working as a tradesman live behind those gates.

    1. It doesn’t. All the heat does it shift a bit the exact frequency of the transmitter. That could be compensated by a temperature sensor on the control board itself if I wanted to increase the range of the transmission. But The radio is very powerful and as such, no compensation is required and I can still open the doors from the curb.

  5. Nice to see. Clear, and cool hack. Even better because it’s portuguese :) cheers mate.
    The only thing i would switch is the middle code to stop the garage door, i think 3 blinks is to much, and one would be enough.

    I don’t know also the lifetime effect with this kind of “ab”use of headlights but got to say that despite of the technical solution, the clean implementation is impressive.

    I though in the time i was writing that maybe i only would change the headlights by direction lights, and with the bonus of having 3 positions on that lights i could choose the left to open, right to close and all to stop.. or in the case i really need the left and right to turn in or out, using both to open and close..

  6. Nice proof of concept! But look that is not safe, i.e: I’m sorry, you have shown me your license plate and your name “.. Armando Mota ..”, I know you are from Bar..*, looked for your house on street view and by the way, it’s “Salmon” lol.

    Be careful with what you post on the internet ;)

    I’m from Portugal, Oporto :)

    1. I know where my neighbour lives. Right next door. But I can’t get inside his house just because I know where he lives. And if I did without his permission, I would be arrested. Or worse. So what’s your point?

  7. This has me thinking about how this could work using the lights alone without modifying the car.

    Obviously lights alone are insecure. But many cars have BT handsfree, right? BT periodically broadcasts its MAC address, so why not have a BT module with a high gain antenna in the garage polling for the car’s handsfree signal. A photodetector near the garage would look for a pattern of bright light flashes, and if the pattern occurs while the BT address is in range the door opens.

    This isn’t all that secure either if others can clone the address though.

  8. There was a project in an electronics magazine (Popular Electronics??) about a bazillion years ago that not only attempted this but tried “high-speed” modulation of the headlights (remember that these were filament lamps so it must have been in single-digit Hz range) as a means of triggering the door motor. With the new LED car lighting systems coming online, it might be possible to have an encoded light system that would work reasonably well.

    1. As Forrest M Mimms proved, back in the dark ages, you can modulate baseband speech audio over a low-voltage torch bulb (and receive it with a solar cell, but that’s not important right now). You don’t need full light-to-dark modulation, a bit of intensity variation would do. A few hundred baud would seem to be achievable without too much trouble.

      LEDS would probably be even better. But there’s the problem of increasing smartness, is it possible to hack into the LED bulb without pissing off a computer somewhere under the bonnet? Last time I looked it up an average new car contained about 12 separate computers, today it’s probably more than that just to sound the horn. Still, nothing stopping you using infra-red, or radio. Back a bazillion years ago radio was complicated and expensive. Not so much now. I guess power LEDs emit a lot less stray infra-red than incandescent bulbs do.

  9. The ‘lights more than a second’ thing is flawed, sometimes you might turn on the lights for other reasons and it would force the door and gate open, that’s annoying.

  10. Not that it takes away from the hack, but this has existed as a product form for a while in the motorcycle market. I dont remember the name at the moment but its basically a universal garage door opener, but instead of a button to trigger it, it is triggered by 3 on/off electrical pulses. So you can wire it in to your headlight switch, brake lever, rear brake pedal, etc. This way as you approach you dont have to take your hands off the grip and fumble around for an opener. Just feather the brake three times or flip your high beams on/off three times and you’re in.

    It makes a lot of sense for the motorcycle application. As someone pointed out earlier, it makes less sense on a luxury car that has built in openers. BTW, for the guy wanting to know how to program those, they are most likely HomeLink brand and are easy to program. HomeLink makes the electronics and works with vehicle manufacturers to make the modules match the vehicle interior. Their openers support all modern code-hopping protocols & frequencies.

    1. Ah! I think it’s me you’re answering. So the car already contains a radio transmitter for the common frequencies, which are fairly standardised. And to program it, when you buy your door opener, it sends a programming signal to the car’s transmitter, to tell it what the details are. Is that right? Clever! In a small market like garage openers, I suppose a standard like that is easy to implement, being in everyone’s interest, and adding a clever feature that fits in smartly. The sort of extra bonus feature a driver is impressed with. Well, if he’s a man. And a geek!


      1. Not in this project. The car has a micro-controller connected to a radio that has nothing to do with the remotes. The only thing in common is the fact that both work wirelessly. In this project the open or close commands are sent with a specific protocol in accordance to the destination node.

  11. Greetings to the Hackaday community.

    I had no idea that my little project was displayed here nor that it would raise any interest between the Make community.
    This project is a proof of concept of the Moteino capabilities for the Moteino Foruns.

    Simple as it is, It has some level of security embeded in it. And I can also open the gates using my mobile phone because I have a master Moteino (a gateway) that may connect directly to the gates Moteinos, controled by my Home Automation System which I can access from anywhere in the world. I can also check on the position of the garage door, in a scale from 0 to 100%.

    This system does not use the car light itself. It only uses the 12v from the High Beams as digital 1’s that are counted by the Moteino inside the engine bonet. The software in it counts the number of light flashes and how long they take and then sends a command to a destination node via radio, with some level of encryption to control the gates.

    Regarding the comment about the number of flashes being too high to open the garage door, I generally only use a long flash. That is enough to open both the garage and the outer gate doors. Since the garage door can only be sequenced between open, stop, close, stop, each time it is commanded, as soon as it reaches the full open condition all I have to do is to make another long flash to close it. The outer gates receives a open command again but since it is already open, it just closes the garage door. And when I get out of the outer gate, I give it two flashes and it closes the gate.

    I could use the remote control to do this, but as I said before, I wanted to make a proof of concept of the Moteino capabilities.

    Regarding the security of my house, opening the garage door without deactivating the security system first would only trigger a silent alarm if I’m not in the house, or a Siren if I’m in. And it would only be a matter of minutes before an intruder would get a lot of new friends. Jail friends, that is. Also, my Home Automation System (HAS) sends me several warnings regarding the gates. If, for instance, I forget to close the gates and arm the alarm, I get a tweet from the HAS and the door will close on their own.

    I know that there are some commercial devices that do exactly the same. But this one was built by me. And the credit for doing it should go to Felix Russo, the developer of the Moteino. You can find all about the Moteinos here:

    Now go and build something too.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.