5 ms·
Home automation using Node.js, raspberry pi and tinkerforge
- frik 13y agoNice article. Never heard of tinkerforge before, interesting tech. And using Node.js for home automation is interesting. I wrote my home automation in C and use various Arduino's and I plan to add some Pi's.
- davidw 13y agoIf you want to try out another technology, Erlang would be a pretty good fit for this.
- lostcolony 13y agoI think better for him to use Node (or really, any language that will simply fall over in the case of failure), unless extremely familiar with a supervisor paradigm. Given the warnings he prefaces everything with, including not to toggle a relais(?) more than 10/min, it seems all too easy to accidentally have a supervisor strategy that in the face of failure could surpass that.
- davidw 13y agoWell, he seems interested in trying different things, and Erlang is very well suited to something like what he's doing. He certainly needs to take adequate steps to ensure that things don't blow up, but long term, having something that's stable and doesn't fall over is going to be a more dependable solution.
- toast0 13y agodon't toggle too fast -> gen_server per relay -> sleep for 6 seconds in init().
- klibertp 13y ago"including not to toggle a relais(?) more than 10/min" That's actually exactly what the latter two configuration parameters for OTP supervisors are for - to tell the supervisor how many failures in what unit of time it should consider "normal".
- lostcolony 13y agoI know. Does -he- know, though? That was my point. Per the original comment, Erlang -would- be perfect for it. It would not, however, be perfect for someone who is not knowledgeable about OTP to use it as a learning project, because any oversight that leads to unexpected behaviors could burn his house down (or whatever toggling a relais too much does).
- qknight 13y agoi will consider erlang for the next project - you got interesting points.
- jsumrall 13y agoI've been thinking of my own way to do something similar, but this setup seems (after reading the first part and looking over the rest) too easy to screw up and do something dangerous with a lot of electricity for me. Proceed with caution.
- cscru 13y agoI've got exactly the same problem: I'm building a fermentation cabinet for home brewing but the only way I've found to do it involves wiring a temperature controller to a 240v relay setup. I've done it, but I'm too scared to plug it in - I'm not an electrician so I'd be ignoring all these warnings telling me I need to know what I'm doing. I'd be really happy to buy a premade switching unit I can control directly via a pi.
- bradyd 13y agoFor a safer method of interfacing with AC voltage you can use something like the PowerSwitch Tail[1]. It is a little pricy (~$26 at Adafruit.com) and only works with one plug, but it means that you don't have to mess with AC voltage directly. @cscru There is a 240V kit version of the PowerSwitch tail available. [1] http://www.powerswitchtail.com http://www.powerswitchtail.com
- qknight 13y agogood point. but i do think that my setup works stable and safe for me. however, i had added the disclaimer because others might be facing a different situation and therefore they are warned.
- dmritard96 13y agoNice writeup! Aand tinkerforge is pretty interesting, never heard of it. Wrote something for my own home that I use everyday. It mostly controls my IR/X10/XBMC/etc. but it has scheduling and a UI to build custom remotes. I host it on a tower connected to my tv and/or one of my raspi's and use arduino's to farm out the work. I have found that reliability is not too too hard to get down, but understanding state is where things get messy. Especially with IR beacuse it's one way. Contemplated a camera or stick on light sensors. Still haven't come up with a satisfactory idea. It was my first django app with jquery mobile on the frontend. I find that serving it up via a raspi is a bit heavy though. Maybe some simple profiling would fix. https://github.com/dandroid88/webmote https://github.com/dandroid88/webmote
- qknight 13y agointeresting. this one-way problem was the main reason not to use 433mhz controllers. thanks for your posting.
- ar7hur 13y agoVery interesting writeup, that's a cool project. Now to make it still cooler and Jarvis-like, you can add voice commands with the Raspberry Pi. Somebody did it here [1] using the Wit Speech API [2] [1] http://blog.fmpwizard.com/blog/go-cortex-using-wit-ai-using-raspberrypi-using-arduino http://blog.fmpwizard.com/blog/go-cortex-using-wit-ai-using-... [2] https://wit.ai/blog/2014/02/12/speech-api https://wit.ai/blog/2014/02/12/speech-api
- qknight 13y agothanks for your feedback! it is very cool stuff but i do not want to rely on external SaaS stuff. anyway, it seems to be really cool - especially the part where the server replies with JSON ;-)
- Tepix 13y agoUsing the super cheap 433mhz wirelessly switchable power plugs using the raspberry pi is also super low cost, it's just not secure against tampering. https://blog.codecentric.de/en/2013/03/home-automation-with-angularjs-and-node-js-on-a-raspberry-pi/ https://blog.codecentric.de/en/2013/03/home-automation-with-... has some details.
- bafjohnson 13y agoI have a good number of 433mhz switchable & dimmable outlets controlled by an Arduino with a 433mhz transmitter. It was a good weekend project that I am extending at the moment - including real world controls of my Sonos components (the Arduino talking to them via SOAP). I've just ordered 10m of RGB LED strip, which is the next component I plan to control with an Arduino which will communicate with the first via an Ethernet shield and a protocol I am yet to devise! Yes, all of this is fairly pointless but it's keeping my brain active whilst I recover from some fairly extensive surgery!
- qknight 13y agothanks for providing your link. very nice writeup but as i pointed out, 433mhz is not an option for me as i wanted to know if a set(..) really was working and 433mhz usually doesn't provide any return value. seeing your post earlier would have saved me some effort getting into REST ;-)
- eik3_de 13y agoI installed Loxone[1] when we built a house and can recommend it. Works right out of the box with web and mobile apps and has multiple APIs to hack with. Only (minor) downside is that you need a VirtualBox for the (otherwise good) configuration software if you're not on Windows. [1] http://www.loxone.com/enus/ http://www.loxone.com/enus/
- nacs 13y agoAt $550 just for the controller, $109 for a light sensor and $160 for a temperature sensor, it seems quite pricy.
- qknight 13y agoi guess my setup is about 200-300 euros summing all the single devices and casings together. this does not include the days of assembling the hardware.
- qknight 13y agoi've seen many such proprietary solutions and i dislike them all for various reasons. i've added a list in the motivation of my article. why do these vendors not honor open source development?