more G-Labs products

Author Topic: Need help with X10 devices  (Read 2655 times)

May 07, 2015, 02:51:26 AM
Read 2655 times

JJ

  • *
  • Information
  • Newbie
  • Posts: 13
Hi,

Could someone post a how-to for installing X10 devices please?

I currently am using AHP on Windows with a CM15A controller. It is a relatively simple setup and works well. But I need to both change the computer and update the OS. So I would like to switch to HomeGenie running on a FreeBSD computer.

Install and setup was quick and went well. I configured the dashboad and set up the Weather Underground app. It updates properly and the web display is correct. I then connected the CM15A, enabled the house codes I am using, and added the devices. But none of them turn on or off so I (obviously) did something wrong or didn't do something that is necessary.

Which leads to some questions. When a device is added to AHP a device type (Lamp, Appliance, etc.) and the specific type (e.g. for appliances 2 pin AM486, 3 pin AM466, etc.) ) is required. The X10 protocol doesn't seem to require that but AHP only works if the correct device and type is specified. There doesn't seem to be any way in HG to supply that information. Is it not required or does HG have some way to specify it that I have not found?

A second question relates to a program directory reference from another forum:
  Quote from: Genie at HomeGenie forum
  You can get HG sourcecode and have a look to the CM15 driver:
  HomeGenie\MIG\Support Libraries\XTenLib\Drivers\CM15.cs
The directory tree does not seem to exist in my download. Is this an obsolete reference or does it only apply to some other OS?

Help is badly needed and any help would be very appreciated!
« Last Edit: May 07, 2015, 03:33:42 AM by JJ »

May 07, 2015, 03:36:53 PM
Reply #1

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
Been a while since I added my devices with my CM11.  Some ideas to try:

Do you get any popup's in the upper right corner of HG?  These let you know what is happening.

Go into config, settings, make sure you have your COM port or USB selected, and enable over to the right.  I think you mentioned selecting the house codes

Go into config, maintenance, enable event history (near bottom)
Go back to dashboard, control, turn a light on, wait, then off.  click the blue circle, you'll see a list of events.  At the bottom in the domain type "X10" to filter so only X10 messages show.  Here is what my event history looked like after turning A1 off and on:

Code: [Select]
9:32:20.774 AM Status.Level 0 A1 HomeAutomation.X10
9:32:11.84 AM Status.Level 1 A1 HomeAutomation.X10

May 07, 2015, 05:12:44 PM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
There are different types of modules that can be specified in HG.  For a standard X10 module, the primary ones are light, dimmer, switch.  If you pick light, then it's an on/off type module and will only have those controls in the interface.  If you pick dimmer, then you will also get a slider bar to pick the dim state.  If you choose switch, the icon is different but I'm not really sure it operates much different.  The 3 types send the same command when turning on/off a module but they are treated slightly differently in code so the difference does matter if you get into scripting.  X10 doesn't really have switches that you would need to control, so I would suspect your entire setup could be defined with lights and dimmers.

Now, that may cause issues when it comes to using HG as far as appearance but not functionality.  If you had an attic fan in your setup and it looked like a light, that might be confusing.  You can change the icon to something different as well, but I have not played with what's available, so I don't know how extensive the options are.  Again, functionally it will work fine with any icon.

May 08, 2015, 06:37:11 AM
Reply #3

JJ

  • *
  • Information
  • Newbie
  • Posts: 13
Thanks for the responses.

kevin1 - Yes I get the pop-ups and the on unit count (?) displayed. I appreciate the information about event history. When I activated it, the events displayed match what you posted (other than the difference in unit codes). But the test light still did not turn on and off.

bkenobi - That matches my understanding of the X10 protocol. I had found the icon directory and changed the icons attached to the units I had configured to better match what I have them used for. I expect that I could generate my own icons and add them to the directory as needed.

The problem seems to be that the CM15A is not communicating properly.Since HG apparently was originally designed to use the same type of CM15 used by the Marmitek AHP, I loaded that program as a test. When I added lights and tried them everything worked. I don't know if there is any reason to, but I would take a look at the code as Gene suggested but I cannot find the directory tree he referenced.

Any other suggestions are appreciated.
« Last Edit: May 08, 2015, 06:40:19 AM by JJ »

May 09, 2015, 03:43:34 AM
Reply #4

JJ

  • *
  • Information
  • Newbie
  • Posts: 13
FWIW, I have confirmed the problem is with the USB interface to the CM15A.

A packet capture shows the CM15A announcing itself and a USB device dump shows all of the expected information. But turning X10 devices on and off in HG generates no USB packets to the CM15A.

So I now have a different question. Has anyone used HG on a non Linux based platform such as FreeBSD or a Mac?

May 11, 2015, 12:43:11 PM
Reply #5

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
Sorry - mine is Windows7, and USB to serial adapter, then to X10 CM11.

May 11, 2015, 05:22:36 PM
Reply #6

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I am using a US version of the CM15A.  Gene uses a European version as far as I know (he's in Italy obviously).  I had issues initially when I tried to get my hardware working and when I provided some USB communication to Gene, he was able to get things up and working very quickly.  If you are using a newer version of the CM15A from Authentix rather than old X10, they may have changed something subtly that is causing HG not to identify it correctly.  I'd recommend opening an issue on on Github so Gene can track it and get things sorted out.

May 13, 2015, 12:41:01 AM
Reply #7

JJ

  • *
  • Information
  • Newbie
  • Posts: 13
Thanks for the info and recommendations.

I am also using the US version of the CM15A. Since it works for bkenobi, I suspect the problem may be in differences of the implementation of the USB stack. Or in something I missed on the install. I will try raising the issue on Github to see if it can be resolved.

May 13, 2015, 05:55:03 AM
Reply #8

JJ

  • *
  • Information
  • Newbie
  • Posts: 13
Solved. Gene responded and pointed to the code section almost immediately.

The USB library module configuration is only coded for Debian.  HG establishes its own symbolic link to the correct location. The name & location are different in FreeBSD. So manually creating the link fixes the problem.

Now on to the rest of the options.