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
20 stars 4 forks source link

EProperty.FeatureDisplayType not supported #315

Closed mcsSolutions closed 1 year ago

mcsSolutions commented 2 years ago

HS 4.2.14.0

When executing the following code

Dim oType As HomeSeer.PluginSdk.Devices.EFeatureDisplayType = CType(hs.GetPropertyByRef(9983, HomeSeer.PluginSdk.Devices.EProperty.FeatureDisplayType), HomeSeer.PluginSdk.Devices.EFeatureDisplayType)

The console response is

Exception deserializing message: Unable to load type Scheduler.Classes.Model.Devices.PriorityDisplayType required for deserialization.

and timeout occurs before statement returns

spudwebb commented 2 years ago

You are testing this by starting your plugin remotely right? I can reproduce this exception by adding your line of code to the sample plugin and running it remotely from visual studio. but if I install the same modified sample plugin in the HomeSeer directory, the exception disappear. I will log it as a bug nonetheless, but a simple workaround for now is to copy Scheduler.dll into your output directory so that it works even when run remotely.

mcsSolutions commented 2 years ago

Thank You. That solves the problem. Should the general practice be to include the HS3 dll’s in my updater package so others that may be running remotely will not run into the issue?

From: spudwebb @.> Sent: Wednesday, August 24, 2022 11:50 AM To: HomeSeer/Plugin-SDK @.> Cc: mcsSolutions @.>; Author @.> Subject: Re: [HomeSeer/Plugin-SDK] EProperty.FeatureDisplayType not supported (Issue #315)

You are testing this by starting your plugin remotely right? I can reproduce this exception by adding your line of code to the sample plugin and running it remotely from visual studio. but if I install the same modified sample plugin in the HomeSeer directory, the exception disappear. I will log it as a bug nonetheless, but a simple workaround for now is to copy Scheduler.dll into your output directory so that it works even when run remotely.

— Reply to this email directly, view it on GitHub https://github.com/HomeSeer/Plugin-SDK/issues/315#issuecomment-1226106538 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AALJP66HKKSHTHFWTNRVE2DV2ZVF7ANCNFSM57M2SNWQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AALJP654NKJLT65GL2TKDP3V2ZVF7A5CNFSM57M2SNW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJEKONKQ.gif Message ID: @. @.> >

spudwebb commented 2 years ago

No you should not include Scheduler.dll in your updater package. The plugin SDK was designed so that PluginSdk.dll and HSCF.dll are the only 2 homeseer dependencies needed to run a HS4 plugin. This is not the case here, but we can fix it on HS side. Tracked as HS-1708

spudwebb commented 1 year ago

This is fixed in HS version 4.2.17.2