Announcement

Collapse
No announcement yet.

Need help with hs.pluginfunction

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

  • Need help with hs.pluginfunction

    SOLVED!!!!!




    HI all ,

    I post this here because its part of the plugin..

    im using the plugwise plugin , but there is one thing what doesnt work , and maybe someone knows what im doing wrong ,

    this is written in the pdf

    The plugin support 2 scripting function:
    • hs.PluginFunction("Plugwise Pro", "", "GetCurrentPower", {DeviceRef})
    • hs.PluginFunction("Plugwise Pro", "", "GetTotalPower", {DeviceRef})


    when i use that it doesnt work

    i tried this in emidiate script command:
    PHP Code:
    &hs.PluginFunction("Plugwise Pro""""GetTotalPower", {"3383"})
    &
    hs.PluginFunction("Plugwise Pro""""GetTotalPower", {3383})
    &
    hs.PluginFunction("Plugwise Pro""""GetTotalPower", ("3383"))
    &
    hs.PluginFunction("Plugwise Pro""""GetTotalPower", (3383))
    &
    hs.PluginFunction("Plugwise Pro""""GetTotalPower""3383")
    &
    hs.PluginFunction("Plugwise Pro""""GetTotalPower"3383
    i get the following errors

    PHP Code:
    Running script(2) &hs.PluginFunction("Plugwise Pro""""GetTotalPower", {3383}), init errorInvalid character 
    and this

    PHP Code:
    Running script(2) &hs.PluginFunction("Plugwise Pro""""GetTotalPower",3383), init errorInvalid procedure call or argument'hs.PluginFunction' 
    Last edited by Malosa; September 21st, 2016, 07:25 AM. Reason: SOlved
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 3.0.0.531 on windows 7 ultimate X64 on hp quadcore laptop 8 GB.

  • #2
    Have you tried the commands in a .vb script? Maybe try:

    &nhs.PluginFunction("Plugwise Pro", "", "GetTotalPower", {3383})

    or &hs.PluginFunction "Plugwise Pro", "", "GetTotalPower", {3383}

    Cheers
    Al
    HS 3.0.0.532: 1963 Devices 1141 Events
    Z-Wave 3.0.1.261: 122 Nodes on one Z-Net

    Comment


    • #3
      i did try the first one and i get this

      PHP Code:
      Error 1    Running script C:\Program Files (x86)\HomeSeer HS3\Temp\K1.vb :Exception has been thrown by the target of an invocation.Method invocation failed because 'Public Overrides Function PluginFunction(plugname As String, pluginstance As String, func As String, parms As System.Object()) As System.Object' cannot be called with these argumentsArgument matching parameter 'parms' cannot convert from 'Integer()' to 'Object()'

      Originally posted by sparkman View Post
      Have you tried the commands in a .vb script? Maybe try:

      &nhs.PluginFunction("Plugwise Pro", "", "GetTotalPower", {3383})

      or &hs.PluginFunction "Plugwise Pro", "", "GetTotalPower", {3383}

      Cheers
      Al
      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




      HS3Pro 3.0.0.531 on windows 7 ultimate X64 on hp quadcore laptop 8 GB.

      Comment


      • #4
        i found it :

        Sub Main(ByVal parm As String)

        dim MeterDev As string = hs.PluginFunction("Plugwise Pro", "", "GetTotalPower", {"3382"})

        hs.writelog("script", "" & MeterDev)
        End Sub


        this one works !
        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




        HS3Pro 3.0.0.531 on windows 7 ultimate X64 on hp quadcore laptop 8 GB.

        Comment

        Working...
        X