[{"data":1,"prerenderedAt":901},["ShallowReactive",2],{"i-lucide:menu":3,"i-lucide:arrow-up-right":8,"i-lucide:moon":10,"i-lucide:sun":12,"i-lucide:rss":14,"i-simple-icons:github":16,"i-simple-icons:linkedin":18,"post-\u002F2015\u002Foffice-prank-building-a-secondary-remote-to-a-wireless-doorbell":21,"surround-\u002F2015\u002Foffice-prank-building-a-secondary-remote-to-a-wireless-doorbell":888,"i-lucide:arrow-left":897,"i-lucide:arrow-right":899},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 7h10v10M7 17L17 7\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":11},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":13},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"4\"\u002F>\u003Cpath d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":15},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16\"\u002F>\u003Ccircle cx=\"5\" cy=\"19\" r=\"1\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":17},"\u003Cpath fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":19,"hidden":20},"\u003Cpath fill=\"currentColor\" d=\"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z\"\u002F>",true,{"id":22,"title":23,"body":24,"category":875,"comments":876,"date":877,"description":30,"excerpt":876,"extension":878,"image":879,"meta":880,"navigation":20,"path":881,"readingTime":882,"seo":883,"stem":884,"subtitle":885,"tags":876,"wordCount":886,"__hash__":887},"posts\u002F2015\u002Foffice-prank-building-a-secondary-remote-to-a-wireless-doorbell.md","Office Prank: Building A Secondary Remote To A Wireless Doorbell",{"type":25,"value":26,"toc":857},"minimark",[27,31,48,57,65,78,83,106,110,113,131,134,137,140,155,158,172,175,181,186,189,192,195,227,231,240,247,257,260,263,266,272,275,278,497,500,503,506,520,523,537,551,554,562,573,576,582,585,588,591,595,615,619,628,634,637,657,660,666,669,687,693,696,699,709,712,715,730,739,748,761,764,767,770,781,790,796,810,816,821,825,828,843,853],[28,29,30],"p",{},"This is a story about how I pranked my colleagues by building a secondary remote for our wireless office doorbell and used it to perform the classical ding dong ditch prank.",[28,32,33,34,41,42,47],{},"I read about ",[35,36,40],"a",{"href":37,"rel":38},"https:\u002F\u002Ftwitter.com\u002Fsamykamkar",[39],"nofollow","@SamyKamkar","'s ",[35,43,46],{"href":44,"rel":45},"http:\u002F\u002Fsamy.pl\u002Fdingdong",[39],"Digital Ding Dong Ditch"," in December 2014. He's a cool hacker who made a tutorial about building a SMS-controlled Arduino remote for his friend's wireless doorbell.",[28,49,50,51,56],{},"Half a year later our newly renovated office gets a wireless doorbell (",[35,52,55],{"href":53,"rel":54},"http:\u002F\u002Fwww.rev.de\u002Fproduct_4480.ahtml",[39],"REV 0046830","). DING DONG!",[28,58,59,60,64],{},"The plan was to replicate Samy's project in terms of the idea and implementation methodology. I would build a small remote for our doorbell and prank my tech-savvy colleagues by making them open the door only to find no-one there. ",[61,62,63],"strong",{},"Why?"," Because I can. But, seriously:",[66,67,68,72,75],"ul",{},[69,70,71],"li",{},"elaborate pranks are fun",[69,73,74],{},"I like electronics and creating things",[69,76,77],{},"I like learning",[79,80,82],"h2",{"id":81},"the-plan","The Plan",[66,84,85,88,91,94,97,100,103],{},[69,86,87],{},"Find the frequency of the doorbell",[69,89,90],{},"Record the doorbell activation signal",[69,92,93],{},"Build an Arduino prototype for playing back the signal",[69,95,96],{},"Reverse engineer the signal from AM to HEX",[69,98,99],{},"Build the production version of the module",[69,101,102],{},"Build a software trigger",[69,104,105],{},"Have some fun",[79,107,109],{"id":108},"equipment-acquisition","Equipment Acquisition",[28,111,112],{},"For this project to work, I needed two pieces of equipment I did not already own:",[66,114,115,123],{},[69,116,117,122],{},[35,118,121],{"href":119,"rel":120},"https:\u002F\u002Fwww.sparkfun.com\u002Fproducts\u002F10534",[39],"A 434MHz RF Link Transmitter"," for actually transmitting radio signals",[69,124,125,130],{},[35,126,129],{"href":127,"rel":128},"http:\u002F\u002Fwww.banggood.com\u002FUSB2_0-Digital-DVB-T-TV-Tuner-Recorder-Receiver-Stick-RTL-SDR+DAB+FM-p-84565.html",[39],"A SDR receiver dongle"," for recording radio signals from the real remote",[28,132,133],{},"The total cost for those was around 14€, cheap low-quality parts from China suited my needs well enough.",[79,135,87],{"id":136},"find-the-frequency-of-the-doorbell",[28,138,139],{},"Samy's tutorial taught me the basics of how wireless doorbells operate: the button, once pressed, sends out a repeating radio signal. The doorbell \"hears\" this signal and activates. The signal has a specific frequency and pattern that my remote must match in order to activate the doorbell.",[28,141,142,147,151],{},[143,144],"img",{"alt":145,"src":146},"Doorbell from behind","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fdoorbell_back.jpg",[143,148],{"alt":149,"src":150},"Doorbell from the front","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fdoorbell_front.jpg",[143,152],{"alt":153,"src":154},"Doorbell button","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fdoorbell_button.jpg",[28,156,157],{},"The frequency range of the doorbell was easy enough to identify.",[66,159,160,163],{},[69,161,162],{},"The frequency spectrum is regulated by EU and local laws, consumer electronics usually operate on one of the licence-free channels",[69,164,165,166,171],{},"The doorbell actually specified the frequency on the back panel - 434MHz, which is in ",[35,167,170],{"href":168,"rel":169},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FLPD433",[39],"LPD433"," UHF band, typically used in low-range remotes",[79,173,90],{"id":174},"record-the-doorbell-activation-signal",[28,176,177],{},[143,178],{"alt":179,"src":180},"Recording the signal","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Frecording.png",[182,183,185],"h3",{"id":184},"how-can-we-record-radio-signals","How can we record radio signals?",[28,187,188],{},"Radio waves travel through the air all the time, even as you read this, they pass through your body. Man-made radio waves usually carry some sort of encoded information, like music or digital data. You'll need a receiver to read those waves, the simplest of which is your regular FM radio.",[28,190,191],{},"FM radio operates at around ~88...108MHz. The doorbell I wanted to record is at 434MHz, so I needed to come up with something else.",[28,193,194],{},"Obviously, there are other devices for receiving radio signals. Unfortunately, they are either too expensive, difficult to operate or obtain.",[28,196,197,198,203,204,209,210,215,216,215,221,226],{},"Luckily, some clever hackers ",[35,199,202],{"href":200,"rel":201},"http:\u002F\u002Fhackaday.com\u002F2012\u002F03\u002F30\u002Fworking-software-defined-radio-with-a-tv-tuner-card",[39],"figured out a way"," of using cheap USB TV dongles - USB \"sticks\" that you can plug into your PC to turn it into a TV - in a non-standard way as a wide frequency range receivers: SDR-s (",[35,205,208],{"href":206,"rel":207},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSoftware-defined_radio",[39],"Software Defined Radios","). There ",[35,211,214],{"href":212,"rel":213},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=ZuNOD3XWp4A",[39],"are various"," ",[35,217,220],{"href":218,"rel":219},"https:\u002F\u002Flearn.adafruit.com\u002Fgetting-started-with-rtl-sdr-and-sdr-sharp\u002Foverview",[39],"articles",[35,222,225],{"href":223,"rel":224},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=JPShMvHT134",[39],"and talks"," on the web if you want to find out more about SDR.",[182,228,230],{"id":229},"capturing-the-signal","Capturing the signal",[28,232,233,234,239],{},"Once I knew the frequency, I could connect my SDR dongle to my laptop and run ",[35,235,238],{"href":236,"rel":237},"http:\u002F\u002Fgqrx.dk",[39],"a program"," that allowed me to record any radio signals on that frequency. I came to work early, pressed \"record\", rang the doorbell and captured some samples of a valid signal as a WAV file.",[241,242],"iframe",{"width":243,"height":244,"src":245,"frameBorder":246,"allowFullScreen":20},560,315,"https:\u002F\u002Fwww.youtube-nocookie.com\u002Fembed\u002Ff-EamgiVk58","0",[28,248,249,253],{},[143,250],{"alt":251,"src":252},"Recording the signal with a laptop","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Frecording_signal.jpg",[143,254],{"alt":255,"src":256},"The original signal from the doorbell","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Foriginal_signal1.png",[79,258,93],{"id":259},"build-an-arduino-prototype-for-playing-back-the-signal",[28,261,262],{},"I had my signal recording, now I needed a way to play it back: a low-power AM transmitter operating at the 434MHz frequency. In addition, I would need a programmatic way of controlling the transmitter so I could specify the encoded information to send.",[28,264,265],{},"Solution: Arduino Uno + a cheap RF transmitter module.",[28,267,268],{},[143,269],{"alt":270,"src":271},"Arduino prototype","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Farduino_prototype.jpg",[28,273,274],{},"Connecting the module with the Arduino was easy enough: connect power, ground and the data pin and you're done. I used Samy's code as an example and adjusted it to fit my needs.",[28,276,277],{},"The result: I could specify the encoded signal I wanted to send in software and have Arduino actually send it over the air.",[279,280,285],"pre",{"className":281,"code":282,"language":283,"meta":284,"style":284},"language-c shiki shiki-themes github-light github-dark","void singleRing()\n{\n\n  boolean previousLevel = false;\n\n  for (int i = 0; i \u003C SIGNAL_LENGTH - 1; i++)\n  {\n\n    if (previousLevel) {\n      digitalWrite(TX_PIN, LOW);\n    } else {\n      digitalWrite(TX_PIN, HIGH);\n    }\n\n    previousLevel = !previousLevel;\n    delayMicroseconds(triggerSignal[i]);\n  }\n\n  digitalWrite(TX_PIN, LOW);\n}\n","c","",[286,287,288,305,311,317,333,338,382,388,393,402,411,423,431,437,442,456,472,478,483,491],"code",{"__ignoreMap":284},[289,290,293,297,301],"span",{"class":291,"line":292},"line",1,[289,294,296],{"class":295},"szBVR","void",[289,298,300],{"class":299},"sScJk"," singleRing",[289,302,304],{"class":303},"sVt8B","()\n",[289,306,308],{"class":291,"line":307},2,[289,309,310],{"class":303},"{\n",[289,312,314],{"class":291,"line":313},3,[289,315,316],{"emptyLinePlaceholder":20},"\n",[289,318,320,323,326,330],{"class":291,"line":319},4,[289,321,322],{"class":303},"  boolean previousLevel ",[289,324,325],{"class":295},"=",[289,327,329],{"class":328},"sj4cs"," false",[289,331,332],{"class":303},";\n",[289,334,336],{"class":291,"line":335},5,[289,337,316],{"emptyLinePlaceholder":20},[289,339,341,344,347,350,353,355,358,361,364,367,370,373,376,379],{"class":291,"line":340},6,[289,342,343],{"class":295},"  for",[289,345,346],{"class":303}," (",[289,348,349],{"class":295},"int",[289,351,352],{"class":303}," i ",[289,354,325],{"class":295},[289,356,357],{"class":328}," 0",[289,359,360],{"class":303},"; i ",[289,362,363],{"class":295},"\u003C",[289,365,366],{"class":303}," SIGNAL_LENGTH ",[289,368,369],{"class":295},"-",[289,371,372],{"class":328}," 1",[289,374,375],{"class":303},"; i",[289,377,378],{"class":295},"++",[289,380,381],{"class":303},")\n",[289,383,385],{"class":291,"line":384},7,[289,386,387],{"class":303},"  {\n",[289,389,391],{"class":291,"line":390},8,[289,392,316],{"emptyLinePlaceholder":20},[289,394,396,399],{"class":291,"line":395},9,[289,397,398],{"class":295},"    if",[289,400,401],{"class":303}," (previousLevel) {\n",[289,403,405,408],{"class":291,"line":404},10,[289,406,407],{"class":299},"      digitalWrite",[289,409,410],{"class":303},"(TX_PIN, LOW);\n",[289,412,414,417,420],{"class":291,"line":413},11,[289,415,416],{"class":303},"    } ",[289,418,419],{"class":295},"else",[289,421,422],{"class":303}," {\n",[289,424,426,428],{"class":291,"line":425},12,[289,427,407],{"class":299},[289,429,430],{"class":303},"(TX_PIN, HIGH);\n",[289,432,434],{"class":291,"line":433},13,[289,435,436],{"class":303},"    }\n",[289,438,440],{"class":291,"line":439},14,[289,441,316],{"emptyLinePlaceholder":20},[289,443,445,448,450,453],{"class":291,"line":444},15,[289,446,447],{"class":303},"    previousLevel ",[289,449,325],{"class":295},[289,451,452],{"class":295}," !",[289,454,455],{"class":303},"previousLevel;\n",[289,457,459,462,465,469],{"class":291,"line":458},16,[289,460,461],{"class":299},"    delayMicroseconds",[289,463,464],{"class":303},"(",[289,466,468],{"class":467},"s4XuR","triggerSignal",[289,470,471],{"class":303},"[i]);\n",[289,473,475],{"class":291,"line":474},17,[289,476,477],{"class":303},"  }\n",[289,479,481],{"class":291,"line":480},18,[289,482,316],{"emptyLinePlaceholder":20},[289,484,486,489],{"class":291,"line":485},19,[289,487,488],{"class":299},"  digitalWrite",[289,490,410],{"class":303},[289,492,494],{"class":291,"line":493},20,[289,495,496],{"class":303},"}\n",[79,498,96],{"id":499},"reverse-engineer-the-signal-from-am-to-hex",[28,501,502],{},"I had a sample of the 'correct' signal that activated the doorbell and a way of sending arbitrary signals. The next step was to make my Arduino replicate the correct signal that would trigger the doorbell.",[28,504,505],{},"That took half a day. The process went like this:",[66,507,508,517],{},[69,509,510,511,516],{},"Open the original signal in ",[35,512,515],{"href":513,"rel":514},"http:\u002F\u002Faudacityteam.org",[39],"Audacity"," (it's just a WAV file)",[69,518,519],{},"Figure out the pattern - Samy explains how \"high\" and \"low\" levels translate to binary",[28,521,522],{},"Repeat:",[66,524,525,528,531,534],{},[69,526,527],{},"Code the pattern into Arduino",[69,529,530],{},"Play the signal with the Arduino, record the result",[69,532,533],{},"Compare the result against the original",[69,535,536],{},"Adjust timing offsets and delays of the replicated signal until it matches the original",[28,538,539,543,547],{},[143,540],{"alt":541,"src":542},"Various attempts at replicating the signal","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Freplicating_signal1.png",[143,544],{"alt":545,"src":546},"Zoomed in view of replication attempts","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Freplicating_signal2.png",[143,548],{"alt":549,"src":550},"Comparison between the original signal and replication","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fsignal_comparison.png",[28,552,553],{},"The signal for doorbell activation was",[279,555,560],{"className":556,"code":558,"language":559},[557],"language-text","SHORT_UP, SHORT_DOWN, LONG_UP, SHORT_DOWN, LONG_UP, SHORT_DOWN, LONG_UP, LONG_DOWN, SHORT_UP, SHORT_DOWN, LONG_UP, LONG_DOWN, SHORT_UP, LONG_DOWN, SHORT_UP, SHORT_DOWN, LONG_UP, SHORT_DOWN, LONG_UP, SHORT_DOWN, LONG_UP, LONG_DOWN, SHORT_UP, LONG_DOWN, SHORT_UP, LONG_DOWN, SHORT_UP\n","text",[286,561,558],{"__ignoreMap":284},[28,563,564,565,568,569,572],{},"This is ",[286,566,567],{},"0111010011100"," when translated into binary and ",[286,570,571],{},"0E9C"," in HEX notation.",[28,574,575],{},"Once I was reasonably certain I had successfully replicated the original signal, I took the Arduino prototype to the office for a test drive - outside working hours, of course. I powered up the Arduino and the doorbell rang.",[28,577,578,581],{},[61,579,580],{},"Sweet success!"," Up until now, I wasn't sure my plan would even work, it was good to get a proof-of-concept verification.",[79,583,99],{"id":584},"build-the-production-version-of-the-module",[28,586,587],{},"I could have ended the project right there as I had - if somewhat bulky - way of activating the doorbell. However, I wanted to make this portable and build a standalone version.",[28,589,590],{},"The plan: Use an ATtiny85 microcontroller to build a battery-powered version of the remote.",[182,592,594],{"id":593},"requirements","Requirements",[66,596,597,600,603,606,609,612],{},[69,598,599],{},"Runs on a single 3V CR2032 battery",[69,601,602],{},"Uses as little power as possible",[69,604,605],{},"Is physically as small as possible",[69,607,608],{},"Is re-programmable",[69,610,611],{},"Has a manual trigger (button)",[69,613,614],{},"Has header pins for using an external trigger (Raspberry Pi)",[182,616,618],{"id":617},"the-build","The build",[28,620,621,622,627],{},"Building the module from scratch was done over the weekend. I started by drawing up the circuit I wanted to build in ",[35,623,626],{"href":624,"rel":625},"http:\u002F\u002Ffritzing.org\u002Fhome",[39],"Fritzing",".",[28,629,630],{},[143,631],{"alt":632,"src":633},"Schematic of the module","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fschematic.png",[28,635,636],{},"The circuit is quite minimal, but with some added bazang:",[66,638,639,642,645,648,651,654],{},[69,640,641],{},"ON \u002F OFF switch",[69,643,644],{},"A LED for indicating that the transmitter is currently active",[69,646,647],{},"A programmatically controllable LED for blinking every 5 seconds as \"power on\" indicator",[69,649,650],{},"A button for activating the device",[69,652,653],{},"Header pins (PWR \u002F GND \u002F TRIG) for external activation",[69,655,656],{},"ISP header for reprogramming",[28,658,659],{},"Next, prototyping on a breadboard. I got Attiny85 to run on a clock speed of 8MHz, to read the trigger pin and to send the correct signal when activated.",[28,661,662],{},[143,663],{"alt":664,"src":665},"Prototype on a breadboard","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fbreadboard_prototype.jpg",[28,667,668],{},"When I was certain the prototype worked, I took a spare piece of solder-able breadboard and soldered the components onto it. Everything fit very neatly and looked quite good.",[28,670,671,675,679,683],{},[143,672],{"alt":673,"src":674},"Back view of PCB","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fmodule_back.jpg",[143,676],{"alt":677,"src":678},"Front view 1","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fmodule_front1.jpg",[143,680],{"alt":681,"src":682},"Front view 3","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fmodule_front3.jpg",[143,684],{"alt":685,"src":686},"Workbench","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fworking_desk.jpg",[28,688,689],{},[143,690],{"alt":691,"src":692},"Front view 2","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fmodule_front2.jpg",[28,694,695],{},"I tested the connections during and after soldering for shorts and discovered a major fault: the resistance between various IC pins (ATtiny85 I\u002FO pins) was ~20kΩ! This would mean that the board was unusable because of shortages between various signal lines.",[28,697,698],{},"I could discover no solder bridges or shorts so I concluded the problem was in the solder flux I had used liberally during assembly. I took a toothbrush and some rubbing alcohol and gave the module a cleaning bath in the sink. After drying, the problem was solved.",[28,700,701,705],{},[143,702],{"alt":703,"src":704},"Brushing off flux","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fmodule_brushing.jpg",[143,706],{"alt":707,"src":708},"Programming the board","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fmodule_programming.jpg",[79,710,102],{"id":711},"build-a-software-trigger",[28,713,714],{},"I had my pocket-sized doorbell remote that could ring the office doorbell either with a physical press of a button on the module or by external activation (another device activates the active-low input pin on the module).",[28,716,717,718,723,724,729],{},"I wanted to make this even more awesome and activate it remotely via an IM message. My company uses software called ",[35,719,722],{"href":720,"rel":721},"https:\u002F\u002Ffleep.io",[39],"Fleep"," - a competitor to Slack - for in-house communications. I had also set up an instance of ",[35,725,728],{"href":726,"rel":727},"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fhubot",[39],"Hubot",", a chat bot from GitHub. The idea was to make the doorbell ring by telling Hubot (Moonica) to ring the doorbell.",[28,731,732,733,738],{},"This was simple enough to implement. Hubot was already integrated with Fleep (I had ",[35,734,737],{"href":735,"rel":736},"https:\u002F\u002Fgithub.com\u002Fanroots\u002Fhubot-fleep",[39],"written an adapter","), all I needed was for Hubot to pull the trigger pin of the module to LOW when he got the command.",[28,740,741,742,747],{},"I set up a Raspberry Pi and wrote a simple HTTP ",[35,743,746],{"href":744,"rel":745},"https:\u002F\u002Fgithub.com\u002Fanroots\u002Ftiny-doorbell-remote\u002Ftree\u002Fmaster\u002Fapi",[39],"web hook"," on it. The Pi was attached to the module and hooked into LAN, accessible by our in-house Hubot instance. The result: I could send a HTTP POST request to the Pi and it would activate the module, which would send a radio signal to the doorbell.",[28,749,750,751,756,757,760],{},"I ",[35,752,755],{"href":753,"rel":754},"https:\u002F\u002Fgithub.com\u002Fanroots\u002Ftiny-doorbell-remote\u002Ftree\u002Fmaster\u002Fhubot",[39],"wrote a small Hubot script"," that would POST to this HTTP endpoint whenever Hubot heard the command ",[286,758,759],{},"ding-dong"," in any of the chats.",[79,762,105],{"id":763},"have-some-fun",[28,765,766],{},"I used my evil creation once or twice a day for four days, undetected. I would send a Fleep message to Hubot, the doorbell would ring, someone went to open the door and there was no-one there. People were confused and started to expect being pranked.",[28,768,769],{},"Some comments from the people who went to open the door:",[66,771,772,775,778],{},[69,773,774],{},"\"I bet there's another doorbell on the next floor and then the radio waves like...\"",[69,776,777],{},"\"Who's doing this?\"",[69,779,780],{},"\"How is this possible?\"",[28,782,783,784,789],{},"Finally (I'm not ",[35,785,788],{"href":786,"rel":787},"http:\u002F\u002Fdrhorrible.com",[39],"Dr. Horrible"," to keep this up for weeks), I told a colleague about this and he told Hubot to ring the doorbell in the floor chatroom, for everyone to see what's happening.",[28,791,792],{},[143,793],{"alt":794,"src":795},"Activating the doorbell from Fleep","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Ffleep.png",[66,797,798,801,804,807],{},[69,799,800],{},"\"So it is Moonica [Hubot]!\"",[69,802,803],{},"\"Enough of this nonsense, you people aren't the ones who normally open the door\"",[69,805,806],{},"\"So this month' fun prize goes to Ando - I guess :)\"",[69,808,809],{},"\"((Y)) impressive prank and implementation, nerdy stuff\"",[28,811,812],{},[143,813],{"alt":814,"src":815},"Meme","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fmeme.png",[28,817,818],{},[61,819,820],{},"Muahahaaa!",[79,822,824],{"id":823},"references","References",[28,826,827],{},"All the project files - hardware schematics, firmware, Hubot script and HTTP POST hook - are published on GitHub. @samykamkar, thank you for the original idea and a tutorial, this wouldn't have happened without your input.",[66,829,830,837],{},[69,831,832],{},[35,833,836],{"href":834,"rel":835},"https:\u002F\u002Fgithub.com\u002Fanroots\u002Ftiny-doorbell-remote",[39],"Code @ GitHub",[69,838,839],{},[35,840,842],{"href":44,"rel":841},[39],"Samy Kamkar's original doorbell project",[28,844,845],{},[846,847,848,849,627],"em",{},"Update: two years after this, ",[35,850,852],{"href":851},"\u002F2017\u002Fsnarky-doorbell","I built a IoT smart doorbell",[854,855,856],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":284,"searchDepth":307,"depth":307,"links":858},[859,860,861,862,866,867,868,872,873,874],{"id":81,"depth":307,"text":82},{"id":108,"depth":307,"text":109},{"id":136,"depth":307,"text":87},{"id":174,"depth":307,"text":90,"children":863},[864,865],{"id":184,"depth":313,"text":185},{"id":229,"depth":313,"text":230},{"id":259,"depth":307,"text":93},{"id":499,"depth":307,"text":96},{"id":584,"depth":307,"text":99,"children":869},[870,871],{"id":593,"depth":313,"text":594},{"id":617,"depth":313,"text":618},{"id":711,"depth":307,"text":102},{"id":763,"depth":307,"text":105},{"id":823,"depth":307,"text":824},"Projects",null,"2015-09-05","md","\u002Fcontent\u002F2015\u002F09\u002Fdoorbell\u002Fheader.png",{},"\u002F2015\u002Foffice-prank-building-a-secondary-remote-to-a-wireless-doorbell","about 10 minutes",{"title":23,"description":30},"2015\u002Foffice-prank-building-a-secondary-remote-to-a-wireless-doorbell","Attiny85 RF Transmitter Module",1843,"YoQgTPy-uIHrFO-Vsva6j_jFDx4zNuElsFTuHsv114w",[889,893],{"title":890,"path":891,"stem":892,"children":-1},"HipChat, Slack and Fleep Sit In A Bar...","\u002F2015\u002Fhipchat-slack-and-fleep-sit-in-a-bar","2015\u002Fhipchat-slack-and-fleep-sit-in-a-bar",{"title":894,"path":895,"stem":896,"children":-1},"Wipe Your Phone Before Handing It Over","\u002F2016\u002Fwipe-your-phone-before-handing-it-over","2016\u002Fwipe-your-phone-before-handing-it-over",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":898},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":900},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7l7 7l-7 7\"\u002F>",1790886933636]