Home Automation Resources

Thanks to everyone who showed up on Wednesday for the presentation of “A .NET API …for Your House!”. This is the companion article to the presentation and I’ve included links to all of the resources that came up through the meeting (and a few I forgot to mention).

Picking a Brand / Technology

There are a number of options to choose from, including X10, Insteon, Zigbee,  Z-Wave / Leviton, and Lutron. X10 is the oldest technology available, developed thirty-five years ago, and is a low cost ($7-20 / switch) but low reliability option. Lutron products, such as the RadioRA 2 system, are brand new and top the scale in terms of reliability, but are among the most expensive (as much as $250 / switch).

Insteon sits dead center in the cost-reliability-availability spectrum and is a great choice for modern home automation. Switches cost between $35 and $60 and are a magnitude more reliable than the X10 equivalent. It’s also very easy to develop against and there are freely available libraries and tools for that purpose.

Your best bet for purchasing Insteon equipment is through Amazon or Smarthome. Amazon stocks some of the equipment and you can sometimes save a few dollars on shipping for that reason (via prime).

Getting Started With Insteon Hardware

"Welcome to the future."

The bare minimum needed to get started writing software against Insteon is a “Power Line Modem” and at least one compatible device to control. The modem acts kind of like a network card for your home automation equipment, allowing your computer to communicate with the devices you’ve installed. A good choice for getting started is the 2413U.

Unlike other earlier models, the 2413U is able to send wireless signals as well, which means it can directly interact with dual-band and wireless Insteon products. The practical advantages are that it’s more reliable and the commands also get there slightly faster on average than the Powerline-Only modem. In the box will be a small page of instructions, the modem (about the size of two decks of cards), and a USB cable. When I plugged it into my Windows 7 computer it recognized it automatically and assigned a serial port to it. If it’s not instantly recognized as a serial port you’ll have to install (stable and WHQL certified) drivers for the chip. Here’s a link to the setup for the drivers from FTDI. That’s about all the installation that you’ll need to do for the modem.

Regarding the devices, there is just about everything you could imagine for controlling lighting, fans, thermostats, appliances, blinds, garage doors, electronic door locks, etc… Anything that can be controlled can be setup out of the box to respond to an equally wide variety of sensors.

The setup for devices is a little bit more involved than the modem. The switches and outlets, for example, require some prior experience or knowledge of electrical wiring to do comfortably but can save you several hundred to several thousand on installation fees. We went over installing an insteon switch in the presentation.

After a device is installed / plugged in you’ll need to connect it to the modem. This is a simple process of pressing and holding it’s set button until it starts blinking and then doing the same on the modem – kind of like pairing a bluetooth headset, but easier. This step does a few things, including confirming that the devices can see each other and communicate (the modem will give you feedback that it’s connected to the device) and notifies each device that they should be able to send and receive commands from each other. This is a neat feature of the Insteon model that reduces network traffic and improves security (your tech-savvy neighbors can’t accidentally – or not – turn on all of your lights at 2am).

Freely Available .NET Libraries / Tools

After your hardware is installed you have several options for writing software against it. One option is to purchase the official $200-250 SDK from Insteon. While this may be a reasonable option for some, you can get started for a lot less. By a lot less, I mean for free.

The best open-source .NET Insteon Library available is FluentDwelling. In the words of the author:

“FluentDwelling is a free and open source .NET class library for controlling Insteon-compatible home automation devices using the SmartHome 2413S serial-to-Insteon or 2413U USB-to-Insteon bridges.”

It’s a solid library for sending commands to a wide variety of Insteon devices and the source code is reasonably easy to follow and extend. One issue, the pervasive use of out parameters, is made up for by the availability of unit tests.

As for standalone tools, one good choice is Insteon Explorer (which appears to be a .NET application). It’ll help you find the addresses of the devices in your home and assist in cataloging and testing them. One word of caution, it’s still in Beta and it shows. I’ve had it die with unhandled exceptions 3-4 times on my computer already.

The Fine Details

If you’re interested in what goes on behind the scenes after your code executes and your 10-11 byte messages hit the modem, there is 68-page comprehensive guide available for free.

In the PDF file you’ll find a complete breakdown of the message format and a rundown of the stack, as someone asked for during the meeting.

Tags: , , , , ,

Author:Robert Venables

Robert is a .NET developer living in the Tampa Bay area. When not coding he can be found on Hacker News, Quora, and Reddit. His hobbies include flying, scuba diving, and photography. (More)

No comments yet.

Leave a Reply