I am calling hs.PluginFunction in a C# script in order to set a Z-Wave parameter value as follows:
hs.PluginFunction("Z-Wave", "", "Configuration_Set", new object[] { parms[0], nodeNumber, parameterNumber, (byte)1, (int)Byte.Parse(parms[3]) });
This works just fine, but I don't know how to process the result. The type of the result is HSPI_ZWave.HSPI+ConfigResult, and if I display it using hs.WriteLog, it displays as "Success," but no matter what type I try to cast this to, I get a runtime casting error (i.e., "Specified cast is not valid."). What can I cast this to in order to validate that "Success" was returned?
hs.PluginFunction("Z-Wave", "", "Configuration_Set", new object[] { parms[0], nodeNumber, parameterNumber, (byte)1, (int)Byte.Parse(parms[3]) });
This works just fine, but I don't know how to process the result. The type of the result is HSPI_ZWave.HSPI+ConfigResult, and if I display it using hs.WriteLog, it displays as "Success," but no matter what type I try to cast this to, I get a runtime casting error (i.e., "Specified cast is not valid."). What can I cast this to in order to validate that "Success" was returned?
Comment