Announcement

Collapse
No announcement yet.

Press and Release HSTouch Element from Script

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

    Press and Release HSTouch Element from Script

    If I'm interpreting the docs properly, it looks like ClientAction 56 should do this.

    I've tried several iterations of this, but it doesn't work:

    hs.PluginFunction("HSTouch Server", "", "ClientAction", New Object() {56, "Android:CLIENT NAME", "SCREEN:ELEMENT", ""})

    CLIENTNAME and SCREEN:ELEMENT are replaced by appropriate tablet name and screen/element.

    It works via an event, but I have too many potential tablet/element combinations which would require a ridiculous number of events to cover them all. I need to pass the tablet ID and element to a script for execution.

    I'm sure it must be a simple syntax error on my part. Or maybe 56 is the wrong action number?

    Has anyone successfully called an element press & release via a script?

    #2
    Try taking out the 'NewObject()' entry.
    hs.PluginFunction("HSTouch Server", "", "ClientAction", {56, "Android:CLIENT NAME", "SCREEN:ELEMENT", ""})
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      I believe 56 is the wrong action number for what you're trying to achieve. According to what I've seen documented, 56 is "Control a HomeSeer Device using Element Selection" (Listed under the HomeSeer: section of the action drop down list). Your post title implies you want to press and release an HSTouch element, which would be action numbers 10 and 20 which correspond to "Select/Emphasize an Element" and "De-select/Deemphasize an Element".

      I posted a list of the action numbers and their equivalent HSTouch actions in the Designer (as I understand them) here

      https://forums.homeseer.com/forum/ho...02#post1395302

      Comment


        #4
        Oops, my bad. I copied and pasted from the wrong script and NewOpject() was never in there. I had exactly what you suggested.

        Didn't work that way.

        Any other thoughts?

        If not, I suppose I could pass the screen/element name to a virtual device to be used in an event. Not sure if or how it's possible to get the virtual device's status here though:

        Click image for larger version

Name:	Screen Event.PNG
Views:	151
Size:	45.4 KB
ID:	1443416
        I'd rather not because I would have to have 10 events - one for each tablet. At least I could avoid creating events for the 30+ element options I have (multiplied by the number of tablets).

        Comment


          #5
          Originally posted by mterry63 View Post
          I believe 56 is the wrong action number for what you're trying to achieve. According to what I've seen documented, 56 is "Control a HomeSeer Device using Element Selection" (Listed under the HomeSeer: section of the action drop down list). Your post title implies you want to press and release an HSTouch element, which would be action numbers 10 and 20 which correspond to "Select/Emphasize an Element" and "De-select/Deemphasize an Element".

          I posted a list of the action numbers and their equivalent HSTouch actions in the Designer (as I understand them) here

          https://forums.homeseer.com/forum/ho...02#post1395302
          Thank you so much for that! My list didn't include #s 10-40 for some reason.

          It looks like it should be 37, but I'll try them when I get home from work today.

          Comment


            #6
            Heck with waiting until I got home - I was able to do it remotely from work while watching the tablet via a camera on Blue Iris.

            Client action 37 worked, thank you so much!!!

            Comment

            Working...
            X