Announcement

Collapse
No announcement yet.

Get Devices (& Features) of Plug-In

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get Devices (& Features) of Plug-In

    Sorry if this is posted elsewhere but I could not find it. The documentation and sample plug-in are very sparse - I don't get putting HS4 out without the docs being done...

    Is there a way to get all devices that my plug-in owns or do I still need to enumerate through all of the devices in the system? I see GetDeviceByAddress/Ref but - and I may be looking at it with my old HS3 eyes - is there not a method to get by interface name?
    Regards,

    Rick Tinker (a.k.a. "Tink")

    #2
    Code:
    List<int> refs = hs.GetRefsByInterface(plugin.Id, deviceOnly: true);

    Comment


      #3
      Thanks, but that can't be it. It is not documented.
      Regards,

      Rick Tinker (a.k.a. "Tink")

      Comment


        #4
        GetRefsByInterface (interface_name)

        Comment


          #5
          Originally posted by Rick Tinker View Post
          Thanks, but that can't be it. It is not documented.
          It is there it is just that the search function is shocking and cant find anything.

          See Here.
          Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
          X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
          Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
          Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
          Scripts =
          Various

          Comment


            #6
            Originally posted by enigmatheatre View Post

            It is there it is just that the search function is shocking and cant find anything.

            See Here.
            Yes, two problems - you are right that the search function is horribly broken because it never found it even when I knew part of the name, and secondly, it belongs in the plug-in API section not the general HomeSeer section (or both) because it is 90% plug-in development related.
            Regards,

            Rick Tinker (a.k.a. "Tink")

            Comment


              #7
              Originally posted by Rick Tinker View Post

              secondly, it belongs in the plug-in API section not the general HomeSeer section (or both) because it is 90% plug-in development related.
              I believe this method is a member of the IHsController class, which is available to your scripts as a member of the hs object, not just for use in plugins.
              tenholde

              Comment


                #8
                Originally posted by tenholde View Post

                I believe this method is a member of the IHsController class, which is available to your scripts as a member of the hs object, not just for use in plugins. ...
                Yes, I know - but given it returns references to devices owned by plug-ins, shouldn't it be in the plug-in SDK first and foremost? That is all I am saying.
                Regards,

                Rick Tinker (a.k.a. "Tink")

                Comment


                  #9
                  Originally posted by enigmatheatre View Post
                  It is there it is just that the search function is shocking and cant find anything.

                  See Here.
                  It's not "search" is shocking - it's the whole documentation is crap - it's built on source code comments, but HST eventially gave up on comments ans switch back to their old "style".

                  I just look at the IHsController and IPlugin in source...

                  Comment


                    #10
                    Originally posted by Rick Tinker View Post

                    Yes, I know - but given it returns references to devices owned by plug-ins, shouldn't it be in the plug-in SDK first and foremost? That is all I am saying.
                    I believe if these functions were to be moved to the plugin name-spaces, they would be inaccessible to scripts.
                    tenholde

                    Comment

                    Working...
                    X