Announcement

Collapse
No announcement yet.

Inner Join on multiple Categories

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

    Inner Join on multiple Categories

    Categories in HS4 makes me very happy, as it allows me to do many of the things that I was previously doing in an old home automation environment with regards to identifying sets of devices to manipulate. However, unless I missed something, I would suggest an addition in the form of an API that accepts a list of IDs on which it performs an inner join (intersection). I am assuming that there is an SQL query going on underneath, which would be much more efficient than doing multiple API calls and then joins.

    Also, these API's deal with IDs rather than Names of categories, yet even though HS4 does not permit duplication of Names, one still must enumerate the results of GetAllCategories() in order to locate the correct key (ID) for the Name (Value). That does not seem like it should be necessary.

    #2
    Originally posted by popeye View Post
    ...I am assuming that there is an SQL query going on underneath, which would be much more efficient than doing multiple API calls and then joins...
    I would not assume this at all.

    Comment


      #3
      Yes, looking at things it appears not. But it could just be added anyway to make an even more useful API.

      Comment


        #4
        Originally posted by popeye View Post
        I would suggest an addition in the form of an API that accepts a list of IDs on which it performs an inner join (intersection).

        Also, these API's deal with IDs rather than Names of categories, yet even though HS4 does not permit duplication of Names, one still must enumerate the results of GetAllCategories() in order to locate the correct key (ID) for the Name (Value). That does not seem like it should be necessary.
        GitHub is better place for this, it's highly unlikely any HST employee will look here in the forum.

        https://github.com/HomeSeer/Plugin-SDK/issues

        Comment


          #5
          Please look here: http://tenholder.net/tenWare2/Script.../Overview.aspx

          If you detail the specs for a new extension -- method name, parameters, result I'll look at adding it.

          I, too, find the use of Categories to be very helpful. You can do things like: Turn ON all lights in Category LIGHTS and OFFICE.

          tenScriptAid4 will provide a much easier way to manage Categories.
          tenholde

          Comment

          Working...
          X