{"id":13,"date":"2014-11-06T01:59:06","date_gmt":"2014-11-06T01:59:06","guid":{"rendered":"http:\/\/parablog-wordpress.dockerbox.rei.moe\/?p=13"},"modified":"2016-03-23T00:29:49","modified_gmt":"2016-03-23T00:29:49","slug":"remote-controlled-ceiling-light","status":"publish","type":"post","link":"https:\/\/blog.lewys.eu\/?p=13","title":{"rendered":"DIY Project: Home Automation"},"content":{"rendered":"<p>Update: This project died when I got a job and can afford off the shelf automation stuff :&#8217;)<\/p>\n<p>It might come back when I start adding stuff like blinds and air conditioning control!<\/p>\n<p>&nbsp;<\/p>\n<p>This project is basically me wanting to be able to automate my house but not wanting to fork over heaps of money for pre made systems.<\/p>\n<p>I&#8217;m a bit lazy with details so if there&#8217;s any questions you have please comment below!<\/p>\n<p><strong>Newer Update v2.5<\/strong><\/p>\n<blockquote><p>Ok, so it just occured to me that I could have bent the antenna down flat so that I wouldn&#8217;t have had to make any holes&#8230;.<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090711228.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090711228\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090711228.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">As you can see its all in a box now because reasons plus annoying bright light<\/figcaption><\/figure>\n<p>I got around to making a few changes, I&#8217;ll let the images do the talking for me:<\/p>\n<figure style=\"width: 2000px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090721878.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090721878\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090721878.jpeg\" alt=\"image\" width=\"2000\" height=\"1500\" \/><\/a><figcaption class=\"wp-caption-text\">Used spare LEDs to attach the fan, deal with it. Box had a USB 125khz RFID reader in it heh<\/figcaption><\/figure>\n<figure style=\"width: 1548px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090727439.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090727439\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090727439.jpeg\" alt=\"image\" width=\"1548\" height=\"2064\" \/><\/a><figcaption class=\"wp-caption-text\">Melted the hole for the antenna with soldering iron, then cleaned tip and sliced off excess plastic with stanley knife<\/figcaption><\/figure>\n<figure style=\"width: 1548px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090733737.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090733737\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090733737.jpeg\" alt=\"image\" width=\"1548\" height=\"2064\" \/><\/a><figcaption class=\"wp-caption-text\">single channel relay board now in use to save space<\/figcaption><\/figure>\n<figure style=\"width: 1548px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090749989.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090749989\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090749989.jpeg\" alt=\"image\" width=\"1548\" height=\"2064\" \/><\/a><figcaption class=\"wp-caption-text\">my god i did a crappy solder job on this one D:<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090762197.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090762197\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090762197.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">dem pro cut outs<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090770920.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090770920\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090770920.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">don&#8217;t tell me how crappy the fan cut out is. i know.<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090791850.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090791850\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090791850.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">cables kept getting caught in the fan so i fixed them.<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090802432.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090802432\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090802432.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">close-up of ParaShield with the fan header, and RF module shown.<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090831248.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090831248\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090831248.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">the area that I cut out of the proto shield to fit it over the ethernet jack<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090839897.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090839897\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090839897.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">used a resistor leg for GND to the RF module, now i can tap into GND from that line as well B)<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090857375.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090857375\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090857375.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">blob of blue tack was used to hold things in place while i soldered<\/figcaption><\/figure>\n<figure style=\"width: 2064px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090867473.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1417090867473\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090867473.jpeg\" alt=\"image\" width=\"2064\" height=\"1548\" \/><\/a><figcaption class=\"wp-caption-text\">finally, a nice and snug fit, that looks not like shit! xD<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>A few notable things, white LED on ParaShield (I&#8217;m calling it that now) has been replaced with a less bright red one. Transmitter repositioned and wired a little nicer, Ethernet hole cut (Stanley knife, metal cutters and pliers).<br \/>\nProper helical antenna added to both units, Rx unit now has single channel relay.<br \/>\nAlso, I shoved it all in a box and added a 12v fan running off 5v from the ParaShield (may add fan controls\/monitoring later) so nothing goes wrong with summertime here.<br \/>\nI&#8217;m just waiting for the other 433mhz things to add a manual light switch, and the infrared control unit. Codes all ready but need the RF receiver D:<\/p>\n<p>.<\/p>\n<p>Also, on the app side of things,<br \/>\nI added an all on\/off section so when this projects complete, I&#8217;ll be able to stand out the front of my house, say something awesome, hit a button, and the whole house lights up or goes dark \ud83d\ude00 XD<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417129964268.png\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1417129964268\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417129964268.png\" alt=\"image\" \/><\/a><\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417129971504.png\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1417129971504\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1417129971504.png\" alt=\"image\" \/><\/a><\/p>\n<p>New update V2<br \/>\nSo I discovered this thing:<br \/>\nhttp:\/\/www.ebay.com.au\/itm\/291262467339<\/p>\n<p>I remember reading about this a while ago but didn&#8217;t care for arduino or anything much then.<br \/>\nBut now I&#8217;m looking at this and seeing<br \/>\nThis+Relay+PSU = self contained without need for base controller!<br \/>\nPlus, did I mention ITS FOUR FREAKING DOLLARS<br \/>\nhow could I NOT order two!<\/p>\n<p>When they arrive I&#8217;ll have a play around see if I can figure out how to control them \ud83d\ude42<br \/>\nWill post here when I do!<br \/>\nIn other news: I ordered proper 433mhz antennas for the things, and found the PS move squigy ball.<br \/>\nWill get a box soon for it all haha,<br \/>\nI&#8217;m also preparing some LED strip on the front veranda to be controlled by my UI. And I&#8217;m developing an android app (will design a tablet version later)<br \/>\nUsing Tasker app factory!<br \/>\nEarly screenshot attached!<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415840614205.png\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1415840614205\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415840614205.png\" alt=\"image\" \/><\/a><br \/>\nOther photos:<\/p>\n<figure style=\"width: 2000px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415843322590.jpeg\"><img loading=\"lazy\" decoding=\"async\" title=\"wp-1415843322590\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415843322590.jpeg\" alt=\"image\" width=\"2000\" height=\"1500\" \/><\/a><figcaption class=\"wp-caption-text\">the two channel relay is sooo bigg D:<\/figcaption><\/figure>\n<p>Newer update:<br \/>\nI found chunks of a broken PlayStation move controller, for now I&#8217;ve soldered some resistor legs to the rgb led breakout board, and have the rgb led on the base station for reasons,<\/p>\n<p>Hopefully further down the track I&#8217;ll be able to turn on a mood light fading through, (although once it starts fading how do I stop it&#8230;?)<\/p>\n<p>Or even notifications for things!<\/p>\n<p>It also acts as a status light,<br \/>\nOn sending an on command it flashes green twice, the off command has two red flashes.<br \/>\nAn unused but implemented command gives three orange flashes.<\/p>\n<p>I need to figure out how to flash an error if an unrecognized command is received&#8230;<\/p>\n<p>Also I hope to find the sphere from the PS move. And to mount the led on the proto shield, maybe move the rf transmitter to make a cut out for the Ethernet jack,<br \/>\nAnd then try my luck at designing a special case for it all.<br \/>\nEither adapting an etherten case, or making a shitty one from scratch.<br \/>\nYouTube video showing on\/off light<br \/>\nSignal light: http:\/\/youtu.be\/ejXlYe17N8U<\/p>\n<p><span style=\"text-decoration: line-through;\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/span><\/p>\n<p>New update: I got it working again \ud83d\ude42<br \/>\nNot sure what was wrong but I rewrote the code and now it works hahaha<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415434368371.jpeg\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1415434368371\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415434368371.jpeg\" alt=\"image\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415434416596.jpeg\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1415434416596\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415434416596.jpeg\" alt=\"image\" \/><\/a><\/p>\n<p>Its a bit slow probably because of the speed I have the radios set to, but oh well doesn&#8217;t matter.<br \/>\nI soldered everything together into a little clump, minimising wires, and made a shield for the transmitter so it sits neatly atop the etherten.<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415434458097.jpg\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1415434458097.jpg\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415434458097.jpg\" alt=\"image\" \/><\/a><\/p>\n<p>I&#8217;ll be able to add other things to the proto shield later \ud83d\ude42<\/p>\n<p>Also. Found a leostick under my bed but I&#8217;m having issues uploading code to it. Going to use it to make that light switch if I get it working \ud83d\ude00<\/p>\n<p>LOOK AT ME I BROKE IT SOMEHOW<br \/>\nWent for a trip to jaycar and bought some supplies, and a smaller soldering iron<br \/>\nWhen I got home I took down the roof unit, attached shorter cables so it would fit in the little box, and put it back together,<br \/>\nBut just my luck, it&#8217;s not working now!<\/p>\n<p>I send commands but it doesn&#8217;t trigger the relay&#8230;.<\/p>\n<p>I&#8217;ll have to connect it and look at serial monitor to see if it&#8217;s getting the command<\/p>\n<p>I&#8217;ll also add some code and an LED that blinks when it gets a command&#8230;.<br \/>\nOh, and maybe the code to light that emergency light if a pin goes low?<\/p>\n<p>I should probably remove all the pin headers and solder right to the board actually&#8230;<\/p>\n<p>Or to a proto shield&#8230;.<\/p>\n<p>The current state of the project consists of an arduino pro mini clone, that listens on the 433mhz band for a command, and turns on a relay depending on the command.<\/p>\n<p>There is a Freetronics Etherten acting as base station, connected to my LAN, and a 433mhz transmitter, this responds to http requests by sending various commands to the ceiling unit.<\/p>\n<p>Its easy to add additional remote units and set up controls for them, which I plan on doing\u00a0 when I get blinds for my windows.<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415312644483.jpeg\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1415312644483\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415312644483.jpeg\" alt=\"image\" \/><\/a><\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415312685213.jpeg\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1415312685213\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415312685213.jpeg\" alt=\"image\" \/><\/a><\/p>\n<p>I also have a raspberry pi running Rasbian that listens for a button press, which is wired to our 20 year old retro doorbell, when the button is pushed the Pi sends a pushover notification to my phone\/pebble, as well as plays a doorbell sound throughout the house\u00a0 directly connected speakers.<\/p>\n<p>I&#8217;m also going to be setting up Asterix or something on this to add Cisco VoIP phones around the house.<\/p>\n<p>I have plans for an analog control panel too, that has physical buttons connected to an arduino, to send commands to the various other arduino around the house.<\/p>\n<p>For example, a light control panel, push one button to send off commands to all lights in the house, or indivuaul etc.<\/p>\n<p>I also will be adding a sensor to the mailbox, probably solar powered, that sends a command in to the house when mail goes in, either emailing me, maybe a photo?<br \/>\nSending my pebble\/phone a notification, or just lighting up an LED on the control panel to indicate new mail!<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415312549672.jpeg\"><img decoding=\"async\" class=\"alignnone size-full\" title=\"wp-1415312549672\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2014\/11\/wpid-wp-1415312549672.jpeg\" alt=\"image\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: This project died when I got a job and can afford off the shelf automation stuff :&#8217;) It might come back when I start adding stuff like blinds and air conditioning control! &nbsp; This project is basically me wanting to be able to automate my house but not wanting to fork over heaps of &hellip; <a href=\"https:\/\/blog.lewys.eu\/?p=13\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">DIY Project: Home Automation<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":55,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,20,19,27,18,25],"tags":[7,16,9,13,12,8,10,2,11],"class_list":["post-13","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-amateur-radio","category-arduino-2","category-home-automation-2","category-programming","category-projects","category-wireless","tag-arduino","tag-code","tag-diy","tag-electronics","tag-ethernet","tag-hacking","tag-home-automation","tag-programming","tag-tinkering"],"jetpack_featured_media_url":"https:\/\/blog.lewys.eu\/wp-content\/uploads\/2014\/11\/wpid-wp-1417090802432.jpeg","_links":{"self":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":17,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions\/218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/media\/55"}],"wp:attachment":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}