Sunday, November 22, 2015

Network Control of X10 - take 2

I posted an earlier version of this, but it was based on the Atmega328 and an Ethernet module.

This version is based on the ESP8266 which provides the microprocessor and connection to the network via WiFi.

I've been having a ball with the ESP8266. It's cheap, programs with the Arduino IDE, and it just works. I've already created a product with it that connects my Geiger Kits to the internet.

So what is it?
The ESP8266 puts up a webpage (like the above) on your local network. The page has buttons for the X10 devices that you want to control. When a button is pressed the ESP8266 drives a CM17A and turns your device on or off. The page also displays any sensor readings that are connected to the ESP8266. So if you are into X10 home automation, this is a cool gadget.

Hardware-wise it's an ESP12 variant of the ESP8266. It's connected to the CM17A through a level shifter. The level shifter is needed because the ESP8266 is a 3.3V device and the CM17A requires 5V to operate. (Since the CM17A is powered by the difference between RTS and DTR strong pullup resistors must be used on the high side - 330Ω.)

You can also attach an I2C OLED display to the ESP8266 which will show the X10 commands that were received.

Here is the complete setup. I used the ESP8266 development board I created for the GK-WiFi kit (available here).

The software is finished (as far as I'm concerned) and is available here.


  1. Very cool. I'd be interested on follow-up posts. Is your code posted somewhere for this project?

  2. Not much more to add actually. I'll edit the post with a link to the source.

    Good luck with it & happy holidays!

  3. this is very good. I'm a noob and still managed to get it to work. A couple of small problems :1) after a fairly short time (minutes) the esp goes quiet and won't respond to web requests. eventually the web page times out. I've tried to find out more about the sleep modes, but it seems most of what I read is more about how to enable sleep. Do you have any idea of what I may be doing wrong/overlooking? Thanks for your help!

    1. It seemed pretty stable for me during the period that I had it up.

      The ESP will only sleep if it is told to. The sketch does not have it sleep IIRC.

      The only suggestions I have are (1) make sure you have enough power - i.e 5V USB PS, and (2) check the serial output to see if the ESP is crashing.

  4. This comment has been removed by the author.

  5. can you send me a link to your code