HomeSeer / Plugin-SDK

Plugin development kit for the 4th major edition of the HomeSeer platform.
https://www.nuget.org/packages/HomeSeer-PluginSDK/
GNU Affero General Public License v3.0
21 stars 5 forks source link

HTML tag: plugin_property_get method doesn't pass ScriptArray scrparms #13

Closed dcorsus closed 5 years ago

dcorsus commented 5 years ago

When I add a liquid tag as follows: {{ plugin_property_get 'SonosV4' 'Track' ['RINCON_000E5859008A01400'] }}

my PI is called properly through the method Public Shared Function plugin_property_get ( plugid As String, prop As String, scrparms As ScriptArray) As String

but the scrparms is equal to Nothing, so somewhere the info is lost.

This is important because I need to pass an instance parameter so the PI would pick up the correct info from the correct instance.

I noted that: Public Shared Sub plugin_property_set ( plugid As String, prop As String, value As String) has NO param array, so this would be a problem. I'm currently not using this method but if it needs to be capable of passing along the correct instance, than this parameter should be added.

You could make the param array optional unless that would cause ambiguity issues.

rjhelmke commented 5 years ago

Instead of using a property, try the plugin_function... That one works in the sample with parameters. Might be a problem with the property call.

Rich

On Fri, Oct 4, 2019 at 10:24 PM dcorsus notifications@github.com wrote:

When I add a liquid tag as follows: {{ plugin_property_get 'SonosV4' 'Track' ['RINCON_000E5859008A01400'] }}

my PI is called properly through the method Public Shared Function plugin_property_get ( plugid As String, prop As String, scrparms As ScriptArray) As String

but the scrparms is equal to Nothing, so somewhere the info is lost.

This is important because I need to pass an instance parameter so the PI would pick up the correct info from the correct instance.

I noted that: Public Shared Sub plugin_property_set ( plugid As String, prop As String, value As String) has NO param array, so this would be a problem. I'm currently not using this method but if it needs to be capable of passing along the correct instance, than this parameter should be added.

You could make the param array optional unless that would cause ambiguity issues.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HomeSeer/Plugin-SDK/issues/13?email_source=notifications&email_token=ABJUBZZNZITNTMSJXFJBVATQM73GVA5CNFSM4I5V6HZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPZW6UQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJUBZ6N7OYPLGBIW34OFVTQM73GVANCNFSM4I5V6HZQ .

--

Richard Helmke

HomeSeer Technologies voice: 603/471-2816 www.homeseer.com

dcorsus commented 5 years ago

You cannot get a property using the plugin_function, that’s how I found out that there always was a PluginPropertyGet function.

Dirk

From: rjhdakota notifications@github.com Sent: Saturday, October 5, 2019 5:16 AM To: HomeSeer/Plugin-SDK Plugin-SDK@noreply.github.com Cc: dcorsus dirk@famcorsus.com; Author author@noreply.github.com Subject: Re: [HomeSeer/Plugin-SDK] HTML tag: plugin_property_get method doesn't pass ScriptArray scrparms (#13)

Instead of using a property, try the plugin_function... That one works in the sample with parameters. Might be a problem with the property call.

Rich

On Fri, Oct 4, 2019 at 10:24 PM dcorsus <notifications@github.com mailto:notifications@github.com > wrote:

When I add a liquid tag as follows: {{ plugin_property_get 'SonosV4' 'Track' ['RINCON_000E5859008A01400'] }}

my PI is called properly through the method Public Shared Function plugin_property_get ( plugid As String, prop As String, scrparms As ScriptArray) As String

but the scrparms is equal to Nothing, so somewhere the info is lost.

This is important because I need to pass an instance parameter so the PI would pick up the correct info from the correct instance.

I noted that: Public Shared Sub plugin_property_set ( plugid As String, prop As String, value As String) has NO param array, so this would be a problem. I'm currently not using this method but if it needs to be capable of passing along the correct instance, than this parameter should be added.

You could make the param array optional unless that would cause ambiguity issues.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <https://github.com/HomeSeer/Plugin-SDK/issues/13?email_source=notifications https://github.com/HomeSeer/Plugin-SDK/issues/13?email_source=notifications&email_token=ABJUBZZNZITNTMSJXFJBVATQM73GVA5CNFSM4I5V6HZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPZW6UQ &email_token=ABJUBZZNZITNTMSJXFJBVATQM73GVA5CNFSM4I5V6HZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPZW6UQ>, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJUBZ6N7OYPLGBIW34OFVTQM73GVANCNFSM4I5V6HZQ .

--

Richard Helmke

HomeSeer Technologies voice: 603/471-2816 www.homeseer.com http://www.homeseer.com

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HomeSeer/Plugin-SDK/issues/13?email_source=notifications&email_token=ADCHR2GOUYPP2JEXQFFQ3ILQNCAQPA5CNFSM4I5V6HZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANRCTI#issuecomment-538644813 , or mute the thread https://github.com/notifications/unsubscribe-auth/ADCHR2G2DWGPNDJKBA5C7JTQNCAQPANCNFSM4I5V6HZQ . https://github.com/notifications/beacon/ADCHR2FGAT7OTMFE5E4HBALQNCAQPA5CNFSM4I5V6HZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANRCTI.gif

rjhelmke commented 5 years ago

This is fixed in build 4.0.0.25.