Refactoring my HA system
Things have been settling down a bit and I can finally get back into my HA projects. I started looking at what I have, what I want, what is available and reviewing what I've written. For the last 2 decades I've been running Misterhouse and works well enough but I feel that it needs a bit of work and that Perl 5 isn't the best choice for OOP that HA needs to take advantage of. There are other reasons but those will suffice for this discussion. I actually started to write my own HA project in Javascript using Node.js. I created the Irrigation Control package with Node.js. I really like it though the asynchronous nature of Node.js took a lot of getting used to for me. One problem that Node.js has is that if an event's processing takes a long time or hangs, the entire program waits with it. This is where a bit of threading would be nice (threading causes other difficulties). While there are ways to work around the lack of threads, I find that I need to bend over backwards in my thinking to do so. So I've been looking for some other solution that has the asynchronous and the threading support needed by today's HA systems. I know Python has both.
Enter Jason Sharpee's Pytomation, written in Python it's clearly OOP based (and I have a lot to learn on that front). Pytomation uses the Twisted library for asynchrous events and has built in support for threading/multitasking. I've made the effort to get it running on my Linux system and it's working well with an Arduino as my digital and analog devices to control. I still have a ways to go but I'm pretty sure that I can have something working well enough to do a new HA presentation for the Trenton Computer Festival. I've done HA Presentations there in the past and I'd like to reuse the Dollhouse with additional devices to control. I think Pytomation would work great and I have a lot of new devices; Connect by TCP lights, WeMo outlets and chipKit/Arduino controlled RGB LEDs for starters.
0 Comments:
Post a Comment
<< Home