No announcement yet.

Call a plugin function from HS Touch

  • Filter
  • Time
  • Show
Clear All
new posts

  • Call a plugin function from HS Touch

    I have a plugin function that works correctly if called from a script. The syntax used in the script is:

    hs.PluginFunction("MyPlugin", "", "MyFunction", {"Param A", "Param B", 0})

    This works great.

    I would like to call the same function from HS Touch. With HS2 all that was needed was to add a '&' to the start of the command:

    &hs.PluginFunction("MyPlugin", "", "MyFunction", {"Param A", "Param B", 0})

    This does not work. I receive the error: Running script, init error: Invalid character.

    How do I call hs.PluginFunction directly from HS Touch for HS3?

  • #2
    I have same issue - works in a .vb script but not in a one line command in web interface


    • #3
      Put the call in an event an call the event from HSTouch.


      • #4
        I'd log it as a bug but in the meantime you can put that command in a normal script and then call that script in HSTouch.
        My Plugins:

        Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
        Yeelight 3P | Nanoleaf 3P


        • #5
          Did anybody log a bug on this?

          I am seeing this too, but not only from HST. I also see the issue from "direct script statements" in events.

          Calling the Plug-In function only seems to work when calling it from a 'proper' script or from another plug-in
          Nicolai L


          • #6
            [QUOTE=NicolaiL;1139354]Did anybody log a bug on this?QUOTE]

            I found this bug:

            Suggest you guys subscribe to this if you haven't already done so.
            Nicolai L