From eBower Wiki
Jump to: navigation, search
(Web API)
(Web API)
Line 272: Line 272:
     if [ $count -lt 10 ]; then
     if [ $count -lt 10 ]; then
       echo "ibase=16;obase=10;$level / 255 * 100" | bc
       echo "ibase=16;$level/FF*64" | bc
       echo "ERROR: Request timed out"
       echo "ERROR: Request timed out"

Revision as of 14:35, 2 March 2015

The current state of home automation is a bit lacking, but I feel that we're on the cusp of a revolution. There are plenty of competing standards out there for home automation protocols, but they follow two distinct patterns. The classic home automation grew from X10 which sent signals over the powerlines already in your house to control remote devices. It's decentralized and very flexible - considering it was invented in the 1970s. These protocols are built from the bottom up, usually microcontroller-based and designed for simplicity and mass production. There is a new breed of protocols like WEMO which are top-down - more software and microprocessor oriented and usually connecting over WiFI. These, I feel, are the way of the future - but their applications are currently limited as they lac the 40+ years of experience.

INSTEON falls into the former category. Destined to evolve or be replaced it's in an interesting position of being actively developed and having a wealth controller options. My gamble is that as the INSTEON devices I have fail (and they are prone to failure) something will be able to replace them - whether it's a new INSTEON controller (my hope) or a WiFi-enabled protocol with a robust set of options.

INSTEON takes X10-like powerline signaling and adds a proprietary low-range RF signalling for when the power lines are too noisy or you need to bridge phases (in the US, you've probably got 240V coming into the house which is split into two legs, to get from one leg to the other you need to bridge the X10/INSTEON signal). It's a big mesh repeater network so the more devices you have the better. You've also got legacy devices that are powerline-only and new devices that are RF-only - so try to get at least one dual-mode device which is the bulk of modern devices today.


Both are home automation protocols. Both are largely proprietary and managed by a single vendor (SmartHome vs. Belkin). Both have ambiguous capitalization. Which one wins?

SPOLIER ALERT: Neither. At least as of now.

Initial Setup

WEMO wins for setup, you plug it in and it becomes an access point if it can't connect to a network. This means it's all wireless and you never have to open it up to configure it. It also means that you can access it anyplace you've got Internet access. If it loses configuration you just need to be near it to set it up again.

INSTEON is a bit more...interesting. You need to know a device ID, so make sure you write it down. Or you can push a setup button to have it broadcast said ID, but that's a pain if you've just screwed in a wall plate or (even worst) installed a ceiling fan controller. More importantly, you need this information every time you lose the config - keep it safe, boys and girls.


This is mostly a push. WEMO is simple, you've got an app. The app controls the device. Done. Unless you want to do anything interesting, then you're stuck with third party integrations which are a bit limiting at best.

INSTEON is complex and fragmented. You can do a ton of wonderful things, but you may need a lot of UIs to do so. You can do this completely without a controller, effectively think of it like Bluetooth pairing where you physically press and hold a button on a "sender" (something like a light switch or pushbutton remote) and then push and hold a button on a "receiver" (something like a fan controller or plug-in adapter) and they'll be paired. But that's not interesting, if there's no app for control it's not a very smart home.

First you need a way to bridge your IP-based network to the INSTEON network. In the old days this was a serial device attached to a computer, today it's the Hub - a little device with a power cable and an Ethernet jack. There are two (soon to be three?) versions of the hub, and as near as I can tell you may want the older 2012 version because the 2014 version removes some legacy support and hackability - but good luck trying to figure out which version you're buying.

Once you've got the Hub setup, you need to control it. There's an app for that, of course, and the Android app isn't bad at all. But the Windows 8 app for the desktop is designed for phones and lacks some device support. And neither can handle scene controllers, effectively pushbutton remotes. For that you'll need the HouseLinc software. And remember, it's all decentralized so the Hub has one configuration known and the HouseLinc software has other bits known but they don't know about each other. But thankfully it works. Mostly.

Action Android App Windows 8 App HouseLinc
Add INSTEON receiver Yes Yes Yes No
Add INSTEON sender No No Yes No
Control Light Yes Yes Yes Yes
Control Fan Yes No Yes No


WEMO has a bit of an edge here. The WEMO app usually just works and the pushbutton UI is also flawless, but limited.

The INSTEON Hub app is hit or miss. I don't know if it's fixable or if Hub placement is key here, but sometimes the devices just go yellow (unknown). On the other hand the pushbutton UI also seems to just work - once it's set up.


Both probably losers, but for different reasons. WEMO is proprietary and "cloud-based" which means you're at the mercy of Belkin's developers for security. They goofed once, but a software patch to the devices fixed things. Belkin is an accessory builder, there isn't much need for security in a USB hub or mouse. They've done a decent job on WEMO, but it's still early days.

On the other hand, we know where SmartHome has failed. The Hub is an HTTP-based device. The default password is easy to guess, nothing's encrypted, and - most damaging - the initial Hub can't be updated and the Hub II is still a microcontroller so it's not as simple as grabbing OpenSSL and patching things. But this isn't horribly critical if you don't expose the Hub to the outside world. First, change the username/password in the Android App. Don't open up the port number to the outside world or, if you do, at least change it from the default and NEVER connect over insecure WiFi since it will pass your password in plaintext. Even better, set up a VPN into your home network. Now you won't be able to access the app unless you're connected, but it will be secure.

The bad news is that INSTEON's security probably cannot be fixed on your device. The good news is it can be fixed by swapping out the Hub with something new.

Robustness of Devices

WEMO's barely on the map here. We've got based wall switches and plug-in adapters but nothing else. It was designed by software people who thought remote relay control was a fun project.

INSTEON was designed by lighting people. It supports basic switches and plug-in adapters, but also dimmers, ceiling fan controllers, blind controllers, water sensors, motion detectors, certain IP cameras, thermostats, and pretty much anything else you can imagine. And this is why INSTEON is still, and will continue to be, relevant in the world of WEMO and Nests.


There are a ton of INSTEON devices out there, I've only got a handful. I'm assuming you'll be adding these to a Hub, if you're going decentralized you may have a different experience.

The Hub

This is the core of the system, so it's useful to cover it in a bit more detail.


The Hub device comes in a few flavors. The original Hub is model 2242-222, the Hub 2 is model 2245-222. Here's a rundown of the reasons to get a Hub 2:

  • Field upgrades
  • Better RF range
  • Improved UI

You'd think it would be a no-brainer. But here are the reasons to find an original Hub:

  • X10 support
  • Better support for legacy HTTP APIs

Being able to upgrade the firmware seems like a key feature, but to my knowledge there are no custom firmware images and I don't know that SmartHome has any updates for the Hub II that are meaningful. The better RF range is nice, but can be replaced with some plug adapters. If you've got a rich set of switches and dimmers you shouldn't need it. The improved UI is a hard one, I've never seen the new UI, but I do like the ability to write my own. When I found that the 2244-224 Starter Kit I purchased had the old Hub I was initially upset that I got the old hardware, now I think it's more of a push for someone like me.

Look and Feel

It's a white plastic brick with an LED. Someone described it quite correctly as similar to a Wii, but the light weight and sharp edges gives it a bit of a cheaper feel in my opinion.


Pretty simple, plug in power and plug in Ethernet. For some reason I needed to do a factory reset to detect it from the Android App. If you need to do this it's documented in the manual, but you unplug it, press and hold the reset button near the power while you plug it in. After the long beep, let go of the reset button and you'll get a double beep. Wait for 30 second for another double beep and then unplug/replug the Hub.

What's missing here is WiFi access. SmartHome recommends not using power strips or surge suppressors on the Hub, it messes with the INSTEON signals. But that means I need to track down a free, non-suppressed outlet that's also near an Ethernet port - not very easy. On the other hand, I could just find a closet with a disused outlet if it had WiFi. I've got it plugged into a power strip now and it's working, but your mileage may vary.


There are plenty of UI's on the Hub, for better or for worse.

Android App

This is the way you're "supposed" to use the Hub. It seems to be mostly feature complete, and allows you to (in theory) add a Nest thermostat (I haven't been able to do so successfully yet) but you can't add nor configure the mini remotes yet.

Windows 8 App

This is found in the Windows App Store and is obviously designed for phones and tablets. It works and seems to follow a Windows 8 UI guideline, but lacks fan controls.


This is standalone software for Windows that reminds me of the old days of home automation where a CS degree was a good idea before getting started.

Web UI

If you open up the Hub's IP/port number in a browser it sends you to where you can log in with your Insteon (not hub) username/password. It's not very feature-rich but it does give you a browser-based access to most of the features the Android app supports.

Secret Web UI

There are some secret pages in the Hub web interface, apparently left over from a previous product. Many of these pages are reportedly not available in the Hub 2.


This is where things get interesting, and another thing that may be less-functional in the Hub 2. The Hub is really an updated SmartLinc which has an API defined. It's not great, but it works.

For example:

curl -u [username]:[password] http://[hub_ip_address]:[hub_port]/3?0262[device_id]0F11[level]=I=3

This command will set the light on a specific device ID to a certain level (between 00 and FF). A more complex and flexible version is below, with it I can do things like:

$ insteon
Syntax: insteon device command [value]
device: The device ID or insteon.hosts name of the device
command: on, fast_on, off, fast_off, status
value: The percent you\'d like to set the dimmer to (0-100)
ERROR: Device  doesn\'t have a device ID of the format [00-FF]:[00-FF]:[00-FF]
$ insteon mbr_fan on
$ insteon mbr_fan on 25
$ insteon mbr_fan off
$ insteon 12:34:56 on

Note that the status doesn't seem to work on my ceiling fan and I can't (yet!) control the fan speed. Here's the code:

for filename in /etc/insteon.conf ~/.insteon.conf /etc/insteon.hosts ~/.insteon.hosts; do
  if [ -f "$filename" ]; then
    . $filename
function usage() {
  echo "Syntax: $(basename $0) device command [value]"
  echo "device: The device ID or insteon.hosts name of the device"
  echo "command: on, fast_on, off, fast_off, status"
  echo "value: The percent you'd like to set the dimmer to (0-100)"
  echo "$1"
  exit 1
for var in insteon_ip insteon_port insteon_user insteon_pwd; do
  if [ "${!var}" = "" ]; then
ERROR: $var not set in /etc/insteon.conf or ~/.insteon.conf"
if [ "$err_msg" != "" ]; then
  usage "$err_msg"
if [ "${!device}" ]; then
  device_id=$(echo "${device_id^^}" | sed 's/\://g')
  device_id=$(echo "${device^^}" | sed 's/\://g')
if ! [[ "$device_id" =~ ^[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]$ ]]; then
  usage "ERROR: Device $device doesn't have a device ID of the format [00-FF]:[00-FF]:[00-FF]"
function send_cmd() {
  case $cmd in
      usage "ERROR: There's a bug in my code and I sent an invalid command internally!"
  if [ "$cmd_code" != "19" ]; then
    curl -u $insteon_user:$insteon_pwd "http://$insteon_ip:$insteon_port/3?0262${device_id}0F${cmd_code}${value}=I=3"
    curl -u $insteon_user:$insteon_pwd "http://$insteon_ip:$insteon_port/3?0262${device_id}0F${cmd_code}${value}=I=3"
    while [ "$return_flag" = "0000" ] && [ $count -lt 10 ]; do
      sleep 0.1
      count=$(($count + 1))
      curr_status=$(curl --silent -u $insteon_user:$insteon_pwd "http://$insteon_ip:$insteon_port/buffstatus.xml" | sed 's/<[^>]*>//g')
      if [ "$last_cmd" != "0262${device_id}0F${cmd_code}${value}" ]; then
        echo "ERROR: Status lost - $curr_status"
        exit 2
      if [ "$last_response" != "06" ]; then
        echo "ERROR: Failure retrieving status - $curr_status"
        exit 2
      if [ "$target_device" != $device_id ] && [ "$target_device" != "000000" ]; then
        echo "ERROR: Target device changed - $curr_status"
        exit 2
      if [ "$ack" != "2" ] && [ "$ack" != "0" ]; then
        echo "ERROR: Unexpected ACK $ack - $curr_status"
        exit 2
    if [ $count -lt 10 ]; then
      echo "ibase=16;$level/FF*64" | bc
      echo "ERROR: Request timed out"
    if [ "$cmd" = "status_debug" ]; then
      echo "
response: $curr_status
last_command: $last_cmd
response_flag: $last_response
return_flag: $return_flag
target_device: $target_device
smartlinc_device: $smartlinc_device
ack: $ack
hop_count: $hop_count
db_delta: $db_delta
level: $level"
case $cmd in
    if [ "$value" == "" ]; then
    hex_value=$(echo "ibase=10;obase=16;255 * $value / 100" | bc | awk -F\. '{print $1}')
    send_cmd $cmd $device_id $hex_value
    send_cmd $cmd $device_id
    send_cmd $cmd $device_id
    usage "ERROR: Unrecognized Command \"$cmd\""

Just create a ~/.insteon.conf or /etc/insteon.conf with the following information:


Note: Your username, password, and IP information is all in plaintext - be careful!

Fan Controller

The 2475F FanLinc controller should be a familiar device to anyone who's installed a wireless remote for their ceiling fan. Most of the time compatible fans have three wires in, power for the fan, power for the light, and neutral/return. This module is slightly different in that you need to splice the neutral from the wall to both the remote and the fan (most of the ones I've installed have a separate neutral out of the controller), but otherwise it's about the same. Feed it power on the black wire, and it will output power to the light and fan on the blue and red wires (respectively). Physically it's a bit smaller than a Westinghouse-branded model I replaced and it fits in the mounting bracket above the flush mount fan (a Westinghouse Comet if you care). The good news is there is no protruding antenna like many of these devices have, but the bad news is there is no protruding antenna so reception could be a problem if you've got high ceilings or a large room - then again, reception could be via the powerline if you've got other dual-band devices so there are options.

Adding the FanLinc is something you should do before you install it because getting to the buttons is a pain once most fans are installed. I did this with the controller in place in the ceiling and with the disassembled fan (no blades) connected to it just to see if it worked. Write down the INSTEON ID before you do the final fan assembly - just in case. Of course, you'll need to make sure the physical controls on the fan have the light on and the fan speed on high (I actually put mine on medium, high is a bit too fast for my tastes).

In the Hub App for Android the device shows up nicely with a six-button controller allowing you to turn the light on/off and set the fan to high, medium, low, or off. Bizarrely Smarthome doesn't offer a wireless remote that has this layout nor does the 6-button switch seem like much of an option since switching the light off would switch the fan controller off. I'm currently using a 4-scene mini remote (see below). Note that unlike the standard RF models there is no remote included.

4 Scene Mini-Remote

The 2342-232 4 Scene Mini-Remote is a little handheld remote with a built-in battery and a micro-USB charger. One of the nice things about these mini-remotes is that they're the same size as a Decora wall switch. If you buy this bracket you can mount them to the wall. There's also a stand for tabletop use.

The remote itself is small and light, the smooth white plastic common to INSTEON products it a bit contradictory, it doesn't feel cheap or flimsy by itself, but its light weight of the products makes the product feel a little cheap. The built-in rechargeable battery hopefully beats needing to swap out button batteries but we'll see about the longevity. The range is pretty decent and with only two devices close to each other I can use it on the opposite side of my apartment through several walls, but the nice thing is if it's not enough you can just add a dual-mode plug adapter close to where you want to use it and you've got an instant range extender. The one thing I'd like to see is a bit of a finger groove on the back, there is an LED at the top of the remote, but otherwise from a tactile perspective it's symmetric. Adding a groove between the top two buttons would help fix that.

You can add these as a controller for the fan by using you Android phone to click on this link on your PC. Sorry, not supported by the Android App at the moment so you need HouseLinc. The plus side is the software is free and the Hub can be used as a bridge. The downside is that it seems to be Windows-only - not an issue for me with my gaming rig but sadly Linux users are on their own for this one, this can help get you started.

Documentation on pairing the remote to the FanLinc forthcoming.