[{"data":1,"prerenderedAt":266},["ShallowReactive",2],{"post-\u002Fblog\u002F2019\u002Fhow-to-build-a-smart-home":3},{"id":4,"title":5,"body":6,"categories":253,"date":256,"description":126,"extension":257,"image":258,"meta":259,"navigation":261,"path":262,"seo":263,"stem":264,"__hash__":265},"blog\u002Fblog\u002F2019\u002Fhow-to-build-a-smart-home.md","How to build a Smart Home",{"type":7,"value":8,"toc":242},"minimark",[9,13,16,19,36,39,61,64,67,111,116,127,131,137,141,147,151,157,161,167,171,174,177,183,186,192,199,205,208,213,217,220,223,227],[10,11,12],"p",{},"Since everbody complains about smart homes are vendor lock in, too expensive, giving you data for free to some suspecting cloud provider,... I need to preset my smart home solution to you, that can be completely running inside your \"four walls\" and does not need any third party, if you do not want it to. Additionally, there is NO vendor lock in. Everything can be open source and connect to almost any existing smart home appliance.",[10,14,15],{},"What I'm talking about? It's iobroker.",[10,17,18],{},"If you already own a Homematic System from EQ-3 (ELV in older ages), iobroker is a must-have. BTW: If you already own a Charly, you can install iobroker on it without addional hardware, but be advised to install a USB drive with enough storage for the data that accumulates when years pass by. I would not suggest to use a flash based drive, since it needs a tradeoff between amount of data lost when power cuts and the endurance of your drive. Write cycles will be quite often...",[10,20,21,22,29,30,35],{},"Welp, where to start? I would first get some low-power and reliable mini PC. The solution I selected is from hardkernel and called ",[23,24,28],"a",{"href":25,"rel":26},"https:\u002F\u002Fwww.hardkernel.com\u002Fshop\u002Fodroid-hc1-home-cloud-one\u002F",[27],"nofollow","ODROID HC-1"," (in Germany best bought at ",[23,31,34],{"href":32,"rel":33},"https:\u002F\u002Fwww.pollin.de\u002Fp\u002Fodroid-hc1-einplatinen-computer-fuer-nas-und-cluster-anwendungen-810766",[27],"Pollin"," for 60€). This is a little ARM board running ubuntu linux and providing space for a single 2.5\" HDD. I selected a WD Red 1TB drive for that purpose. The linux OS itself needs to be put on a Micro-SD card.",[10,37,38],{},"I would suggest to also buy the following:",[40,41,42,46,49,52,55,58],"ul",{},[43,44,45],"li",{},"Power supply (or a PoE+ adapter if you own a PoE+-capable switch)",[43,47,48],{},"Micro-SD card with at least 8GB (best with ubuntu preinstalled)",[43,50,51],{},"The serial cord from hardkernel",[43,53,54],{},"The Battery (for RTC)",[43,56,57],{},"A hard disk for all the data your smart home will collect and",[43,59,60],{},"A little case against the dust, that definitely will render you appliance as very attractive ;-)",[10,62,63],{},"Start installing your software. First you need to install the Ubuntu OS, provided by hardkernel (if not already installed).",[10,65,66],{},"When everything arrived, connect it to your network, find out the IP address or use the serial cord and start installing everything you need (supposing, you do all under root, if not, prepend a sudo where needed):",[40,68,69,76,83,90,97,104],{},[43,70,71],{},[23,72,75],{"href":73,"rel":74},"https:\u002F\u002Fnodejs.org\u002Fen\u002F",[27],"node.js",[43,77,78],{},[23,79,82],{"href":80,"rel":81},"https:\u002F\u002Fwww.influxdata.com\u002F",[27],"influxdb",[43,84,85],{},[23,86,89],{"href":87,"rel":88},"https:\u002F\u002Fgolang.org\u002F",[27],"go",[43,91,92],{},[23,93,96],{"href":94,"rel":95},"https:\u002F\u002Fyarnpkg.com\u002Fen\u002Fdocs\u002Finstall#debian-stable",[27],"yarn",[43,98,99],{},[23,100,103],{"href":101,"rel":102},"https:\u002F\u002Fgithub.com\u002Finfluxdata\u002Fchronograf",[27],"chronograph",[43,105,106],{},[23,107,110],{"href":108,"rel":109},"http:\u002F\u002Fwww.iobroker.net\u002F",[27],"iobroker",[112,113,115],"h2",{"id":114},"prepare-your-hard-disk","Prepare your hard disk",[117,118,123],"pre",{"className":119,"code":121,"language":122},[120],"language-text","dmesg  # Find out, which is your HDD, assuming \u002Fdev\u002Fsda\nfdisk \u002Fdev\u002Fsda\n# Create 2 Partitions\n# 8 GB with swap\n# Remainder with ext4 or something else (I prefer btrfs)\n# write partition table with entering 'w'\nmkswap \u002Fdev\u002Fsda1\nswapon \u002Fdev\u002Fsda2 \nmkfs.ext4 \u002Fdev\u002Fsda2\nmkdir \u002Fvar\u002Fdata\nblkid \u002Fdev\u002Fsda2   # Take the UUID-part\necho \"UUID=\u003Cthe-above> \u002Fvar\u002Fdata   ext4 errors=remount-ro,noatime 0 1\" \\\n  >> \u002Fetc\u002Ffstab\nmount \u002Fvar\u002Fdata\nmkdir \u002Fvar\u002Fdata\u002Fiobroker\nmkdir \u002Fopt\u002Fiobroker \u002Fvar\u002Flib\u002Finfluxdb\necho \"\u002Fopt\u002Fiobroker\u002F \u002Fvar\u002Fdata\u002Fiobroker  none bind\" \\\n  >> \u002Fetc\u002Ffstab\necho \"\u002Fvar\u002Fdata\u002Finfluxdb\u002F \u002Fvar\u002Flib\u002Finfluxdb none bind\" \\\n  >> \u002Fetc\u002Ffstab\n","text",[124,125,121],"code",{"__ignoreMap":126},"",[112,128,130],{"id":129},"installing-nodejs","Installing node.js",[117,132,135],{"className":133,"code":134,"language":122},[120],"sudo apt-get install python build-essential curl\nmkdir src\ncd src\nwget https:\u002F\u002Fnodejs.org\u002Fdist\u002Fv10.15.3\u002Fnode-v10.15.3.tar.gz\ntar xzvf node-v10.15.3.tar.gz\ncd node-v10.15.3.tar.gz\n.\u002Fconfigure --without-snapshot\nmake\n.\u002Fnode -v  # If version is returned than 'make' was OK \nmake install\n",[124,136,134],{"__ignoreMap":126},[112,138,140],{"id":139},"installing-influxdb","Installing InfluxDB",[117,142,145],{"className":143,"code":144,"language":122},[120],"curl -sL https:\u002F\u002Frepos.influxdata.com\u002Finfluxdb.key | \\\n",[124,146,144],{"__ignoreMap":126},[112,148,150],{"id":149},"installing-go-language","Installing Go language",[117,152,155],{"className":153,"code":154,"language":122},[120],"apt install git golang-go  # needed to build a newer go\ncd \u002Fusr\u002Flib\ngit clone https:\u002F\u002Fgo.googlesource.com\u002Fgo\ncd go\ngit checkout go1.12.5\ncd src\n.\u002Fall.bash\ncd $HOME\ncd \u002Fusr\u002Fbin\nrm go\nln -s ..\u002Flib\u002Fgo-1.12 go\ncd $HOME\ncat >>.profile \u003C\u003CHERE\nexport GOROOT=\u002Fusr\u002Flib\u002Fgo\nexport GOPATH=$HOME\u002Fgo\n[ -d $GOPATH ] || mkdir $GOPATH\n[ -d $GOPATH\u002Fbin ] || mkdir $GOPATH\u002Fbin\nexport PATH=$GOPATH\u002Fbin:$PATH\nHERE\n",[124,156,154],{"__ignoreMap":126},[112,158,160],{"id":159},"installing-yarn","Installing yarn",[10,162,163,164],{},"see: ",[23,165,94],{"href":94,"rel":166},[27],[112,168,170],{"id":169},"installing-chronograph","Installing Chronograph",[10,172,173],{},"For creating your own querys to InfluxDB (e.g. with node red), it is easiest to have some good InfluxDB interface, best to be used in a browser...",[10,175,176],{},"With go and yarn, it is as easy as boiling water:",[117,178,181],{"className":179,"code":180,"language":122},[120],"go get github.com\u002Finfluxdata\u002Fchronograf\ncd $GOPATH\u002Fsrc\u002Fgithub.com\u002Finfluxdata\u002Fchronograf\nmake\ngo install github.com\u002Finfluxdata\u002Fchronograf\u002Fcmd\u002Fchronograf\n",[124,182,180],{"__ignoreMap":126},[10,184,185],{},"Now you can start chronograph",[117,187,190],{"className":188,"code":189,"language":122},[120],".\u002Fchronograph\n",[124,191,189],{"__ignoreMap":126},[10,193,194,195],{},"Now visit the chronograph web interface by browsing to http:\u002F\u002F",[196,197,198],"host",{},":8888. A Wizard will welcome you. Enter the appropriate data to access your InfluxDB. Youcan skip the Kapacitor question. After finishing the wizard, you should be able to see the following on chronographs Config tab.",[10,200,201],{},[202,203],"img",{"alt":126,"src":204},"\u002Fimages\u002Fblog\u002F2019\u002F05\u002Fimage.png?fit=696%2C182&ssl=1",[10,206,207],{},"When this is done, issue your first query on the Explore tab (use the datapoint selector on the lower half of the page and select an appropriate date from the date picker in the upper right corner:",[10,209,210],{},[202,211],{"alt":126,"src":212},"\u002Fimages\u002Fblog\u002F2019\u002F05\u002Fimage-1.png?fit=696%2C194&ssl=1",[112,214,216],{"id":215},"install-iobroker","Install iobroker",[10,218,219],{},"COMING SOON...",[221,222],"hr",{},[112,224,226],{"id":225},"kommentare-comments","Kommentare \u002F Comments",[10,228,229,230,235,236,241],{},"Hast du Fragen oder Anmerkungen zu diesem Artikel? ",[23,231,234],{"href":232,"rel":233},"https:\u002F\u002Fgithub.com\u002Fthe78mole-blog\u002Fthe78mole-blog.github.io\u002Fissues\u002Fnew?title=Kommentar+zu%3A+how-to-build-a-smart-home&labels=comment",[27],"Erstelle ein GitHub Issue"," oder starte eine ",[23,237,240],{"href":238,"rel":239},"https:\u002F\u002Fgithub.com\u002Fthe78mole-blog\u002Fthe78mole-blog.github.io\u002Fdiscussions",[27],"Diskussion",".",{"title":126,"searchDepth":243,"depth":243,"links":244},2,[245,246,247,248,249,250,251,252],{"id":114,"depth":243,"text":115},{"id":129,"depth":243,"text":130},{"id":139,"depth":243,"text":140},{"id":149,"depth":243,"text":150},{"id":159,"depth":243,"text":160},{"id":169,"depth":243,"text":170},{"id":215,"depth":243,"text":216},{"id":225,"depth":243,"text":226},[254,255],"ARM","Smart Home","2019-05-18","md",null,{"tags":260},[],true,"\u002Fblog\u002F2019\u002Fhow-to-build-a-smart-home",{"title":5,"description":126},"blog\u002F2019\u002Fhow-to-build-a-smart-home","FQkCTctPYytbBPTumG_VIoZpPKF8MsfYpLIYoE85xsQ",1777286694395]