That is what I was using the reference number.
Thank you for helping me. I am new to this scripting stuff. I am just a lowly PLC programmer.
Announcement
Collapse
No announcement yet.
Z-Wave Device Parameters & Scripting
Collapse
X
-
Originally posted by gthensl View PostSparkman,
I have tried what you suggested .tobyte(2) (447), but that gave me an error also. Now I don't know what to do. I want to get my Dome siren working for different doorbells, but can't if I can't get that to work.
Thanks
Leave a comment:
-
Sparkman,
I have tried what you suggested .tobyte(2) (447), but that gave me an error also. Now I don't know what to do. I want to get my Dome siren working for different doorbells, but can't if I can't get that to work.
Thanks
Leave a comment:
-
Originally posted by gthensl View PostI have ran into the same problem and have narrowed it down to the nodeID(447) to convert to a byte. Of course, 447 is larger than a byte have have tried the same as you have, .toInt and received the same results.
Have you had any luck? Where is the 'Pluginfunction("zwave"....' documented at? I have search the help file and the web and haven't found anything yet.
Thanks
PluginFunction is documented here: https://help.homeseer.com/help/HS3/s...pluginfunction. However, each plugin does their own thing with that and the z-wave plugin does not have public documentation on the available functions. You can use visual studio to look at the functions within the plugin itself, but it's sparsely documented there as well.
Leave a comment:
-
I have ran into the same problem and have narrowed it down to the nodeID(447) to convert to a byte. Of course, 447 is larger than a byte have have tried the same as you have, .toInt and received the same results.
Have you had any luck? Where is the 'Pluginfunction("zwave"....' documented at? I have search the help file and the web and haven't found anything yet.
Thanks
Leave a comment:
-
Check the documentation for the parameter that you are trying to set. I believe the "Convert.ToByte(1)" should be changed to the the number of bytes the parameter is. If it's 2 bytes, then change to "Convert.ToByte(2)", if it's 4 bytes, change to "Convert.ToByte(4)", etc. I don't have access to my system right now to confirm, so I'm doing an educated guess on that, based on the error that you are getting.
Leave a comment:
-
Originally posted by sparkman View Post
Are you doing this as an immediate script command, or a full script? If the former, then use &nhs rather than &hs as you are using VB.NET syntax. &hs expects VBScript syntax.
I'm guess it may be in the conversion of the NodeID by the function Convert.ToByte(284) for the node id #284. I've also tried Convert.ToInt16 and Convert.ToInt32 which then give a different error ("cannot be converted to type 'System.Byte'").
Any further thoughts or working "immediate" script examples appreciated.
Leave a comment:
-
Originally posted by jvm View PostCan someone break this down for me to a very simple level. Specifically, I'd like to have an event with an immediate script which sets parameter 10 of device reference 284 to the value 5 for home ID "ABABABAB". I found the following general form for the set command:
hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object(){HomeID, Convert.ToByte(NodeID), Convert.ToByte(ParamNumber), Convert.ToByte(1), Convert.ToInt32(Value)})
And applying it to the example, came up with the script:
&hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object(){"ABABABAB", Convert.ToByte(284), Convert.ToByte(10), Convert.ToByte(1), Convert.ToInt32(5)})
But when this executes, I get an Init Error, Expected End of Statement.
Anybody know what I'm doing wrong?
Any working example of an immediate script setting a parameter value would be appreciated!
Thanks.
Leave a comment:
-
Can someone break this down for me to a very simple level. Specifically, I'd like to have an event with an immediate script which sets parameter 10 of device reference 284 to the value 5 for home ID "ABABABAB". I found the following general form for the set command:
hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object(){HomeID, Convert.ToByte(NodeID), Convert.ToByte(ParamNumber), Convert.ToByte(1), Convert.ToInt32(Value)})
And applying it to the example, came up with the script:
&hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object(){"ABABABAB", Convert.ToByte(284), Convert.ToByte(10), Convert.ToByte(1), Convert.ToInt32(5)})
But when this executes, I get an Init Error, Expected End of Statement.
Anybody know what I'm doing wrong?
Any working example of an immediate script setting a parameter value would be appreciated!
Thanks.
Leave a comment:
-
i'm trying to configure a dimmer.
i have the following code
Code:Public Function SetSingleParameter(ByVal homeid As String, ByVal nodeID As Byte, ByVal Parameter As Byte, ByVal ParamSize As Byte, ByVal value As Int32) As Integer Dim ConfigResult As Integer = 0 Dim ConfigResultVal(3) As String ConfigResultVal(0) = "Unknown" ConfigResultVal(1) = "Success" ConfigResultVal(2) = "Queued" ConfigResultVal(3) = "Failed" ConfigResult = Convert.ToInt16(hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object() {homeid, nodeID, Parameter, ParamSize, value})) Log(("ZWave Node " & nodeID & " on Network " & homeid & ": Parameter Set " & Parameter & " Value: " & value & " - Result " & ConfigResultVal(ConfigResult)), LogType.Debug) Return ConfigResult End Function
Leave a comment:
-
Originally posted by Toby View Postis there a delay also when you guys are testing this function?
Leave a comment:
-
Originally posted by sparkman View PostYes, what's the error message you get in the logs and are you running this on linux? If linux, use this instead (will work on Windows as well):
Code:ConfigResult = hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object(){HomeID, Convert.ToByte(NodeID), Convert.ToByte(ParamNumber), Convert.ToByte(1), Convert.ToInt32(Value)})
Exception deserializing message: Unable to find assembly 'HSPI_ZWave, Version=3.0.1.252, Culture=neutral, PublicKeyToken=null'. in the console window right away and it stalls for some time and then I get an exception thrown "ConfigDevicePost: Object reference not set to an instance of an object. in the Homeseer log.
The Configuration_Get part works fine, but not the _Set...
I'm running windows10
Edit: I found out that the parameter is actually set, but it still stalls for 20s and then throws an exception..
when i read it out later with
Code:newValue = Convert.ToInt16(hs.PluginFunction("Z-Wave", "", "Configuration_Get", New Object() {homeid, nodeID, Parameter}))
how to set a value without delay and errors?
Leave a comment:
-
Originally posted by Toby View PostI'm trying out this set command in a script but it's failing... should this Configuration_set command still work?
hs.PluginFunction("Z-Wave", "", "Configuration_Set", {homeid, nodeID, Parameter, ParamSize, Convert.ToInt32(value)})
Code:ConfigResult = hs.PluginFunction("Z-Wave", "", "Configuration_Set", New Object(){HomeID, Convert.ToByte(NodeID), Convert.ToByte(ParamNumber), Convert.ToByte(1), Convert.ToInt32(Value)})
- 1 like
Leave a comment:
-
I'm trying out this set command in a script but it's failing... should this Configuration_set command still work?
hs.PluginFunction("Z-Wave", "", "Configuration_Set", {homeid, nodeID, Parameter, ParamSize, Convert.ToInt32(value)})
Leave a comment:
Leave a comment: