Announcement

Collapse
No announcement yet.

Help with Script Command

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

    Help with Script Command

    I am trying to run a BLLED command as an immediate script command in an Event versus in a script. The command I am trying to have run is:

    hs.PluginFunction("BLLED", "", "SetDateTime", new Object(){1})

    When I type the statement into the Event HS adds the "&" in front but when I execute the event I get the following error in the log:

    Running script(2) &hs.PluginFunction("BLLED", "", "SetDateTime", new Object(){1}), init error: Expected end of statement

    I also tried it without the outer parenthesis but that just resulted in a syntax error as well.

    Any suggestions on what obvious thing I am doing wrong? Thanks!

    #2
    See this bug report (and resolution).

    Cheers
    Al
    HS 4.2.8.0: 2134 Devices 1252 Events
    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

    Comment


      #3
      Thanks Al!

      I think I'll try to get fully transitioned to HS3 and somewhat stable before I venture into the beta's to get that working. Will just use a script call for now instead of an immediate command.

      Comment


        #4
        Originally posted by Larryguy50
        I don't know much about scripts so I don't know if I am doing something wrong or it is a bug yet with HS3. Below is my script for led sign 2 for a hard reset. and then the error the log shows. Can someone help me?

        Sub Main()

        hs.PluginFunction("BLLED", "", "Reset", new Object(){2,TRUE})
        End Sub


        Error Running script, script run or compile error in file: C:/Program Files/HomeSeer HS3/scripts/LED.txt1025:Expected end of statement in line 3 More info: Exception from HRESULT: 0x800A0401
        Do you have a .vb extension on the script? If so the script needs to look like this.
        Sub Main(parm as object)
        hs.PluginFunction("BLLED", "", "Reset", new Object(){2,TRUE})
        End Sub
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          I am thinking that the script is not correct:
          Try this:

          If you are using multiple instances, make sure you specify your instance
          This example uses no instance

          Code:
          Sub Main(ByVal parm As Object)
              hs.PluginFunction("BLLED", "", "Reset", new Object(){2,True}) 
          End Sub
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment

          Working...
          X