Announcement

Collapse
No announcement yet.

How to use HS.Plugin?

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

  • jon00
    replied
    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:	223
Size:	80.8 KB
ID:	1355528
    Anythoughts? Thanks
    Rename the script cal.vb and then try running that.

    Leave a comment:


  • wkrasner
    replied
    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:	223
Size:	80.8 KB
ID:	1355528
    Anythoughts? Thanks

    Leave a comment:


  • virtualadam
    replied
    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....

    Leave a comment:


  • skarragallagher
    replied
    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"})

    Leave a comment:


  • virtualadam
    replied
    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

    Leave a comment:


  • skarragallagher
    replied
    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

    Leave a comment:


  • virtualadam
    replied
    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!

    Leave a comment:


  • virtualadam
    replied
    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)

    Leave a comment:


  • Blade
    replied
    Try this:

    Code:
    hs.PluginFunction("BLRussound", "", "EnableDebugLogging", Nothing)

    Leave a comment:


  • virtualadam
    started a topic How to use HS.Plugin?

    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()
Working...
X