Results 1 to 7 of 7

Thread: cm15 command codes.

  1. #1
    Automated Home Lurker
    Join Date
    Jun 2010
    Posts
    4

    Default cm15 command codes.

    Hi guys, i've started to play with the cm15 using my own code. I've enumerated the USB devices and can get the file path to it allowing me to write and read x10 stype commands (although not tried that last bit yet, got work to do).

    I wonder if anyone has some links to cm15 commands or if you've already done this and have some hints.

    Thanks.
    Richard e Collins.


  2. #2
    Automated Home Jr Member
    Join Date
    Jul 2009
    Posts
    28

    Default

    What language are you using?

    You can use the AH SDK, and just use the exe that comes with it, ur you can use the DLL.

    From the SDK using a batch file:

    ahcmd.exe sendplc A1 OFF // Turns A1 off

    My biggest issue is to 'know' or 'find out' state before sending a command - I would love to know how to check this...

  3. #3
    Automated Home Lurker
    Join Date
    Jun 2010
    Posts
    4

    Default

    I could'nt find thier SDK, but i'm using c# for the final software implementation. I do have a version in C/C++ but that was just a proof of concept.

    Yes state info is why i'm having a look at the cm15 as the cm11 controller i've got only gives 16 switch states of the monitored house. I'm hoping that the cm15 will give better dimmer info so I don't have to star burst dimmers after the system has been reset to make sure i'm in sync.

  4. #4
    Automated Home Jr Member
    Join Date
    Jul 2009
    Posts
    28

    Default

    Have a look at:

    http://www.activehomepro.com/sdk/sdk-info.html

    Samples are all in C++ and the 'ah C View' is good to see monitoring/listening for PLC commands.

    I have tried to port this to C#, but my C++ is way too rusty

    What I have found is that the ActiveHome software would 'listen' or 'monitor' the line, and when you use an external command to send it to the device, the software will know (and flick a switch in the GUI) - something I would love to get to work in C# - anyone that can port this out there?

    CM15 is so much easier to program with. Let me know if you can get this to work?

  5. #5
    Automated Home Lurker
    Join Date
    Jun 2010
    Posts
    4

    Default

    Thanks for the link, will give me somewhere to start with. As for reflecting in a UI what is going on in the real world if the cm15 is anything like the cm11 i've used then it should pass onto the app any X10 command it recives that it did not send. I've used this with my cm11 code to toggle switches and lights on a Silverlight web page. Nice thing as the commands passes back to the software is not resticted to the monitored home. I'm expecting that this will be the same for the cm15 but with better state reporting for dimable controllers.

    Time will tell.

  6. #6
    Automated Home Jr Member
    Join Date
    Jul 2009
    Posts
    28

    Default

    Depending on how you do it, if you use the SDK dll, there are some issues with QUERYPLC commands.

    How do you connect to the device and send the commands?

  7. #7
    Automated Home Lurker
    Join Date
    Jun 2010
    Posts
    4

    Default

    I've not had a chance to try it yet, but I understand that I can use the string returned back from 'SetupDiGetDeviceRegistryProperty' for the property 'SPDRP_PHYSICAL_DEVICE_OBJECT_NAME' and open the device as a async file, it's how i've seen some linux guys doing it. Although Unix has a better user space driver setup.
    When I get a chance i'll see if I can open the device as a file and write some commands to it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •