Lately I've been playing with script work around getting z-wave parameters via script, though I was setting them using an event action. Due to things, I've decided to set the parameters via script rather than event action. Based on some help from sparkman here:
https://forums.homeseer.com/forum/li...-z-wave-device
I got the configuration_get working initially, and where I went back to to try to get configuration_set working. However I cannot get configuration_set to change the parameter on the switch. It claims it worked, no error, I get a successful result code, but when I query the parameter after the set, the parameter has not changed. If I set the same parameter on the same device using an event action, the parameter sets successfully.
Any ideas what I might be missing? To go back to basics, i've gone back to the script sparkman gave me:
I get a successful result, but the parameter did not change on the device.
Any ideas what I might be missing?
regards,
Paul
https://forums.homeseer.com/forum/li...-z-wave-device
I got the configuration_get working initially, and where I went back to to try to get configuration_set working. However I cannot get configuration_set to change the parameter on the switch. It claims it worked, no error, I get a successful result code, but when I query the parameter after the set, the parameter has not changed. If I set the same parameter on the same device using an event action, the parameter sets successfully.
Any ideas what I might be missing? To go back to basics, i've gone back to the script sparkman gave me:
Code:
Imports System.Text 'call Main with NodeID|ParameterNum|Value 'Based on http://board.homeseer.com/showpost.php?p=1176987&postcount=11 Sub Main(parms As String) Dim logName As String = "Z-Wave Param" 'set log name for HS log Dim debug As Boolean = True Dim param as String() = parms.Split("|") Dim HomeID as String = "0000000" Dim NodeID as String = param(0) Dim ParamNumber as String = param(1) Dim Value as String = param(2) Dim ConfigResult As Integer = 0 Dim ConfigResultVal() As String = {" is Unknown"," is Successful"," has been Queued"," has Failed"} Try ConfigResult = hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object(){HomeID, Convert.ToByte(NodeID), Convert.ToByte(ParamNumber), Convert.ToByte(1), Convert.ToInt32(Value)}) If Debug Then hs.WriteLog(logName, "Result of Parameter " & ParamNumber & " change to " & Value & " on Node " & NodeID & ConfigResultVal(ConfigResult)) Catch ex As Exception hs.writelog(logName, "Error: " & ex.Message.ToString) End Try End Sub
Any ideas what I might be missing?
regards,
Paul
Comment