UPDATED Amazon Echo X10 Home Control

In my original post last August I detailed how I was able to control my X10 equipment with an Amazon Echo.  Now with the release of BWS Systems’ ha-bridge version 2.0.0+ we can make script calls! This is awesome news, I no longer need an Apache server and PHP installed on my RPi to make the exec() commands to call the HEYU scripts, I can make them from the ha-bridge. I’ll show you how.

It should be noted that you will need a physical Amazon Echo, Dot, Tap or Google Home to discover your ha-bridge devices. Discovering devices with just a Fire TV or Fire Stick with voice remote will not be successful. However, after discovery by an Echo or Dot, you will be able to use the Fire TV with voice remote to control your discovered devices.


If you use the ha-bridge, I urge you to Donate to BWS Systems (Donate link at bottom), the ha-bridge is distributed freely and continuously updated.


Step 1 – Raspberry Pi goodness?

RPiThe first step is to get your Raspberry Pi up and running. There are plenty of guides how to download and install either NOOBS, or RASPBIAN on a memory card for your RPi, so I won’t go into those details unnecessarily. Suffice it to say, you’ll need to have your RPi booted into Raspbian and configured to your location and language, including SSH enabled.

Once you have the RPi working you can SSH (remote) into it and log in as the user Pi. For PC you can use PUTTY, or MAC use the Terminal Window to SSH into the Pi. At this point I would also recommend you update and upgrade your RPi, by entering the following:

  • $ sudo apt-get update
  • $ sudo apt-get upgrade

I also recommend changing the default password.

Once updated and upgraded, power down your RPi, and make all the following connections:

  • Install batteries into the CM11A
  • Plug the control cable into the CM11A jack
  • Connect the Serial Adapter to the X10 CM11A’s serial cable
  • Plug the CM11A into a wall socket
  • Plug the USB to Serial Adapter into the RPi

In my original post I detail the parts I used, but I recommend USB TO RS-232 DB9 Serial Adapter = $15 Plugable brand – don’t go cheap here.

Power your RPi back on, and SSH back into it.

Step 2 – Heyu turn on my lights!

Let’s install heyu, which is a text-based console program for remotely controlling lights and appliances in the home or office. I put heyu in a directory I created named ‘src’.

Here are the steps I completed:

  • $ ls -l /dev/ttyUSB0
  • You should get something like the following:
    crw-rw---T 1 root dialout 188, 0 Aug 10 20:44 /dev/ttyUSB0
    Make note* of the last part, you’ll need it later.
  • $ mkdir src
  • $ cd src/
  • $ wget https://github.com/HeyuX10Automation/heyu/archive/v2.11-rc2.tar.gz
    (Or current version)
  • $ tar xfvz v2.11-rc2.tar.gz
  • $ cd heyu-2.11-rc2/
  • $ sh ./Configure.sh

The installer will run, make a cup of coffee.

  • $ make

More installation, drink the coffee you made.

  • $ sudo make install

You should then see the following:

I did not find a Heyu configuration file.
Where would you like the sample Heyu configuration file installed?
1. In directory /home/pi/.heyu/
2. In subdirectory .heyu/ under a different user home directory
3. In directory /etc/heyu (for system-wide access)
4. No thanks, I'll take care of it myself
Choice [1, 2, 3, 4] ?

Enter 3 for system wide access, and you’ll see:

Creating directory /etc/heyu
The sample configuration file will be installed as /etc/heyu/x10config

The next question the program will ask is the following:

I will add the TTY port for your CM11 to the config file
Specify /dev/ttyS0, /dev/ttyS1, etc., or the word dummy
To which port is the CM11 attached?

Enter /dev/ttyUSB0 (or whatever you noted* earlier).

Next we need to make the /etc/heyu directory writable:

  • $ sudo chmod -R 777 /etc/heyu

Now you can test the install, enter $ heyu info, and you should get an output with details about the heyu install that look similar to the following:

Heyu version 2.11-rc1
Configuration at /etc/heyu/x10config
Powerline interface on /dev/ttyUSB0
Firmware revision Level = 1
Interface battery usage = 0:00 (hh:mm)
Raw interface clock: Sat, Day 212, 14:07:35
(--> Civil Time: Sat 01 Aug 2015 15:07:35 EDT)
Uploaded schedule will expire in 154 days.
Housecode = M
0 = off, 1 = on, unit 16.......8...4..1
Last addressed device = 0x0002 (0000000000010000)
Status of monitored devices = 0x0042 (0000000000010001)
Status of dimmed devices = 0x1112 (1110000000010000)

Now let’s test to see that you can turn a light on and off. My housecode is M, but use your chosen housecode. Try the following: $ heyu on M2 and the module set to M2 should turn on, alternatively $ heyu off M2 and the module set to M2 should turn off.

You can configure your setup and upload schedules to your CM11A.

Step 3 – Hue talking to me?

X10 does not ‘interface’ with any technology that the Amazon Echo can control.  Crush from BWS Systems forked and created the ha-bridge.  It is a Phillips Hue emulator that runs as a java file (.jar) so it can be run on virtually any device.  The Amazon Echo will discover the emulator as a Phillips Hue bridge, and discover the configured devices.  When asked, the Echo will call the configured ON,OFF or DIM URL for each discovered device, this can now be script calls brilliant!  I can make the HEYU calls directly from the bridge.

The following steps download and get the bridge to run on the RPi:

Navigate to your root directory:

  • $ cd

Make a new directory named habridge:

  • $ mkdir habridge

Then navigate to the habridge directory:

  • $ cd habridge

Now download the latest JAR into the directory, you can get the latest here:

  • $ wget https://github.com/bwssytems/ha-bridge/releases/download/v5.1.0/ha-bridge-5.1.0.jar

Then rename the jar file to something ‘generic’ so we don’t have to keep changing the auto-start script when we download a new version:

  • $ mv ha-bridge-5.1.0.jar ha-bridge.jar

Now we want the ha-bridge to auto-run after reboot on your RPi, you will need to get it added into a startup script. Let’s do that now, enter the following command:

  • $ nano starthabridge.sh

Add the following to this file:
cd /home/pi/habridge
rm /home/pi/habridge/habridge-log.txt
nohup java -jar /home/pi/habridge/ha-bridge.jar > /home/pi/habridge/habridge-log.txt 2>&1 &
chmod 777 /home/pi/habridge/habridge-log.txt

Press CTRL + X, select to save the file. Then execute the following commands:

  • $ chmod u+x starthabridge.sh
  • $ sudo passwd root

Enter your RPi password (it asks twice). Next we’ll change to superuser to finish our install and autostart:

  • $ su -

It will ask you for the root password that you just created in the previous step. Enter it.
Your terminal will now switch to root@raspberrypi, enter the following commands:

  • # sudo su
  • # touch /etc/systemd/system/habridge.service
  • # chmod 664 /etc/systemd/system/habridge.service
  • # cd /etc/systemd/system/
  • # nano habridge.service

Add the following to this new file:
Description=HA Bridge
ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge.jar

Press CTRL + X, select to save the file. Then execute the following commands:

  • # systemctl daemon-reload
  • # systemctl start habridge.service
  • # systemctl enable habridge

The service should have now started and will start every time you plug in or reboot your RPi. If you want to check the status of the service type:

  • # systemctl status habridge.service -l

To return to normal user and leave superuser, enter the following command:

  • # cd
  • # exit

Once you’ve got the bridge running, add discoverable devices. The bridge comes with a configurator to make adding and editing devices a snap. As of release 3.2.0, the default HTTP port for the bridge is 80, to navigate to it I enter my RPi’s IP address in a modern browser (like Chrome, not MS EDGE):


Note: Now that the default HTTP port is 80, the “:80” portion is NOT required, this is the default HTTP port. Prior releases 3.1.0 and older use the default HTTP port of 8080.


The bridge supports dim commands from the Echo. The bridge returns three variable options, they are: ${intensity.percent} (for 1-100), ${intensity.byte} (for 0-255) or ${intensity.math} (for 0-255). By saying, “Alexa, dim the kitchen lights to 50%” that percentage will be passed in the ‘Dim URL’.  I’ve chosen to use ${intensity.math}, with X10 the dimming gets a bit tricky since X10 dim/bright is from 1 to 22. The ${intensity.math} allows me to manipulate the returned variable to fit my X10 needs, namely using ${intensity.math(((X*-22)/255)+22)} will get me the correct output.

Enter the Name of your new device, the On URL and the Off URL, and click Add Device. For my example device of M2, I would enter the following:

  • Name: kitchen
  • Device Type (Informational): Execute Script/Program
  • Map Type (Legacy): Execute Command/Script/Program
  • On Items:
    • Type: Execute Command/Script/Program
    • Target Item: heyu on M2

    Click the green “Add” button to the right.

  • Dim Items:
    • Type: Execute Command/Script/Program
    • Target Item: heyu dimb M2 ${intensity.math(((X*-22)/255)+22)}

    Click the green “Add” button to the right.
    (See Notes below…)

  • Off Items:
    • Type: Execute Command/Script/Program
    • Target Item: heyu off M2

    Click the green “Add” button to the right.

Click the ‘Add Bridge Device’ button. That’s it, you configured your first device.  Add all your devices.

Note 1: I chose to use dimb, this turns the X10 module on first then dims to the requested level. The dimb command more closely follows how Philips HUE dim commands will work with Alexa, since successive X10 dim commands will progressively dim the module to maximum dim level. Philips HUE devices will go dim or bridge to the reach the requested dim level rather than successively getting dimmer, hence the usage of the dimb command in my example.
Note 2: If using the X10 wall switch WS467 I suggest using obdim because these switches have a last dim level memory.

Step 4 – Alexa take control!

alexaOnce you have a device(s) configured, it’s time to tell your Amazon Echo to discover your devices.  Simply say, “Alexa, discover my devices”, she will go into discovery mode (approx. 20 second), and find the devices you’ve configured above.  Of note, you can manage the devices the Echo has discovered by visiting: http://echo.amazon.com going to ‘Settings’ -> ‘Smart Home’, or directly at http://echo.amazon.com/#smart-home.  This can be helpful if you remove or rename a device on your Hue Bridge Emulator.

Once discovered, the fun can begin, ask Alexa to turn your lights on and off!  For me house code M2 is my kitchen.  So I can say, “Alexa, turn on the kitchen”, and viola they turn on.

Step 5 – Easy ha-bridge version updates?

So, how do you update the ha-bridge jar file when a new release comes out? I’ll show you, replace the {version} text below with the version you wish to download.
Navigate to the ha-bridge folder:
$ cd habridge
Halt the ha-bridge systemctl service:
$ sudo systemctl stop habridge
Download the latest ha-bridge from github:
$ wget https://github.com/bwssytems/ha-bridge/releases/download/{version}/ha-bridge-{version}.jar
Rename the current ha-bridge file for reference:
$ mv ha-bridge.jar ha-bridge_LAST.jar
Rename the one you downloaded to the generic “ha-bridge.jar”:
$ mv ha-bridge-{version}.jar ha-bridge.jar
Restart the ha-bridge systemctl service:
$ sudo systemctl start habridge


Below I’ll compile information discovered along the way.

  • If you already have a real Phillips Hue bridge, you have to disconnect it first before searching for devices. – (Thanks Mitch)
  • If most of your X10 stuff is setup to run off radio, you can install a CM17A inline with the CM11a. – (Thanks Mitch)
  • The X10 “All lights on” command is: heyu lightson – (Thanks Mitch)
  • If your RPi is on WiFi, you’ll need to have Alexa and the Pi on the same wifi SID. This was essential. These days almost everyone uses WPA2 with AES so you need to reconfigure raspbian a bit ( https://coderwall.com/p/v290ta/raspberry-pi-wifi-setup-with-wpa2-psk-aes ). – (Thanks Elmer)
  • Java 8 is required for the ha-bridge to run. To check your Java version type $ java -version if it is not JAVA 8, then enter the following command $ sudo apt-get install oracle-java8-jdk. If you are getting “Unsupported major.minor version” error messages, then enter $ sudo update-alternatives --config javac and $ sudo update-alternatives --config java. This will set your RPi to use Java 8 globally. – (Thanks Max)
  • To control multiple modules (m1, m3, m4, m8, m10 & m16 for example) with one command, create the On and Off URLs just like any other module On/Off, but use this format for the house unit portion of the URL: heyu on m1,3,4,9,10,16. This will act on each device from one command. Also if you have units in succession, like m3, m4, m5 & m6 it can be expressed as m3-6. – (Thanks Frank)
  • Using the Raspberry Pi with a Firecracker CM17A is possible. HEYU is Firecracker compatible, you need to use the HEYU Firecracker “f” command construct. The ‘turn’ command also supports the CM17A commands fon, foff, fdim, fbright, flightson, flightsoff, falloff, and the applicable “fast” implementations of these commands. William reports, “I installed between the cm11 and the usb/serial interface, plugged in a receiver module tuned to appropriate house code and transmits a much stronger signal over the powerline. I had to change the scripts in the HA Bridge from “heyu on A1” to “heyu fon A1” or off to foff to activate the firecracker and viola it works.” (Thanks William)

I wrote a complimentary Bridge Control interface coded in PHP, that post is here.  It allows you to control all your configured ha-bridge devices on any PC, tablet or phone connected to your home’s internet.

715 thoughts on “UPDATED Amazon Echo X10 Home Control

    1. Yes, read this, but do note that recently Google changed the discovery of their new devices which requires that it connect to meethue.com. Since the ha-bridge only emulates the local API, and is not associated with Philips, this method will not work. If you have an older Google Home application, this may still work.

      1. I side loaded the Google Home application apk from a year ago and could not get it to work with HA Bridge.

  1. Hello Corey,
    I am attempting to set up my RPi and when I get to the ./configure i get this response and it halts. i have tried both ‘sh ./Configure.sh’ and ‘sh ./configure’
    xbian@xbian ~/src/heyu-2.11-rc3 $ sh ./configure
    checking whether to enable CM17A Firecracker support… yes
    checking whether to enable extended type 0 shutter controllers support… yes
    checking whether to enable RFXSensors support… yes
    checking whether to enable RFXMeters support… yes
    checking whether to enable Digimax thermostat support… yes
    checking whether to enable Oregon sensors support… yes
    checking whether to enable support for KaKu/HomeEasy signals… yes
    checking whether to enable split processing of RFXCOM master/slave… no
    checking for number of user flags… 32
    checking for number of user counters… 32
    checking for number of user timers… 32
    checking for a custom man1dir…
    checking for a custom man5dir…
    checking for a custom post-install script…
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    /home/xbian/src/heyu-2.11-rc3/missing: Unknown `–is-lightweight’ option
    Try `/home/xbian/src/heyu-2.11-rc3/missing –help’ for more information
    configure: WARNING: ‘missing’ script is too old or missing
    checking for a thread-safe mkdir -p… /bin/mkdir -p
    checking for gawk… no
    checking for mawk… mawk
    checking whether make sets $(MAKE)… yes
    checking whether make supports nested variables… yes
    checking build system type… armv7l-unknown-linux-gnueabihf
    checking host system type… armv7l-unknown-linux-gnueabihf
    checking for gcc… gcc
    checking whether the C compiler works… no
    configure: error: in `/home/xbian/src/heyu-2.11-rc3′:
    configure: error: C compiler cannot create executables
    See `config.log’ for more details
    The config.log does not have much info in it. See log details below.
    #define HAVE_FEATURE_EXT0 1
    #define HAVE_FEATURE_RFXS 1
    #define HAVE_FEATURE_RFXM 1
    #define HAVE_FEATURE_DMX 1
    #define HAVE_FEATURE_ORE 1
    #define HAVE_FEATURE_KAKU 1
    #define PACKAGE “heyu”
    #define VERSION “2.11-rc3”

    Any suggestions?

    1. Walter,

      I see you are trying to install HEYU heyu-2.11-rc3, maybe try heyu-2.11-rc2 instead – this is the version I am currently using and it’s been super stable. Did you do ./configure before doing the $ sh ./Configure.sh command? – This may have caused an install issue, HEYU does not use the typical ./configure. You’ll also need to be in the heyu directory ‘heyu-2.11-rc2’, $ cd heyu-2.11-rc2/ to configure.

  2. Hi Cory;
    Got my project up and running but when i ask Alexa to discover my devices is says: I have to enable smart home devices, when i go into the app and hit enable smart home devices a bunch of them comes up. Which 1 do I pick so it can see the ha-bridge and discover my devices.

    Thanks, John

    1. John,

      The HA-Bridge works without any Alexa Skill enabled. It emulates Philips Hue local discovery protocol. Once you have a working HA-Bridge with at least one device, all you have to do is discover your devices, say “Alexa, discover my devices.” OR use the Alexa app or webpage for discovery.

    1. Michael,

      Heyu does not work with a CM19A controller, but MOCHAD does. Here is a post that details how to get the CM19A and MOCHAD working. You can then use the MOCHAD commands in place of the heyu commands in the ha-bridge.

  3. Hi Corey,

    I did what you did in another way that may interest you… My video on it is over 1,700 views in a few months and many people have it working. While I was starting a facebook X10 user group tonight I found your solution. I am interested in doing a video showing your solution if it has some advantages.

    Everything I use is free. I use something that I think is like the HA Bridge you are showing (called TriggerCMD that my buddy Russ built). In the video I show it with Smartthings and Alexa, but it will work with just Alexa or Google.
    Let me know what you think
    Also here is a link to my x10 user group that has me and Russ in it so far. 🙂 I was surprised no Facebook X10 user groups existed. https://www.facebook.com/groups/450197118711197

    Good job btw. 🙂

    1. Nate,

      Hey thanks for your interest, I share your excitement with getting X10 (tech from the 70’s) interfaced with Alexa. The HA-Bridge emulates a Philips HUE bridge, and is discovered locally as such by smart home devices. It can be run on any system (Windows, Mac, LINUX, etc). Most people run it on a Raspberry Pi, $25 bucks and only needs 4 watts max, so it’s super affordable. Here are some of the advantages the HA-Bridge affords:

      • Single .jar file installation
      • Large crowd of experienced collaborative programmers working on it’s abilities
      • Web-based GUI
      • Device level IP filtering to allow configured devices to be accessible to only certain IPs.
      • Built in plug and play for the following Smart Home Tech:
        • Vera
        • Fibaro
        • Harmony
        • Philips HUE (passthrough)
        • HAL
        • MQTT
        • HomeAssistant
        • HomeWizzard
        • Domoticz
        • Somfy
        • OpenHAB
        • FHEM
        • Nest Thermostat
        • LIFX
      • Other built in abilities include:
        • HTTP Calls w/HTTP Verb, Body & Headers
        • UDP Calls w/HTTP Verb, Body & Headers
        • TCP Calls w/HTTP Verb, Body & Headers
        • Executable / Script Calls
      • Multiple calls per item (aka device) can be strung together, with timing and delay.
      • On, Off & Dim customization per device
      • Color support
      1. Haha I think you and I feel the same way… If it is working why mess with learning something new that offers the same benefit 🙂

        I do like the total control over my PC (and all of its apps I am currently getting and am happy to see your ingenious solution as an awesome alternative. Likely as with you I am very deep into a lot of time and setup with triggercmd.

        I do have one last question (sorry if it is obvious) could the Habridge, your using, send command lines to your PC to run whatever? Like this –> https://www.youtube.com/watch?v=sLIHcyNGkA0 From the photos it looks very similar to triggercmd but hard to tell. Maybe I should just take the time to play around with it… Some video links of it in action (and the cool things people are doing wit it) would be awesome.

        1. Yep, if it ain’t broke don’t fix it! I enjoy nearly 100% X10 control reliability too. No need to purchase new devices at $50 each when I can use X10 modules for a fraction of the price.

          Yes, the HA-Bridge will indeed fire any CMD line command. Have a look at BWS Systems’ webpage too: http://bwssystems.com/#/habridge.

          HA-Bridge is easy to install, if you have a Linux box, just follow my post starting at Step 3, but I think you are a Windows guy so you’ll need to modify the startup using NSSM.

  4. Corey –
    I’ve resisted getting a Philips Hue Bridge because your solution with the ha-bridge has allowed me to control not only all my X10 stuff, but also all my A/V stuff using an IR blaster (“Alexa, turn on the stereo,” for example), but now I’m wondering if there is a way to take the next step and also control things that require an actual bridge. I’m not even sure what technology the Hue Bridge uses…Zigbee or Z-Wave??? But the light strips my son added to his kitchen are truly impressive, and they require a Hue Hub.
    What’s your advice; should I just get a Hue Hub, or is there hardware that I could add to the R-Pi running the ha-bridge that could also do the same as the Hue Bridge? In a house filled with decades of legacy crap, it would be nice to be able to control everything with a single hub, or hub equivalent.

    1. Tom,

      The HA-Bridge has Philips Hue pass-through capability, so it can all be integrated into your current solutions. There are also Z-wave and ZigBee USB dongles to control those protocols with an RPi. I believe Philips Hue devices use their own proprietary protocol, which is a derivative of Z-Wave Zigbee I believe, hence the “Friends of Hue” family of products. One of the reasons I have not jumped in with two feet is cost, the HUE, Wink, etc devices are way overpriced for my taste, especially when I can control most things with my X10 devices. I’ve even converted my Keurig coffee maker to X10 control.

      1. Corey –
        Yeah, the cost of this new stuff is ridiculous, especially when I already have a bunch of x!0 boxes that work just fine. But…my son’s light strip is really cool. He can select a photo on his phone, and the light strip will mimic the predominant color of the photo. That’s cool. I’m not sure why anyone would want to do that, but you have to admit…that’s cool. It all seems like a solution desperately searching for a problem, now if I could just think of a reason I really need it. I think I’ll resist the urge to buy a hub, and see if I can figure out how to control the light strip with a USB dongle.

  5. This is a great write up and was a fun project. Thanks for pulling all of this together! One thing I have noticed is that Alexa is duplicating my X10 lights. I have 2 of every one. if I delete one, it comes back eventually. Any ideas why thins is happening? Is alexa seeing the On and Off commands defined in the Hue bridge as separate light maybe.? This confuses Alexa about which light to turn off with verbal commands since there are multiple matches.

    1. Joe,

      Yes, this is a known issue, see here: https://github.com/bwssytems/ha-bridge/issues/806. I have found that if you “Forget” the devices listed as “Dimmable Light”, the “Royal Philips Electronic intelligent device” will remain functional. This has been two days so far for me with without the “Dimmable Light” versions appearing again. It has to do with software versions in the Echos. My 1st gen Echo, 1st & 2nd Gen Dots, and Show all discovered devices as “Dimmable Light”. My new Spot discovers devices as “Royal Philips Electronic intelligent device”.

    1. I share your opinion being “unapologetic about using [X10] 1980’s technology for much of my HA. It’s cheap and it works for me.” My home automation is 95% X10, even to trigger my Keurig coffee maker.

      This is cool, your setup emulates the WeMo protocol, mine emulates Philie HUE, pretty much the same idea. Thanks for the post!

  6. Good Afternoon,
    I’ve used your setup for quite some time now, and I still get a kick at being able to use the old X10 stuff in my closet along with learning some Linux and playing with the Raspberry Pi – all good. X10 still has the problem with the split power phases in the house. I have tried the X10 phase transformer trick but still can’t get good communications across phases. SO, I was wondering, if the code can be rewritten to send a signal to simultaneously to two USB ports ( /dev/ttyUSB0 and USB1)? I know this would have limited usefulness to most, but for some reason I have two CM11As lying around and USB to serial interfaces are cheap. Thanks!

    1. Elmer,

      Glad you have enjoyed the Alexa – X10 control. HEYU does not allow for multiple CM11A’s to be connected for control. However, since you are having signal bridging issues and already have another CM11a you might consider a second Raspberry Pi setup, where the first one could call the second one for every call you need to bridge phases. If you tried using the X10 XPCR coupler repeater (good not great), I would try the SignaLinc 2406H phase coupler, it is the heart of my system. If you have not already, read my post about X10 reliability.

  7. I have what I hope is a simple question, as I have just found your program and I am trying to get everything going with a PI 3, CM11A with the correct cable, etc. I’m pretty sure I have all the latest software installed. I am able to control the regular, older X10 switches and lamp modules via command line, HA, and Alexa. I have 2 other sets of 3-way switches that I cannot control via any of these methods. Is there something special I am missing with these 3-way switches? These 3-way switches kind of worked sporadically when I attempted to use Active Home, and Alex10/HA-Bridge on a Windows 10 box using the CM11A, which is when I found the PI solution. I am also getting that Spark Error Message in the HA-Bridge log that I read someone else getting somewhere. Alexa actually says ok to turning them on/off, but obviously nothing happens, since they aren’t working via command line or by the HA-Bridge interface. Any thoughts on getting the 3-way switches to respond correctly?

      1. I pulled one out of the wall earlier tonight and it is a X10 Powerhouse 3-way WS477. Then the other switch is the slave. I have 2 separate sets of these 3-way switches in play in my house. For Years now I have only used the X10 Powerhouse Maxi (16) controllers – XC503 and 1 transceiver to control switches only. I used to have lamp modules, appliance modules, ceiling fan control switches, motion detectors, some Insteon switches, and the CM11A running macros and timed on/off schedules. We thought we were selling our house so I pulled everything out and when it was clear we weren’t really selling the house, I just added back regular switches for about 7 or so outside floods located all over the house and at our detached garage/apt. and these 2 different sets of 3-way switches. I did have the Signalinc Plug-in Phase Coupler for dryer module at one time as well. I don’t have any problems controlling all of the lights with the Maxi (16) controller, but I did have problems with the other stuff back in the day, so I know I do have the phase issue. I honestly cannot remember if that solution ever really worked back then. So, the long answer is, no, I am not sure if this is not a signal issue, just that I can control these same lights just fine with the maxi controller and it did turn the lights on and off occasionally with the Windows solution, just not reliably at all, which is why I turned to the PI solution as soon as I came across your information. I prefer Linux over Windows anyway. In your opinion, should these 3-way switches work in this scenario otherwise? I haven’t been able to find a very comprehensive list of different switch models that will work. I just thought surely these would, as they were pretty common and it sounds like from my reading that so many other sensors and devices possibly work with this setup. Does the CM11A have a strength issue over the maxi controllers that are plugged into the wall outlet as well? I just don’t recall. I had to dig my CM11A out of a box. I have read your information on signal strength already. I don’t think I have spare room in my panel and really can’t afford an expansion panel at this point. I can try moving the CM11A to different outlets to see if I gain control of the lights from that angle. Any other suggestions? (Coincidentally, I got my dad going before this on the Windows solution and Alex10 software via his CM15A.). I appreciate the time you have put into all of this. It is hard to find anyone still interested in X10. I’ve been expanding skills with Alexa lately, which put be back onto messing around with my X10.

        1. Jeff,

          I really enjoy discussing and playing with X10 equipment and have for years, especially now that I have integrated it with Alexa (and then some at this point). I also enjoy helping others with X10, so it’s no sweat!

          In my home now, I have nearly 100% X10 reliability due to 3 different devices I have installed to prevent the 3 most common X10 problems:

          1. Problem 1: Phase Coupling, I use the Insteon SignaLinc 2406H
          2. Problem 2: Signal Suckers, I use the Smarthome 1626-10 FilterLinc for and ‘noisy’ electronic devices, mostly TVs
          3. Problem 3: Weak Signal, I use two Smarthome 4827 BoosterLinc modules, one per phase

          I think from your description, you are suffering from Problem 3 a weak signal. I had the exact same issue with the exact same 3-way wall switch. The CM11a only puts out a 2.5 volt signal. I am not sure what the SC503 Maxi Controller puts out, but I’m sure it’s greater than 2.5 volts based on your observation. So this leads me to my own experience with the WS477 3-way wall switches. I had bought two sets of WS477 3-way’s with the slave switches NOS (New Old Stock) off of eBay before I discovered and installed the Smarthome 4827 BoosterLinc modules. I only opened one WS477 switch set and first installed it in my kitchen then in my living room. Just as you are describing, ehe switch in either location had terrible reliability when controlled by my CM11a. I actually packaged the open set and resold both WS477 3-way wall switches on eBay. Now the Smarthome 4827 BoosterLinc amplifies my X10 signal to 10 volts on each phase, and I bet the WS477 switch would work now.

          I think it is probably a combination of Problems 2 and 3 in your case. My advice would be to move the CM11a as close to one of the WS477 switches as possible to see if you get a consistent control. If you do, then you have proven it’s a signal strength issue, you are going to need to boost your CM11a’s signal somehow. You may even find that unplugging ‘noisy’ devices on that phase will increase the reliability – you’ll then also need a solution to Problem 2.

          My other advice is to NOT use the X10 XPCR coupler repeater, which may appear as a cheaper fix for what may be your issues. The XPCR does two things well:

          1. Couples the phases
          2. Repeats the signal multiple times to increase reliability

          The XPCR does other things poorly:

          1. Life longevity is short, I had 2 in 6 years
          2. Creates signal clashing when repeating extended X10 signals
          3. Signal delays and bright/dim issues
          4. Does not increase the X10 signal strength well
          1. Just got home early today and moved it to another outlet. Bingo. I got one of the 3-way switches to work, the lamp module now not working, and still not the other 3-way switches. I am starting to remember chasing these issues many years ago now. My house is a long one story with 1972 wiring. I really don’t know how to overcome the phase issue with your #1 solution above, as I am pretty sure I am tapped out in my breaker panel and the wife isn’t going to want me to spend money on that. I was also hoping to leave my PI attached to my tv for other purposes. I will have to ruminate on this. I’d love to stay in touch from time to time to pick your brain. I have got several projects floating around in my brain still involving the PI, Alexa, Hubs, other smart devices, X10, etc. I’ve played a little with the custom skills on Alexa utilizing the Amazon Developer Account and Lambda service. You have my email address I believe. Thanks so much for your quick and most excellent insight.

            1. Jeff,

              I’ll shoot you an email as soon as I get time this weekend. I have written an Alexa Skill so I can query the Echo to tell me if any of my HA-Bridge devices are on, off or dimmed to what level. My skill does a number of other things too, I’ll share in the email. Cheers!

  8. Corey,
    I’m using the CM17a and the HA-Bridge works great for everything on,off,dim but where do I enter the fbright command in the HA-Bridge. There is only field for on, off and dim? Sorry if this is a silly question.
    Thank you

    1. HA-Bridge does not have a Bright input field as it follows (mimics) the Philips HUE API protocol which only has ON / OFF / DIM.

  9. I’m using the dim control as follows :
    heyu fdim A5 ${intensity.math(((X*-16)/255)+16)}
    and it works well when I tell Alexa to dim by a certain amount but I need a way to raise the level if needed.

    1. Michael,

      Since the HA-Bridge is discovered by the Echo as a Philips HUE Bridge, it can only use the set API protocol that the Echo ‘speaks’ to the Philips HUE. Unfortunately, this only includes the verbs ON / OFF / DIM. I use a CM11, for which HEYU has the “obdim” command. This allows my X10 modules and switches to most closely work like Philips HUE. The “obdim” command triggers ON, FULL BRIGHT, DIM to given value, every time I give a dim command. This can be annoying when the light goes full bright, but it’s as close as X10 can come to the Philips HUE. There is not a CM17a equivalent in HEYU, the one you are using, “fdim” is the closest. The “fdim” command triggers ON, DIM to the given value, as you know. This is not good for modules and switches which keep the last DIM state in memory. Sorry there isn’t a way to add BRIGHT. The only option that comes to mind is to make two distinct devices in the HA-Bridge (different names). Then one device is ON, OFF, DIM; while the other is ON, OFF, BRIGHT. However, the second one would still need to be called by the DIM voice command, this is not very elegant.

  10. I’ve been using this setup for almost a year with no issues but over the weekend Alexa started saying it could not find my defined devices. Funny thing is, those same devices defined within a group work fine. I called Amazon after resetting the Pi, the Dot and redoing discovery which did not fix the problem and their thought was that my devices did not have a secondary name. Not really sure what that is and like I said this has worked seamlessly for almost a year. I’m hoping maybe somebody can give me some suggestions as I’m not sure what to do next.

    1. Randy,

      I suggest you do a few things. Update the RPi for starters, enter the following in the RPi’s command line:
      $ sudo apt-get update
      $ sudo apt-get upgrade

      Also what version of the HA-Bridge are you running? Currently, the latest release version is 5.1.0, with a release candidate 5.2.0RC3 in testing. Follow this ha-bridge version update How-To.

      Lastly I suggest you do the following in this order:

      1. Forget all devices from the Alexa app or webpage
      2. Click the Renumber Devices button in the HA-Bridge devices page
      3. Do a device discovery on the Echo or with the app or the webpage

      Give all this a try and let me know how you make out.

      1. I’m running version 5.1.0. but I have things working again. I noticed this afternoon that a few of my devices actually did work while most did not. The only difference I could see was that those that did not work I used an underscore in the device name such as “First_Floor”. When I removed the underscores and redid the device discovery, everything worked. It might be a coincidence but that fixed it. I’ve used the names with an underscore since I first set this up almost a year ago.

        1. Glad you figured it out. I’ll have to remember the underscore in the name detail, it’s a good find! Maybe Amazon changed something in their software, not sure.

          1. I’m not really sure why I used underscores to begin with, I must of thought there would be an issue with spaces between multiple word names. Anyway all is still good and thanks for the help Corey!

  11. Ha-bridge and permissions.
    Thanks, as I have been here before. Like anything, once you learn its easy.
    I have looked at the ha-bridge log and it shows my mistakes when I misspelled heyu, but nothing once all was correct. I looked at the syslog and it did not show anything amiss.

    1. Hey Steve,

      1. Tell me what you get returned when you enter $ heyu info in the command line of the RPi3?
        • If somewhere in the returned heyu info there is a line like this exactly: Configuration at /etc/heyu/x10.conf then do the next step:
      2. Type $ cd to get to your root directory. Then type $ cd /etc. Then type $ ls -l (that is lowercase ‘L’, lowercase ‘S’, a space, a minus sign, then lowercase ‘L’). This will return a long list of files and directories, find ‘heyu’ in the list and tell me what the permissions are by copying that line, something like: drwxrwxrwx 2 root root 4096 Jan 21 18:50 heyu.

      We’ll start there…let me know.

      1. Thank you for taking the time to assist.
        copied this from the output from heyu info

        Heyu version 2.11-rc1
        Configuration at /home/pi/.heyu/x10config
        Powerline interface on /dev/ttyUSB0
        Firmware revision Level = 1
        Interface battery usage = Unknown
        Raw interface clock: Sun, Day 019, 19:20:05
        (–> Civil Time: Sun 20 Jan 2018 19:20:05 CST)
        No schedule has been uploaded by Heyu.
        Housecode = A
        0 = off, 1 = on, unit 16…….8…4..1
        Last addressed device = 0x4000 (0000000000000010)
        Status of monitored devices = 0x4444 (0000000000001111)
        Status of dimmed devices = 0x0000 (0000000000000000)

        1. Steve,
          I see the issue, heyu is installed only for the user pi /home/pi/.heyu/x10config and the ha-bridge will not have access to execute heyu. Let me think about the best action with this one and I’ll get you an answer.

        2. Steve,
          The easiest course of action would be to add -c /home/pi/.heyu/x10config to your HEYU exec call in HA-Bridge. So the full command would be for example: heyu -c /home/pi/.heyu/x10config on A1, where “A1” is your desired device housecode and number and “on” is your desired command.

          The better course of action would be to re-install HEYU so it is globally accessible so that HA-Bridge can execute HEYU scripts. It appears that during your installation of HEYU you chose OPTION 1 when this dialog was presented: I did not find a Heyu configuration file.
          Where would you like the sample Heyu configuration file installed?
          1. In directory /home/pi/.heyu/
          2. In subdirectory .heyu/ under a different user home directory
          3. In directory /etc/heyu (for system-wide access)
          4. No thanks, I'll take care of it myself
          Choice [1, 2, 3, 4] ?

          The correct choice is OPTION 3.

          Try the easier option adding the path to the config file in your call and let me know if it works. If you get it working and then want to, I’ll walk you through re-installing HEYU.

  12. Thank you.
    The -c /home/pi/.heyu/x10config for the call did the trick. I used it for the rest of my devices and had no problem getting them all to work.

    As for the reinstall, I looked at the FAQ’s for Heyu and found that going to the the Heyu directory and as ROOT typing “make uninstall” will uninstall Heyu. I will then (being very very careful on typing) reinstall. Since the first fix is working and I have little expansion planned, this is a future project for me.

    Again, thank you very much for your help.

Leave a Reply

Your email address will not be published. Required fields are marked *