public static void Reset(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.Meter, (byte)Command.MeterReset }); }
public static void GetOperatingState(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.ThermostatOperatingState, (byte)Command.BasicGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.ThermostatMode, (byte)Command.BasicGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.DoorLock, (byte)Command.DoorLock_Get }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.SwitchMultilevel, (byte)Command.SwitchMultilevelGet }); }
public static void GetSupported(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.Meter, (byte)Command.MeterSupportedGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.WakeUp, (byte)Command.WakeUpIntervalGet }); }
public static void Reset(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.Meter, (byte)Command.MeterReset }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.SensorBinary, (byte)Command.SensorBinaryGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.WakeUp, (byte)Command.WakeUpIntervalGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.SensorBinary, (byte)Command.SensorBinaryGet }); }
public static void Unlock(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.Basic, (byte)Command.BasicGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.ThermostatFanMode, (byte)Command.BasicGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.DoorLock, (byte)Command.DoorLockGet }); }
public static void Get(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.SensorMultilevel, (byte)Command.SensorMultilevelGet }); }
public static void GetSupported(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.Meter, (byte)Command.MeterSupportedGet }); }
public static void Get(ZWaveNode node, byte scaleType) { node.SendRequest(new byte[] { (byte)CommandClass.Meter, (byte)Command.MeterGet, scaleType }); }
public static void Get(ZWaveNode node, Value ptype) { node.SendRequest(new byte[] { (byte)CommandClass.ThermostatSetPoint, (byte)Command.ThermostatSetPointGet, (byte)ptype }); }
public static void Get(ZWaveNode node, byte parameter) { node.SendRequest(new byte[] { (byte)CommandClass.Configuration, (byte)Command.ConfigurationGet, parameter }); }
public static void GetScheme(ZWaveNode node) { node.SendRequest(new byte[] { (byte)CommandClass.Security, (byte)SecurityCommand.SchemeGet, 0 }); }
public static void GetSetPoint(ZWaveNode node, SetPointType ptype) { node.SendRequest(new byte[] { (byte)CommandClass.ThermostatSetPoint, (byte)Command.ThermostatSetPointGet, (byte)ptype }); }
public static void Set(ZWaveNode node, Value mode) { node.SendRequest(new byte[] { (byte)CommandClass.ThermostatMode, (byte)Command.BasicSet, (byte)mode }); }
public static void GetCount(ZWaveNode node, byte commandClass) { node.SendRequest(new byte[] { (byte) CommandClass.MultiInstance, (byte) Command.MultiInstanceCountGet, commandClass }); }
public static void GetCount(ZWaveNode node, byte commandClass) { node.SendRequest(new byte[] { (byte)CommandClass.MultiInstance, (byte)Command.MultiInstanceCountGet, commandClass }); }
public static void Get(ZWaveNode node, byte groupId) { node.SendRequest(new byte[] { (byte)CommandClass.Association, (byte)Command.AssociationGet, groupId }); }
public static void Get(ZWaveNode node, byte parameter) { node.SendRequest(new byte[] { (byte)CommandClass.Configuration, (byte)Command.ConfigurationGet, parameter }); }
public static void Get(ZWaveNode node, byte groupId) { node.SendRequest(new byte[] { (byte)CommandClass.Association, (byte)Command.AssociationGet, groupId }); }
public static void Set(ZWaveNode node, Value mode) { node.SendRequest(new byte[] { (byte)CommandClass.ThermostatFanMode, (byte)Command.BasicSet, (byte)mode }); }
public static void Set(ZWaveNode node, int value) { node.SendRequest(new byte[] { (byte)CommandClass.SwitchMultilevel, (byte)Command.SwitchMultilevelSet, byte.Parse(value.ToString()) }); }
public static void Set(ZWaveNode node, int value) { node.SendRequest(new byte[] { (byte)CommandClass.Basic, (byte)Command.BasicSet, byte.Parse(value.ToString()) }); }
public static void Get(ZWaveNode node, byte scaleType) { node.SendRequest(new byte[] { (byte)CommandClass.Meter, (byte)Command.MeterGet, scaleType }); }
public static void Set(ZWaveNode node, int value) { node.SendRequest(new byte[] { (byte)CommandClass.Basic, (byte)Command.BasicSet, byte.Parse(value.ToString()) }); }
public static void Remove(ZWaveNode node, byte groupId, byte targetNodeId) { node.SendRequest(new byte[] { (byte)CommandClass.Association, (byte)Command.AssociationRemove, groupId, targetNodeId }); }
public static void Remove(ZWaveNode node, byte groupid, byte targetnodeid) { node.SendRequest(new byte[] { (byte)CommandClass.Association, (byte)Command.AssociationRemove, groupid, targetnodeid }); }
public static void Set(ZWaveNode node, byte groupid, byte targetNodeId) { node.SendRequest(new byte[] { (byte)CommandClass.Association, (byte)Command.AssociationSet, groupid, targetNodeId }); }
public static void Set(ZWaveNode node, byte groupid, byte targetnodeid) { node.SendRequest(new byte[] { (byte)CommandClass.Association, (byte)Command.AssociationSet, groupid, targetnodeid }); }
public static void Set(ZWaveNode node, byte parameter, Int32 paramValue) { int valueLength = 1; var nodeConfigParamsLength = GetConfigParamsData(node); if (!nodeConfigParamsLength.ContainsKey(parameter)) { Get(node, parameter); int retries = 0; while (!nodeConfigParamsLength.ContainsKey(parameter) && retries++ <= 5) { Thread.Sleep(1000); } } if (nodeConfigParamsLength.ContainsKey(parameter)) { valueLength = nodeConfigParamsLength[parameter]; } //Console.WriteLine("GOT Parameter Length: " + valuelen); // //byte[] value = new byte[valuelen]; // { (byte)intvalue };//BitConverter.GetBytes(Int32.Parse(intvalue)); byte[] value32 = BitConverter.GetBytes(paramValue); Array.Reverse(value32); //int curbyte = valuelen - 1; //for (int x = 0; x < value32.Length && curbyte >= 0; x++) //{ // value[curbyte--] = value32[x]; //} ////if (value32[0] != 0 && valuelen > 1) ////{ //// value[0] = value32[0]; ////} //// //Console.WriteLine("\n\n\nCOMPUTED VALUE: " + zp.ByteArrayToString(value32) + "\n->" + zp.ByteArrayToString(BitConverter.GetBytes(intvalue)) + "\n\n"); // byte[] msg = new byte[4 + valueLength]; msg[0] = (byte)CommandClass.Configuration; msg[1] = (byte)Command.ConfigurationSet; msg[2] = parameter; msg[3] = (byte)valueLength; switch (valueLength) { case 1: Array.Copy(value32, 3, msg, 4, 1); break; case 2: Array.Copy(value32, 2, msg, 4, 2); break; case 4: Array.Copy(value32, 0, msg, 4, 4); break; } node.SendRequest(msg); }
public static void SensorMultiLevelGet(ZWaveNode node, byte instance) { node.SendRequest(new byte[] { (byte)CommandClass.MultiInstance, 0x06, // ?? instance, (byte)CommandClass.SensorMultilevel, 0x04 // }); }
public static void SensorMultiLevelGet(ZWaveNode node, byte instance) { node.SendRequest(new byte[] { (byte) CommandClass.MultiInstance, 0x06, // ?? instance, (byte) CommandClass.SensorMultilevel, 0x04 // }); }
public static void SwitchMultiLevelGet(ZWaveNode node, byte instance) { node.SendRequest(new byte[] { (byte)CommandClass.MultiInstance, 0x0d, // ?? (MultiInstaceV2Encapsulated ??) 0x00, // ?? instance, (byte)CommandClass.SwitchMultilevel, (byte)Command.MultiInstanceGet }); }
public static void Set(ZWaveNode node, uint interval) { node.SendRequest(new byte[] { (byte)CommandClass.WakeUp, (byte)Command.WakeUpIntervalSet, (byte)((interval >> 16) & 0xff), (byte)((interval >> 8) & 0xff), (byte)((interval) & 0xff), 0x01 }); }
public static void Set(ZWaveNode node, uint interval) { node.SendRequest(new byte[] { (byte)CommandClass.WakeUp, (byte)Command.WakeUpIntervalSet, (byte)((interval >> 16) & 0xff), (byte)((interval >> 8) & 0xff), (byte)((interval) & 0xff), 0x01 }); }
public static void SwitchBinaryGet(ZWaveNode node, byte instance) { node.SendRequest(new byte[] { (byte) CommandClass.MultiInstance, 0x0d, // ?? (MultiInstaceV2Encapsulated ??) 0x00, // ?? instance, (byte) CommandClass.SwitchBinary, (byte) Command.MultiInstanceGet }); }
public static void SwitchMultiLevelSet(ZWaveNode node, byte instance, int value) { node.SendRequest(new byte[] { (byte)CommandClass.MultiInstance, 0x0d, // ?? (MultiInstaceV2Encapsulated ??) 0x00, // ?? instance, (byte)CommandClass.SwitchMultilevel, (byte)Command.MultiInstanceSet, byte.Parse(value.ToString()) }); }
public static void Set(ZWaveNode node, Value ptype, double temperature) { List<byte> message = new List<byte>(); message.AddRange(new byte[] { (byte)CommandClass.ThermostatSetPoint, (byte)Command.ThermostatSetPointSet, (byte)ptype }); var setPoint = ThermostatSetPoint.GetSetPointData(node); message.AddRange(ZWaveValue.GetValueBytes(temperature, setPoint.Precision, setPoint.Scale, setPoint.Size)); node.SendRequest(message.ToArray()); }
public static void Set(ZWaveNode node, Value value) { byte lockValue; if (value == DoorLock.Value.Secured) lockValue = 255; else lockValue = 0; node.SendRequest(new byte[] { (byte)CommandClass.DoorLock, (byte)Command.DoorLockSet, (byte)lockValue }); }
public static void Set(ZWaveNode node, UserCodeValue newUserCode) { var userCode = GetUserCodeData(node); userCode.TagCode = newUserCode.TagCode; userCode.UserId = newUserCode.UserId; userCode.UserIdStatus = newUserCode.UserIdStatus; List<byte> message = new List<byte>(); message.Add((byte)CommandClass.UserCode); message.Add((byte)Command.UserCodeSet); message.Add(userCode.UserId); message.Add(userCode.UserIdStatus); message.AddRange(userCode.TagCode); node.SendRequest(message.ToArray()); }
public static void SetSetPoint(ZWaveNode node, SetPointType ptype, double temperature) { List <byte> message = new List <byte>(); message.AddRange(new byte[] { (byte)CommandClass.ThermostatSetPoint, (byte)Command.ThermostatSetPointSet, (byte)ptype }); var setPoint = GetSetPointData(node); message.AddRange(ZWaveValue.GetValueBytes(temperature, setPoint.Precision, setPoint.Scale, setPoint.Size)); node.SendRequest(message.ToArray()); }
private static void SendNonceReport(ZWaveNode node) { byte[] message = new byte[10]; message[0] = (byte)CommandClass.Security; message[1] = (byte)SecurityCommand.NonceReport; GetSecurityData(node).GenerateControllerCurrentNonce(); Array.Copy(GetSecurityData(node).GetControllerCurrentNonce(), 0, message, 2, 8); node.SendRequest(message); GetSecurityData(node).ControllerNonceTimer.Reset(); }
public static void Set(ZWaveNode node, UserCodeValue newUserCode) { var userCode = GetUserCodeData(node); userCode.TagCode = newUserCode.TagCode; userCode.UserId = newUserCode.UserId; userCode.UserIdStatus = newUserCode.UserIdStatus; List <byte> message = new List <byte>(); message.Add((byte)CommandClass.UserCode); message.Add((byte)Command.UserCodeSet); message.Add(userCode.UserId); message.Add(userCode.UserIdStatus); message.AddRange(userCode.TagCode); node.SendRequest(message.ToArray()); }
public static void Set(ZWaveNode node, byte parameter, Int32 paramValue) { int valueLength = 1; var nodeConfigParamsLength = GetConfigParamsData(node); if (!nodeConfigParamsLength.ContainsKey(parameter)) { Get(node, parameter); int retries = 0; while (!nodeConfigParamsLength.ContainsKey(parameter) && retries++ <= 5) { Thread.Sleep(1000); } } if (nodeConfigParamsLength.ContainsKey(parameter)) { valueLength = nodeConfigParamsLength[parameter]; } // byte[] value32 = BitConverter.GetBytes(paramValue); Array.Reverse(value32); // byte[] msg = new byte[4 + valueLength]; msg[0] = (byte)CommandClass.Configuration; msg[1] = (byte)Command.ConfigurationSet; msg[2] = parameter; msg[3] = (byte)valueLength; switch (valueLength) { case 1: Array.Copy(value32, 3, msg, 4, 1); break; case 2: Array.Copy(value32, 2, msg, 4, 2); break; case 4: Array.Copy(value32, 0, msg, 4, 4); break; } node.SendRequest(msg); }
public static void Set(ZWaveNode node, Value value) { byte lockValue; if (value == DoorLock.Value.Secured) { lockValue = 255; } else { lockValue = 0; } node.SendRequest(new byte[] { (byte)CommandClass.DoorLock, (byte)Command.DoorLockSet, (byte)lockValue }); }
private static bool RequestNonce(ZWaveNode node) { var nodeSecurityData = GetSecurityData(node); Utility.DebugLog(DebugMessageType.Information, "In sendRequestNonce - SecurityHandler"); if (nodeSecurityData.IsWaitingForNonce) { return(false); } Utility.DebugLog(DebugMessageType.Information, "In sendRequestNonce - not waiting for Nonce - SecurityHandler"); nodeSecurityData.IsWaitingForNonce = true; node.SendRequest(new byte[] { (byte)CommandClass.Security, (byte)SecurityCommand.NonceGet }); return(true); }
public static void Set(ZWaveNode node, byte parameter, Int32 paramValue) { int valueLength = 1; var nodeConfigParamsLength = GetConfigParamsData(node); if (!nodeConfigParamsLength.ContainsKey(parameter)) { Get(node, parameter); int retries = 0; while (!nodeConfigParamsLength.ContainsKey(parameter) && retries++ <= 5) { Thread.Sleep(1000); } } if (nodeConfigParamsLength.ContainsKey(parameter)) { valueLength = nodeConfigParamsLength[parameter]; } // byte[] value32 = BitConverter.GetBytes(paramValue); Array.Reverse(value32); // byte[] msg = new byte[4 + valueLength]; msg[0] = (byte)CommandClass.Configuration; msg[1] = (byte)Command.ConfigurationSet; msg[2] = parameter; msg[3] = (byte)valueLength; switch (valueLength) { case 1: Array.Copy(value32, 3, msg, 4, 1); break; case 2: Array.Copy(value32, 2, msg, 4, 2); break; case 4: Array.Copy(value32, 0, msg, 4, 4); break; } node.SendRequest(msg); }
public static void Set(ZWaveNode node, byte parameter, Int32 paramValue) { int valueLength = 1; var nodeConfigParamsLength = GetConfigParamsData(node); if (!nodeConfigParamsLength.ContainsKey(parameter)) { Get(node, parameter); int retries = 0; while (!nodeConfigParamsLength.ContainsKey(parameter) && retries++ <= 5) { Thread.Sleep(1000); } } if (nodeConfigParamsLength.ContainsKey(parameter)) { valueLength = nodeConfigParamsLength[parameter]; } //Console.WriteLine("GOT Parameter Length: " + valuelen); // //byte[] value = new byte[valuelen]; // { (byte)intvalue };//BitConverter.GetBytes(Int32.Parse(intvalue)); byte[] value32 = BitConverter.GetBytes(paramValue); Array.Reverse(value32); //int curbyte = valuelen - 1; //for (int x = 0; x < value32.Length && curbyte >= 0; x++) //{ // value[curbyte--] = value32[x]; //} ////if (value32[0] != 0 && valuelen > 1) ////{ //// value[0] = value32[0]; ////} //// //Console.WriteLine("\n\n\nCOMPUTED VALUE: " + zp.ByteArrayToString(value32) + "\n->" + zp.ByteArrayToString(BitConverter.GetBytes(intvalue)) + "\n\n"); // byte[] msg = new byte[4 + valueLength]; msg[0] = (byte)CommandClass.Configuration; msg[1] = (byte)Command.ConfigurationSet; msg[2] = parameter; msg[3] = (byte)valueLength; switch (valueLength) { case 1: Array.Copy(value32, 3, msg, 4, 1); break; case 2: Array.Copy(value32, 2, msg, 4, 2); break; case 4: Array.Copy(value32, 0, msg, 4, 4); break; } node.SendRequest(msg); }
public static void SwitchBinarySet(ZWaveNode node, byte instance, int value) { node.SendRequest(new byte[] { (byte) CommandClass.MultiInstance, 0x0d, // ?? (MultiInstaceV2Encapsulated ??) 0x00, // ?? instance, (byte) CommandClass.SwitchBinary, (byte) Command.MultiInstanceSet, byte.Parse(value.ToString()) }); }