Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Reed Cliff Cortez
Published © LGPL

Wireless Doorbell on Raspberry Pi

A wireless doorbell that when pressed, alerts the user and takes a picture of who pressed it.

BeginnerShowcase (no instructions)4,356
Wireless Doorbell on Raspberry Pi

Things used in this project

Hardware components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1

Software apps and online services

Node-RED
Node-RED

Hand tools and fabrication machines

Wireless Doorbell
The one used on the project: https://www.heath-zenith.com/system/spree/products/637/large/SL-7751-02_HR.png?1435269867

Story

Read more

Schematics

Node Red Flow

Code

Doorbell node flow

JSON
Import it to your node red flow
[{"id":"a7008cbc.39fbc","type":"function","z":"da480e4e.dbf1c","name":"joined function","func":"var date = Date(msg.payload);\nvar msg1 = {payload: \"Someone pressed the doorbell at\"};\nvar msg2 = {payload: date.toString() };\n\nreturn [[msg1,msg2]];","outputs":1,"noerr":0,"x":284,"y":216,"wires":[["aa75a767.349cb8"]]},{"id":"aa75a767.349cb8","type":"join","z":"da480e4e.dbf1c","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","timeout":"1","count":"2","x":417,"y":130,"wires":[["77aafc39.592734","b8cbbf9.512394","76c90670.8fffd8","ed553962.72d508"]]},{"id":"77aafc39.592734","type":"debug","z":"da480e4e.dbf1c","name":"","active":true,"console":"false","complete":"payload","x":577,"y":25,"wires":[]},{"id":"5672b37d.d4d97c","type":"camerapi-takephoto","z":"da480e4e.dbf1c","filemode":"0","filename":"msg.payload","filedefpath":"1","filepath":"","fileformat":"jpeg","resolution":"1","rotation":"0","fliph":"0","flipv":"0","brightness":"50","contrast":"0","sharpness":"0","imageeffect":"none","name":"photo","x":513,"y":484,"wires":[["ba6859cf.caf408"]]},{"id":"f19ad4b9.69df58","type":"mysql","z":"da480e4e.dbf1c","mydb":"6e9ee2e7.a9248c","name":"mysql","x":1110,"y":45,"wires":[[]]},{"id":"a95d8945.bbac68","type":"comment","z":"da480e4e.dbf1c","name":"Sends SMS","info":"When the button is press this flow sends an SMS to your phone","x":677,"y":317,"wires":[]},{"id":"c3f7eed4.44b31","type":"cloudant out","z":"da480e4e.dbf1c","name":"","cloudant":"27877848.f28de8","database":"iot","service":"_ext_","payonly":false,"operation":"insert","x":594,"y":162,"wires":[]},{"id":"b1734910.3cea78","type":"comment","z":"da480e4e.dbf1c","name":"Takes Photo","info":"Takes a picture with the camera pi as soon as the doorbell is pressed","x":842,"y":494,"wires":[]},{"id":"f1421cb1.27fab","type":"rpi-gpio in","z":"da480e4e.dbf1c","name":"","pin":"15","intype":"up","debounce":"100","read":false,"x":127,"y":359,"wires":[["a7008cbc.39fbc","550139e1.ddd988"]]},{"id":"b8cbbf9.512394","type":"file","z":"da480e4e.dbf1c","name":"File Log","filename":"/home/pi/Desktop/log","appendNewline":true,"createDir":true,"overwriteFile":"false","x":589,"y":67,"wires":[]},{"id":"7530ea11.7c7554","type":"comment","z":"da480e4e.dbf1c","name":"Log/Database","info":"Debugs msg.payload to debug screen, File log (//home/pi/Desktop/log) and mysql database\n","x":745,"y":98,"wires":[]},{"id":"37708231.a3ca5e","type":"mqtt out","z":"da480e4e.dbf1c","name":"","topic":"door","qos":"","retain":"","broker":"260e1bcf.1813f4","x":593,"y":108,"wires":[]},{"id":"80acbba8.c77ce8","type":"mqtt in","z":"da480e4e.dbf1c","name":"","topic":"door","qos":"2","broker":"260e1bcf.1813f4","x":935,"y":68,"wires":[["f19ad4b9.69df58"]]},{"id":"550139e1.ddd988","type":"camerapi-takephoto","z":"da480e4e.dbf1c","filemode":"2","filename":"","filedefpath":"1","filepath":"","fileformat":"jpeg","resolution":"1","rotation":"0","fliph":"0","flipv":"0","brightness":"50","contrast":"0","sharpness":"0","imageeffect":"none","name":"pic","x":365,"y":488,"wires":[["5672b37d.d4d97c"]]},{"id":"ba6859cf.caf408","type":"e-mail","z":"da480e4e.dbf1c","server":"smtp-mail.outlook.com","port":"587","secure":false,"name":"reedcortez@hotmail.com","dname":"email","x":695,"y":489,"wires":[]},{"id":"ed553962.72d508","type":"twilio out","z":"da480e4e.dbf1c","service":"_ext_","twilio":"fcb0b4d0.21af78","from":"","number":"6478712802","name":"sms","x":556,"y":284,"wires":[]},{"id":"76c90670.8fffd8","type":"file in","z":"da480e4e.dbf1c","name":"","filename":"/home/pi/Desktop/log","format":"utf8","x":643,"y":230,"wires":[["b0d1c94c.605078"]]},{"id":"b0d1c94c.605078","type":"ui_toast","z":"da480e4e.dbf1c","position":"top right","displayTime":"3","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":829,"y":181,"wires":[]},{"id":"6e9ee2e7.a9248c","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"image","tz":"Eastern"},{"id":"27877848.f28de8","type":"cloudant","z":"","host":"raidencliff.cloudant.com","name":"cloudant"},{"id":"260e1bcf.1813f4","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"fcb0b4d0.21af78","type":"twilio-api","z":"","sid":"AC01fd8d726cd0530473ea982d555a34e2","from":"6475565548","name":""}]

Credits

Reed Cliff Cortez
-1 projects • 1 follower
Engineering Student at George Brown College
Thanks to Nicolas Te and ahmad kattab.

Comments