[{"data":1,"prerenderedAt":312},["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-\u002F2018\u002F1u-openhab-enclosure":21,"surround-\u002F2018\u002F1u-openhab-enclosure":299,"i-lucide:arrow-left":308,"i-lucide:arrow-right":310},{"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":285,"comments":286,"date":287,"description":288,"excerpt":286,"extension":289,"image":290,"meta":291,"navigation":20,"path":292,"readingTime":293,"seo":294,"stem":295,"subtitle":296,"tags":286,"wordCount":297,"__hash__":298},"posts\u002F2018\u002F1u-openhab-enclosure.md","1u OpenHAB enclosure",{"type":25,"value":26,"toc":277},"minimark",[27,51,54,61,64,69,76,106,110,113,116,122,125,131,138,144,151,157,162,177,183,186,192,199,205,214,220,226,229,235,238,244,249,253,256,259,265,269],[28,29,30,31,38,39,44,45,50],"p",{},"I have been running ",[32,33,37],"a",{"href":34,"rel":35},"https:\u002F\u002Fmysensors.org",[36],"nofollow","MySensors"," and ",[32,40,43],{"href":41,"rel":42},"https:\u002F\u002Fwww.openhab.org",[36],"OpenHAB"," for a while now. The system is set up on a Raspberry Pi 3, running ",[32,46,49],{"href":47,"rel":48},"https:\u002F\u002Fgithub.com\u002Fopenhab\u002Fopenhabian",[36],"OpenHABian",".\nI have built and deployed some basic MySensors nodes in my apartment, measuring things like room temperature and humidity. I have\nsome \"smart\" IoT devices to control with OpenHAB.",[28,52,53],{},"My home automation project begin as a prototype, but by now it's become clear that the system is useful and I want to expand it.\nThis means that the \"I'll just throw a RPi onto a rack shelf\" approach needs upgrading. I have a proper rack, why can't the RPi be properly racked?",[28,55,56],{},[57,58],"img",{"alt":59,"src":60},"Shelf for Rpi","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fshelf-pi.jpg",[28,62,63],{},"I had an empty Soekris 1u net6501 enclosure, which fit the bill.",[65,66,68],"h2",{"id":67},"business-plan","Business Plan",[28,70,71,72],{},"Drill new holes into the Soekris enclosure, mount the Pi-s into it; rackmount the entire thing. No more free-floating Pi-s on a shelf. ",[73,74,75],"code",{},"#labporn",[28,77,78,79,82,83,88,89,92,93,38,96,99,100,105],{},"Bonus points: replace the stock ",[73,80,81],{},"NRF24L01+"," radio with the more powerful ",[32,84,87],{"href":85,"rel":86},"https:\u002F\u002Fhackaday.com\u002F2016\u002F05\u002F31\u002Ffixing-the-terrible-range-of-your-cheap-nrf24l01-palna-module\u002F",[36],"long-range version"," (external antenna); and support MySensors\n",[73,90,91],{},"ERROR",", ",[73,94,95],{},"RX",[73,97,98],{},"TX"," ",[32,101,104],{"href":102,"rel":103},"https:\u002F\u002Fwww.mysensors.org\u002Fbuild\u002Fadvanced_gateway",[36],"LED-s",".",[65,107,109],{"id":108},"the-build","The Build",[28,111,112],{},"I started by measuring and drawing the layout in Inkscape. By printing the panel design on paper, I could get hole guidelines for drilling.",[28,114,115],{},"I planned to mount 3 LED-s to the 1u front panel for MySensors, + a toggle switch for stopping \u002F starting home automation services on the Pi.\nThe toggle switch would allow Eveli to turn off all home automation services, should something error out and become UnbearablyAnnoying.",[28,117,118],{},[57,119],{"alt":120,"src":121},"Drilling holes","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fdrilling.jpg",[28,123,124],{},"Light sandpaper took care of removing the original Soekris paint and text. Three layers of spray-paint later I had a nice-looking black front panel.",[28,126,127],{},[57,128],{"alt":129,"src":130},"Paintjob","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fpaintjob.jpg",[28,132,133,134,137],{},"I used through-hole ",[73,135,136],{},"3mm"," LED sockets and a small toggle switch.",[28,139,140],{},[57,141],{"alt":142,"src":143},"Mounting components","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fmount.jpg",[28,145,146,147,150],{},"I drilled eight ",[73,148,149],{},"2.5mm"," holes for mounting two Raspberry Pi-s (the 2nd Pi just rents the space in the enclosure) and Eveli proceeded\nto screw them in place.",[28,152,153],{},[57,154],{"alt":155,"src":156},"Mounting RPis","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fgirl-mounting.jpg",[28,158,159],{},[57,160],{"alt":155,"src":161},"\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fmounted-pis.jpg",[28,163,164,165,168,169,172,173,105],{},"I also added two ",[73,166,167],{},"40mm"," fans to the sides of the enclosure for keeping things cool. The fans presented a problem, as they run on standard\n",[73,170,171],{},"12V",", however I have no such power source available from the Pi-s. This problem will be solved in the future, ",[174,175,176],"em",{},"somehow",[28,178,179],{},[57,180],{"alt":181,"src":182},"Fans","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Ffans.jpg",[28,184,185],{},"The back of the enclosure (the addon card slot) also got it's hole for the antenna mount of the radio.",[28,187,188],{},[57,189],{"alt":190,"src":191},"Antenna mount","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fantenna.jpg",[28,193,194,195,198],{},"Electronics on the front panel needed connecting to the PI. I created a very small PCB module for adding the required ",[73,196,197],{},"300Ω"," resistors to the LED-s\nand connected them to RPi GPIO pins.",[28,200,201],{},[57,202],{"alt":203,"src":204},"Front panel electronics","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Ffrontpanel-electronics.jpg",[28,206,207,208,213],{},"Documentation is important - in three months time, I won't remember what connects to where. I created a quick diagram of the electronics in\n",[32,209,212],{"href":210,"rel":211},"http:\u002F\u002Ffritzing.org\u002Fhome\u002F",[36],"Fritzing"," and printed it onto the inside of the enclosure.",[28,215,216],{},[57,217],{"alt":218,"src":219},"Schematics","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fschematics.jpg",[28,221,222],{},[57,223],{"alt":224,"src":225},"Schematics, mounted on the inside","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fmounted-schematics.jpg",[28,227,228],{},"The resulting enclosure looked like this.",[28,230,231],{},[57,232],{"alt":233,"src":234},"Inside of the enclosure","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Finside-look.jpg",[28,236,237],{},"I installed the 1u enclosure to my homelab rack.",[28,239,240],{},[57,241],{"alt":242,"src":243},"Rackmounted","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Frackmount.jpg",[28,245,246],{},[57,247],{"alt":242,"src":248},"\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Frackmount-closeup.jpg",[65,250,252],{"id":251},"results","Results",[28,254,255],{},"Initial testing showed that everything worked OK - the long-range radio presented no problems and MySensors flashed the appropriate LED-s\nwhen radio activity occurred.",[28,257,258],{},"The back-end of the enclosure doesn't look as good as it could - I fed the Ethernet and power cables directly into the PI-s, so it isn't modular.",[28,260,261,262,264],{},"Future plans involve writing firmware to make the toggle switch work as well as populating the original Soekris ",[73,263,136],{}," LED sockets with LED-s: they\nwill start showing service status on the OpenHAB (MySensors, OpenHAB, MySQL...).",[65,266,268],{"id":267},"project-files","Project Files",[28,270,271,272,105],{},"Project files are available from ",[32,273,276],{"href":274,"rel":275},"https:\u002F\u002Fgithub.com\u002Fanroots\u002Frpi-enclosure",[36],"GitHub",{"title":278,"searchDepth":279,"depth":279,"links":280},"",2,[281,282,283,284],{"id":67,"depth":279,"text":68},{"id":108,"depth":279,"text":109},{"id":251,"depth":279,"text":252},{"id":267,"depth":279,"text":268},"Hardware",null,"2018-08-30","I have been running MySensors and OpenHAB for a while now. The system is set up on a Raspberry Pi 3, running OpenHABian.\nI have built and deployed some basic MySensors nodes in my apartment, measuring things like room temperature and humidity. I have\nsome \"smart\" IoT devices to control with OpenHAB.","md","\u002Fcontent\u002F2018\u002Frpi-enclosure\u002Fheader.jpg",{},"\u002F2018\u002F1u-openhab-enclosure","about 3 minutes",{"title":23,"description":288},"2018\u002F1u-openhab-enclosure","Converting a Soekris 1u rack enclosure into a RPi OpenHAB unit",592,"5mJf_9X9_BA_GCKBuL6Hn69dkGqKxQA8Mj3igPWRwGY",[300,304],{"title":301,"path":302,"stem":303,"children":-1},"My Soul is Mine","\u002F2018\u002Fmy-soul-is-mine","2018\u002Fmy-soul-is-mine",{"title":305,"path":306,"stem":307,"children":-1},"Secure Christmas","\u002F2018\u002Fsecure-christmas","2018\u002Fsecure-christmas",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":309},"\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":311},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7l7 7l-7 7\"\u002F>",1790886931245]