Announcement

Collapse
No announcement yet.

How to use HS.Plugin?

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

    How to use HS.Plugin?

    I'm trying to call the API to access a plugin but am getting an error? Is this done differently with HS3? I'm trying to test this by just running it through the "Immediate Script Command" form...

    thanks


    7/8/2013 10:18:34 PM Error Running script, init error: Object doesn't support this property or method: 'hs.Plugin'
    7/8/2013 10:18:34 PM System Control Panel Immediate Script: &hs.Plugin("BLRussound").EnableDebugLogging()

    #2
    Try this:

    Code:
    hs.PluginFunction("BLRussound", "", "EnableDebugLogging", Nothing)
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


      #3
      Originally posted by Blade View Post
      Try this:

      Code:
      hs.PluginFunction("BLRussound", "", "EnableDebugLogging", Nothing)
      Thanks for the help. I tried and got the following...


      7/9/2013 9:20:38 PM Error Running script, init error: Invalid procedure call or argument: 'hs.PluginFunction'
      7/9/2013 9:20:38 PM System Control Panel Immediate Script: &hs.PluginFunction("BLRussound", "", "EnableDebugLogging", Nothing)

      Comment


        #4
        Is anyone able to please help, as I have been stuck for days and unable to work with the plugin. How are others doing this?

        I tried two different methods and both give errors:

        hs.Plugin('BLRussound');

        hs.PluginFunction("BLRussound", "", "SetZoneVolume", new Object(){1, 1, 75});

        Thanks!

        Comment


          #5
          Originally posted by virtualadam View Post
          Is anyone able to please help, as I have been stuck for days and unable to work with the plugin. How are others doing this?

          I tried two different methods and both give errors:

          hs.Plugin('BLRussound');

          hs.PluginFunction("BLRussound", "", "SetZoneVolume", new Object(){1, 1, 75});

          Thanks!
          I am trying to do this as well.

          I tried both your way and this
          hs.PluginFunction("Vista Alarm","","SendToAlarm",{"1","","FALSE"})

          Which should pass the three expected parameters

          If anyone has this working please post a working example of the proper syntax

          Comment


            #6
            Originally posted by skarragallagher View Post
            I am trying to do this as well.

            I tried both your way and this
            hs.PluginFunction("Vista Alarm","","SendToAlarm",{"1","","FALSE"})

            Which should pass the three expected parameters

            If anyone has this working please post a working example of the proper syntax

            Hi, I recently went back to this thread to find out the syntax and also couldn't get it to work, but this way is working for me now:

            hs.RunScriptFunc( "BLRussound_Functions.vb","Set_Zone_Power","1|1|On", true, false)


            Cheers

            Comment


              #7
              Originally posted by virtualadam View Post
              Hi, I recently went back to this thread to find out the syntax and also couldn't get it to work, but this way is working for me now:

              hs.RunScriptFunc( "BLRussound_Functions.vb","Set_Zone_Power","1|1|On", true, false)


              Cheers
              Right but how is the hs.pluginfunction() syntax look in your BLRussound_Functions.vb script?

              is it like this?
              Code:
               
               hs.PluginFunction("Plugin Name","","Function",New Object(){"paramater1","parameter2","parameter3"})

              Comment


                #8
                Originally posted by skarragallagher View Post
                Right but how is the hs.pluginfunction() syntax look in your BLRussound_Functions.vb script?

                is it like this?
                Code:
                 
                 hs.PluginFunction("Plugin Name","","Function",New Object(){"paramater1","parameter2","parameter3"})
                Say I have a JS script file called: my_functions.js, which has the function below:

                ====================================
                function doNothing(someParams){
                //Do nothing
                }
                ====================================

                You can call this from HS using this call:

                hs.RunScriptFunc( "my_functions.js","doNothing","param1|param2|param3", true, false)

                There might be other ways, but this is the only way I could find to work....

                Comment


                  #9
                  Hi I am trying the script as follows:


                  I get the following error:
                  Running script, script run or compile error in file: C:/Program Files (x86)/HomeSeer HS3/scripts/cal.txt1006:Expected ')' in line 1 More info: Expected ')'

                  Click image for larger version

Name:	bLData.JPG
Views:	243
Size:	80.8 KB
ID:	1355528
                  Anythoughts? Thanks

                  Comment


                    #10
                    Originally posted by wkrasner View Post
                    Hi I am trying the script as follows:


                    I get the following error:
                    Running script, script run or compile error in file: C:/Program Files (x86)/HomeSeer HS3/scripts/cal.txt1006:Expected ')' in line 1 More info: Expected ')'

                    Click image for larger version

Name:	bLData.JPG
Views:	243
Size:	80.8 KB
ID:	1355528
                    Anythoughts? Thanks
                    Rename the script cal.vb and then try running that.
                    Jon

                    Comment

                    Working...
                    X