LinuxMCE: adding CM11 interface

LinuxMCE logo

In spite of a big list of disadvantages and a bunch of modern home automation technologies X10 is still popular and used. LinuxMCE – open source smarthome system supports X10 devices and allows to connect CM11 to be able to manage them. That new wiki post describes briefly the procedure of installation and configuration CM11 under LinuxMCE. So, hope it’ll useful for all who decided to use LinuxMCE and X10 together.

Related Posts:

  • Plutohome wiki
  • LinuxMCE progress in 2010
  • Howto Build Plutohome Orbiter for Nokia770/N800/N810
  • Using Nokia770/N800 as a Plutohome Orbiter
  • Howto setup Plutohome Web Orbiter
  • SlimServer didn’t start under Plutohome

  • 15 comments:

    1. Sam, 3. August 2007, 20:10

      That’ll be helpful, thanks !

      I had it working fine until I used an X10 IR sensor, or any X10 remote. These cause x10 signals to reach the CM11 which adds them into an internal queue (I think). When pluto/MCE sends an X10 message to the CM11 it expects an acknowledge from the CM11 but the driver won’t differentiate between the ACK and the previous X10 event still waiting in the queue. So until you restart the CM11, pluto won’t be able to send commands to the lights. At least, this is my interpretation of the problem.

      So I’ve made a quick wrapper to a nice program called heyu, which handles this situation without problem. Next step will be to make it bi-directional, which should be very easy given heyu’s flexible architecture: it can call scripts when X10 events are received. So we’ll just need to call /usr/pluto/bin/MessageSend to notify pluto.

      Here is the code for the wrapper:
      – Create a device template: “heyu X10 software controller”
      – category “Interfaces – generic IO”
      – edit ruby codes and add command #384 Process Receive Command For Child

      # retrieve the X10 device address (HU: HomeUnit) from child device
      x10_HU=device_.childdevices_[cmd.devidto_].devdata_[12];

      case cmd.id_
      when 192 then # POWER ON
      action="turn "+x10_HU+" on";
      when 193 then # POWER OFF
      action="turn "+x10_HU+" off";
      when 184 then # DIM value
      # map brightness from 0-100 to 0-22
      brightness=(cmd.params_[76].to_i/100.0*22).round.to_s;
      action="turn "+x10_HU+" dim "+brightness;
      end

      syscommand="heyu " + action;
      puts "Executing: "+syscommand;
      system(syscommand);

      Worked fine for me. If someone got the CM11a working fine together with X10 IR sensors and RF remotes, I’d be happy to switch back to pluto’s implementation (although this one works fine too)

      Hope this is useful
      Sam

       
  • Zaerc, 4. August 2007, 2:40

    You are more then welcome, glad to hear it’s appreciated.

    I don’t have any X10 sensors or remotes (yet), so this hasn’t been a problem for me (and I’m still finding my way around things). But I am interested, and since other people might be too, I have added a pointer on the wiki page to the comments here as well so that your workaround should be easy to find for whoever may need it.

    PS, thanks again for that gc100 workaround. I’ll try to do a similar page when I have that set up to my satisfaction. You obviously have a lot more experience with these things then me, perhaps maybe I could bug you with an occasional question?

     
  • eloy, 5. August 2007, 10:02

    What about the Firecracker (http://www.smarthome.com/1141.html) ; has anyone gotten that to work with Pluto/LinuxMCE?

     
  • Sam, 5. August 2007, 22:11

    Hi Eloy, by chance, I have also done a small wrapper for the firecracker before I bought the CM11 πŸ™‚
    But itΕ› a lot uglier than the one above, it works fine for ON/OFF commands but not so good for dimming.

    See here for firecracker support via the bottlerocket utility:
    http://forum.linuxmce.org/index.php?topic=275.msg4319#msg4319

    Zaerc, I’ll be glad to help if time permits, I usually read most of the plutohome forums. You can IM me there to user “caiman”

     
  • eloy, 5. August 2007, 23:39

    This is cool Sam, thanks for the information. I’m very familiar with bottlerocket so I’ll be giving the above a try. Thanks again! πŸ™‚

     
  • Michael Stepanov, 6. August 2007, 12:21

    Thanks for your replays, guys. I think it’ll be good to post your workarounds into LinuxMCE and Plutohome wiki to help people bring up x10 under LinuxMCE and Plutohome.

     
  • Daniel Nadeau, 21. October 2007, 0:09

    I’ve tried for several days to get Sam’s wrapper up and running, but I need some extra help. I have an X10 system in my home with RF devices too. I’ve been able to get heyu to control lights from the command line, but I have never been able to get linuxmce to control the CM11a properly. Has there been any advancement on the bi-directional support? Also, could someone update the linuxmce Wiki with detailed instructions on how to get X10 working? Linux MCE is great, but for those of us that have large X10 implementations, it can be a nightmare.

     
  • hadyos, 22. October 2007, 20:24

    I’ve tried Sam’s wrapper but I don’t understand where should I put this wrapper.
    Is “heyu X10 software controller” is a top level device? What child devices should I add under it. ( The Lighting device are unaviliable under that device)
    Could you be more clear on how use this “heyu X10 software controller” ?

     
  • Michael Stepanov, 23. October 2007, 15:15

    2 hadyos: I suspect that you have to add heyu X10 software controller as an interface, after that add CM11 and define heyu as parent device for it. The rest X10 devices – switches, sensors etc should be controlled via CM11.

    Pluto or LMCE will route X10 command for switch, for example, to CM11 and then – to heuy where the command will be modified to solve the problem with interpretation X10 commands.

    By the way, I setup yesterday CM11 and TM13U. They work perfectly without heyu wrapper.

     
  • Jose, 28. September 2009, 15:02

    Can anyone tell me where to heyu wrapper is it like CM11A then Heyu Wrapper then light switch, I have played with this all weekened I am getting a headache

     
  • Michael Stepanov, 30. September 2009, 11:32

    Jose, didn’t get what do you need πŸ™‚ Can you explain, please?

     
  • Jose, 1. October 2009, 4:43

    Hi I tried to setup CM11A With light switch it did not work I can control the light with heyu, I was trying to implement sam’s workaround but I am not sure where to put the it, is the heyu wrapper between the CM11A and the switch, give me some info.

    Thanks
    Jose

     
  • Michael Stepanov, 1. October 2009, 21:37

    Jose, do you use LinuxMCE? If so in 0710 CM11 should work out of the box without any workaround.

     
  • Jose, 2. October 2009, 1:45

    it does not I have reloaded so many times I have try linuxmce 0710 and also 0810 try different computer I able to turn the lights off with heyu and bottlerocket and also windows xp but notting happens when I use linuxmce the CM11A says its registered but the light switch does not.

     
  • Jose, 2. October 2009, 1:52

    This is the message I gets

    01 10/01/09 18:35:48.647 Failed sending address. 01 10/01/09 18:37:04.175 Failed sending address. 01 10/01/09 18:38:19.675 Failed sending address. 01 10/01/09 18:50:28.207 Failed sending address.

     
  • No comments yet.

    Write a comment: