Saturday, January 24, 2015

Network Control of X10

I really love remote control!
This project allows you to control your X10 devices from any web browser.

The Arduino is used as a web server which puts up a page with controls for House Code, Unit Code, and Command. 

The response is sent back to the Arduino which sends out the X10 commands wirelessly through the CM17A module.

So far it's just on my local network but it appears to be working pretty well.

Still a few things I'd like to change, but the current  Arduino source code is available here.

13 comments:

  1. An annoying question: I've been trying to use the CM17A library posted on arduino.cc with the 1.6 IDE and keep getting a missing library message (for wiring.h), copied below. I can't find any reference to a wiring.h library anywhere...any thoughts?

    C:\Documents and Settings\Scott A. Morris\My Documents\Arduino\libraries\X10Firecracker\X10Firecracker.cpp:24:20: fatal error: wiring.h: No such file or directory
    #include "wiring.h"
    ^
    compilation terminated.
    Error compiling.

    ReplyDelete
    Replies
    1. Why don't you just use the CM17A tab and forget about the library. I wrote the code for the CM17A and I'm not crazy about the libs either.

      Delete
  2. Did you mean output signals directly to the pins?

    Turns out the "wiring.h" has been replaced by "arduino.h" in the latest incarnation. After fixing that problem, the compiler fails in all directions - but only for me. Posted errors to arduino.cc and the response said their attempt worked fine.

    If it was easy, everyone would do it.

    ReplyDelete
  3. No I mean use the example I posted (for a start). It has a tab - CM17A that takes the place of that library. It's smaller and works better. Why make it hard on yourself by insisting on using that lib?
    Look at the example posted.

    ReplyDelete
  4. Hello, I'm also getting the ..." 10Firecracker/X10Firecracker.cpp:24:20: error: wiring.h: No such file or directory" when I try to compile for any Arduino board... Surprisingly I can compile fine for the Attiny85 (all Attiny) no error. I was going to use your web server anyway, so I can use the CM17A tab, but I was also trying waltsailing2009 web server and kept getting those compile errors. Any Idea ?

    ReplyDelete
  5. Yea, you need to find a CM17A lib that has been updated for the v1.x IDE. It need to have Arduino.h and not include wiring.h I think I have one. But like I said in the post above not using the lib works better for me.

    As far as the waltsailing code goes I started with it but found what I think is a much better server code.

    But whatever. If you want the lib PM me and you can have it as is.

    ReplyDelete
  6. Well thank's, I will PM you (I assume it means Please Mail.. :-)) or you could tell me where to find it, if you have the time. I'm using v1.6 IDE, on a MAC. I agree that your code is better, I was looking at both more as an exercice to learn HTML... but seeing what it can do now, I will study it more closely. Thank's again for your teaching an please keep it up !

    ReplyDelete

  7. Here is the CM17A lib that should compile with IDE 1.0.x. It should work with 1.6 too but haven't tried it.
    It's basically a wrapper for what I have in the CM17A tab.

    https://dl.dropboxusercontent.com/u/3572198/Blog%20Files/X10Firecracker.zip

    ReplyDelete
  8. Thank's BroHogan, I tried this CM17A lib on IDE 1.0.6 and taadaa everything, meaning every boards, works now !!! Glad and releived am I !!! I just ordered a WIZ550io and was starting to have doupts :-( , so once again thank you

    ReplyDelete
  9. Hi again, just reporting total success with your code a Nano V3.0 + Wiz550io... ( http://www.instructables.com/id/Arduino-Nano-with-WIZ550io-Easy-Internet/step2/Making-the-Connections/ ) in my testing I must have hit your Gork picture a hundred times, but I have mine now... I'm impressed how well it works, immagine, even my wife said "for once this might be usefull !!! :-)" I'm using a static internal LAN address like 192.168.1.10. So... no more doupts now... Bye and thanks again.

    ReplyDelete
  10. Aces JR. Good to hear it's all working for you.

    ReplyDelete
    Replies
    1. I added this line: Unit[1] = rtrnString[unitIdx +2]; to read unit numbers of two digits. Unit[1] defaults to the null character if you type in any single digit number so atoi(Unit) will convert properly...
      I don't know if you corrected your ghost command, but whenever you refresh the web page you also send the last command typed, this is surprising because you do: rtrnString="";
      It could be the browser cache remembering this last command !

      Delete
    2. Thanks. I didn't test for Unit >9. (I'm not really using it in a practical situation yet ;)

      You may be right about the cache. I wonder if there is a html tag for "no cache" or something.

      Delete