cm15 command codes.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • RichardUK
    Automated Home Lurker
    • Jun 2010
    • 4

    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.

  • Creagan
    Automated Home Jr Member
    • Jul 2009
    • 28

    #2
    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...

    Comment

    • RichardUK
      Automated Home Lurker
      • Jun 2010
      • 4

      #3
      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.

      Comment

      • Creagan
        Automated Home Jr Member
        • Jul 2009
        • 28

        #4
        Have a look at:



        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?

        Comment

        • RichardUK
          Automated Home Lurker
          • Jun 2010
          • 4

          #5
          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.

          Comment

          • Creagan
            Automated Home Jr Member
            • Jul 2009
            • 28

            #6
            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?

            Comment

            • RichardUK
              Automated Home Lurker
              • Jun 2010
              • 4

              #7
              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.

              Comment

              Working...
              X