My Attempt At Home Automation Using .NET and Flash


mavromatic home automation flashSo I’m almost done with the construction of my new home, it has been 2 years of actual construction and 2 years of planning. Overall, I am very happy with the results. High on my list was to design and install a complete home automation system in the house. I wanted to develop a system that is both cost effective and robust enough to expand over time.

Most proprietary systems like Crestron and AMX are tailored to the ultra rich and for the non-tech savvy folks. I’m a geek, so I want a system that exposes every little hook so I can do whatever I want. I don’t want to be charged more money if I want to add a feature. My goal is really simple. There is no need to automate a toaster or have a TV screen built into my refrigerator. I believe a “smart home” should be just that. Smart. It should be bright enough to know when I’m in proximity. Lets say I pull into my driveway and open the garage door at 10pm. The house should turn on the lights leading to my bedroom at 45% brightness. If I turn lights on after midnight, to get a drink of water or go to the bathroom, the switches should know to only turn the lights on 25%, as I don’t want to be fully awakened. Heating and cooling should be zoned and controlled via the panels and remotely using a telephone (dial-tone controlled and/or HTTP). The audio and video should be able to be distributed and controlled in any room of the house. There shouldn’t ever be a need to buy multiple DVD players for each room. A video server will play a major part in the house. The idea is to keep the system simple enough so it’s easy to control and smart enough that you never really need to touch it.

Our lives are very cyclical. Think about it. We wake up around the same time Monday thru Friday. We come home around the same time. Weekends are maybe different, but typically follow a regular schedule. Maybe some weekends you wake up Saturday morning, walk to the local coffee shop, then return home and watch a movie. A good system should be able to learn. A good system should be able to adapt. I never want to have to touch a light switch (or panel) unless I want to manually override them, like to set a particular mood.

I could go on for hours discussing my ultimate vision of the perfect home automation solution, but that’s not the point of this post. I’d like to show my current attempt at home automation. I decided to build it using the Microsoft .NET platform. I have to give props to Microsoft for developing a platform that is so easy to build a product around. The beauty of the platform is that one can write programs easily for both the PocketPC and Windows realm. It’s a very, very powerful architecture. Now, when it’s coupled with Macromedia Flash for the UI layer, one can design clean and reusable interfaces that keep a consistent look and feel across devices.

My first step was to see how hard it was to write a program for the PocketPC platform. Since my next phone will be a based on this platform, and since the Flash Player 6 is available on the PocketPC, I decided to design an architecture that embeds my Flash UI on top a native PocketPC application. I used an old Toshiba e740 with built-in WiFi to test my prototype on. The UI was easy to port over to the PocketPC because I already had a full screen version of the Flash UI (the house will have two 10” airpanels, one 15” airpanel, and a 15” in-wall touchscreen). That is one of the main benefits with using Flash as the UI layer. It is easy to scale and position the elements for display on different size panels. All of these panels will have the same full control of the house and will be on a closed network. When I am near my house, the PocketPC phone will notice when my wireless network is available. The application sends out a UDP message, much like the uPnP discovery model and handshakes with my home automation server. Looking for certain credentials. I can even lock it to my phone’s serial number. Once everything is good to go, it will launch and display the Grouse Control Center application (pictured above). I will then need to enter an authorization code which is encrypted and sent back to the controller. Once authenticated, I will have control of certain elements of the home. Elements like cameras, security system, lighting, climate, audio/video, and system status/alerts.

The hardest part is finding the time to complete the whole system. But, this is something I have thought long and hard about and with technology getting more accessible, I will be able to expand it as I see fit. Something I feel I could never do with a Crestron or AMX controller… certainly not for the same price.

When I get closer to finishing the system, I’ll post my complete vision to home automation and if I successfully achieved what I wanted to. Heck, I might get sick of the whole thing and go back to standard toggle light switches and an old-school rotary dial thermostat.





Filed in: Home Controls


  • trottintrails

    I am wondering if this is something you thought about doing. I am interested in the same thing for when I build a house. I am sure the .NET community would enjoy it.

  • http://www.mavromedia.com Danny Mavromatis

    Hi there… I really haven’t thought about making it open source yet. My primary focus has been to get it all done. I love the open source idea and if everything goes well, I may consider releasing the source. I’ll keep you posted.

  • http://www.spyboy.com spyboy

    Quite a few questions:

    1) Are you using x10 for your lights, or do you have another system?

    2) Are you building your menu system task oriented or device oriented? What I mean is for a home theater, the option is “watch a movie” (which on the backend does multiple things: turn on tv, set channel, turn on amp, set volume, turn on dvd player, etc)

    3) I like your proximity to your network to authenticate, but what about using bluetooth? It’s a lower range, so you can have the system say “you’re in the bedroom” (so when you adjust lights, it knows to do the bedroom only) or “you’re in the kitchen”, etc. If you had multiple bluetooth receivers in the house, I guess you could base it on signal strength or something (or wear an RFID bacelet or something). (another option once RFID is prevalent is to put a chip into each pair of shoes, slippers, etc you have so it can tell where you are, unless you walk barefoot through the house in which case you need to wear a watch or something)

    4) are you adding voice recognition and text to speech? So you can talk to your system in the morning (computer, what’s the weather like today?…)

    5) do you have a car pc yet? to allow more integration to the home as you’re driving home, plus your house can generate a playlist of music for your ride to work.

    6) are you looking at any alternative power (solar, wind, etc)

    7) Do you have pets and are you incorporating any automated feeding/watering systems (or if you have fish, tank monitoring sensors)

    yeah, very geeky questions, but you’re not alone, we all want a “smart home”

    And then finally, the idea of a “home page” will finally come true!

  • Matt Voerman

    Hi Danny,
    Just wondering if you had any updates for us on the progress of your home automation system.

    I’m a Flash developer and i’m very keen to know more about your current in-house Flash GUI based control system, as well as the custom version you develped for your PDA.

    Can you share some more of the details with us?

    Regards
    Matt Voerman

  • paulhuber

    FYI, there’s an open source project that does everything you described (plutohome.com). plutohome.com/support has tech details. It also has the Bluetooth proximity detection described so your media, lighting, climate, phone calls, etc., follow you from room to room, and it includes a movie/music server like the AMX MAX/Kaleidescape. And it’s free for do it yourselfers and comes with source code, and controllers for webpads, pdas and mobile phones.