public static void Get(ZWaveNode node)
 {
     node.SendDataRequest(new byte[] { 
         (byte)CommandClass.DoorLock, 
         (byte)Command.DoorLockGet
     });
 }
 public static void Get(ZWaveNode node)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.Battery,
         (byte)Command.BatteryGet
     });
 }
 public static ZWaveMessage SupportedGet(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.CentralScene,
         (byte)Command.CentralSceneSupportedGet
     }));
 }
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Battery,
         (byte)Command.BatteryGet
     }));
 }
示例#5
0
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.ThermostatFanState,
         (byte)Command.BasicGet
     }));
 }
示例#6
0
 public static ZWaveMessage GetSupported(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.Meter, 
         (byte)Command.MeterSupportedGet
     });
 }
 public static ZWaveMessage GetOperatingState(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] {
         (byte)CommandClass.ThermostatOperatingState,
         (byte)Command.BasicGet
     });
 }
 public static ZWaveMessage ChangedGet(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte [] {
         (byte)CommandClass.ClimateControlSchedule,
         (byte)Command.ScheduleChangedGet
     }));
 }
示例#9
0
 public static ZWaveMessage GetCapabilityReport(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] {
         (byte)CommandClass.SwitchColor,
         (byte)Command.SwitchColorCapabilityGet
     });
 }
示例#10
0
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.WakeUp,
         (byte)Command.WakeUpIntervalGet
     }));
 }
示例#11
0
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] {
         (byte)CommandClass.SensorBinary,
         (byte)Command.SensorBinaryGet
     });
 }
示例#12
0
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.WakeUp, 
         (byte)Command.WakeUpIntervalGet 
     });
 }
示例#13
0
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.DoorLock, 
         (byte)Command.DoorLockGet
     });
 }
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.SwitchMultilevel, 
         (byte)Command.SwitchMultilevelGet 
     });
 }
示例#15
0
 public static ZWaveMessage Reset(ZWaveNode node)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.Meter, 
         (byte)Command.MeterReset
     });
 }
示例#16
0
 public static ZWaveMessage Get(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.SwitchMultilevel,
         (byte)Command.SwitchMultilevelGet
     }));
 }
示例#17
0
 public static ZWaveMessage Reset(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Meter,
         (byte)Command.MeterReset
     }));
 }
示例#18
0
 public static ZWaveMessage GetSupported(ZWaveNode node)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Meter,
         (byte)Command.MeterSupportedGet
     }));
 }
 public static void Get(ZWaveNode node)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.WakeUp,
         (byte)Command.WakeUpIntervalGet
     });
 }
示例#20
0
 public static ZWaveMessage Get(ZWaveNode node)
 {
     byte[] request = new byte[] {
         (byte)CommandClass.ManufacturerSpecific,
         (byte)Command.ManufacturerSpecificGet
     };
     return(node.SendDataRequest(request));
 }
 public static ZWaveMessage Get(ZWaveNode node, byte groupId)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Association,
         (byte)Command.AssociationGet,
         groupId
     }));
 }
示例#22
0
 public static ZWaveMessage Get(ZWaveNode node, byte scaleType)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Meter,
         (byte)Command.MeterGet,
         scaleType
     }));
 }
示例#23
0
 public static ZWaveMessage Get(ZWaveNode node, byte scaleType)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.Meter, 
         (byte)Command.MeterGet,
         scaleType
     });
 }
示例#24
0
 public static void GetCount(ZWaveNode node, byte commandClass)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         (byte)Command.MultiInstanceCountGet,
         commandClass
     });
 }
 public static ZWaveMessage Get(ZWaveNode node)
 {
     byte[] request = new byte[] {
         (byte)CommandClass.ManufacturerSpecific,
         (byte)Command.ManufacturerSpecificGet
     }; 
     return node.SendDataRequest(request);
 }
 public static void GetCount(ZWaveNode node, byte commandClass)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         (byte)Command.MultiInstanceCountGet,
         commandClass
     });
 }
示例#27
0
 public static ZWaveMessage Set(ZWaveNode node, Value mode)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.ThermostatMode,
         (byte)Command.BasicSet,
         (byte)mode
     }));
 }
示例#28
0
 public static void GetScheme(ZWaveNode node)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.Security,
         (byte)SecurityCommand.SchemeGet,
         0
     });
 }
示例#29
0
 public static ZWaveMessage Get(ZWaveNode node, CommandClass cmdClass)
 {
     return node.SendDataRequest(new byte[] {
         (byte)CommandClass.Version,
         (byte)Command.VersionCommandClassGet,
         (byte)cmdClass
     });
 }
 public static ZWaveMessage Set(ZWaveNode node, Value mode)
 {
     return node.SendDataRequest(new byte[] {
         (byte)CommandClass.ThermostatFanMode,
         (byte)Command.BasicSet,
         (byte)mode
     });
 }
 public static ZWaveMessage GetCount(ZWaveNode node, byte commandClass)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         (byte)Command.MultiInstanceCountGet,
         commandClass
     }));
 }
 public static ZWaveMessage Get(ZWaveNode node, byte parameter)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Configuration,
         (byte)Command.ConfigurationGet,
         parameter
     }));
 }
示例#33
0
 public static ZWaveMessage Set(ZWaveNode node, int value)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.Basic, 
         (byte)Command.BasicSet, 
         byte.Parse(value.ToString())
     });
 }
示例#34
0
 public static ZWaveMessage Get(ZWaveNode node, Value ptype)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.ThermostatSetPoint,
         (byte)Command.ThermostatSetPointGet,
         (byte)ptype
     }));
 }
 public static ZWaveMessage Get(ZWaveNode node, Weekday weekday)
 {
     return(node.SendDataRequest(new byte [] {
         (byte)CommandClass.ClimateControlSchedule,
         (byte)Command.ScheduleGet,
         (byte)weekday
     }));
 }
 public static ZWaveMessage Get(ZWaveNode node, Value ptype)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.ThermostatSetPoint, 
         (byte)Command.ThermostatSetPointGet,
         (byte)ptype
     });
 }
示例#37
0
 public static ZWaveMessage Set(ZWaveNode node, int value)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.SwitchMultilevel,
         (byte)Command.SwitchMultilevelSet,
         byte.Parse(value.ToString())
     }));
 }
示例#38
0
 public static ZWaveMessage GetCapability(ZWaveNode node, int colorindex)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.SwitchColor,
         (byte)Command.SwitchColorGet,
         (byte)colorindex
     }));
 }
示例#39
0
 /// <summary>
 /// This command is used to request a receiving node about its irrigation system status.
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 /// <remarks>SDS13781-2 4.42.6 Irrigation System Status Get Command</remarks>
 public static ZWaveMessage SystemStatusGet(ZWaveNode node)
 {
     return(node.SendDataRequest(new[]
     {
         (byte)CommandClass.Irrigation,
         (byte)Command.IrrigationSystemStatusGet
     }));
 }
示例#40
0
 public static ZWaveMessage Get(ZWaveNode node, CommandClass cmdClass)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Version,
         (byte)Command.VersionCommandClassGet,
         (byte)cmdClass
     }));
 }
 public static ZWaveMessage Get(ZWaveNode node, ZWaveSensorParameter sensorType, byte scale = 0x00)
 {
     return(node.SendDataRequest(new[] {
         (byte)CommandClass.SensorMultilevel,
         (byte)Command.SensorMultilevelGet,
         (byte)sensorType,
         (byte)(scale << 3)
     }));
 }
示例#42
0
 /// <summary>
 /// This command is used to prevent any irrigation activity triggered by the Schedule CC for a specified duration.
 /// </summary>
 /// <param name="node"></param>
 /// <param name="duration">
 /// Duration of the system shutoff.
 /// Values in the range 1..254 indicate how many hours the irrigation system must stay shut off after reception of this command.
 /// The value 0 indicates to turn off any running valve (including the master valve) as well as cancel any active Irrigation Valve Table Run or Schedule.
 /// The value 255 indicates that the irrigation system MUST stay permanently shut off until the node receives special commands.
 /// </param>
 /// <returns></returns>
 /// <remarks>SDS13781 4.42.21 Irrigation System Shutoff Command</remarks>
 public static ZWaveMessage SystemShutoff(ZWaveNode node, byte duration)
 {
     return(node.SendDataRequest(new[]
     {
         (byte)CommandClass.Irrigation,
         (byte)Command.IrrigationSystemShutoff,
         duration
     }));
 }
示例#43
0
 /// <summary>
 /// This command is used to request the contents of the specified Valve Table ID.
 /// </summary>
 /// <param name="node"></param>
 /// <param name="valveTableId">
 /// This field is used to specify the valve table ID.
 /// Valves tables MUST be identified sequentially from 1 to the total number available on the device.
 /// </param>
 /// <returns></returns>
 /// <remarks>SDS13781 4.42.17 Irrigation Valve Table Set Command</remarks>
 public static ZWaveMessage ValveTableGet(ZWaveNode node, byte valveTableId)
 {
     return(node.SendDataRequest(new[]
     {
         (byte)CommandClass.Irrigation,
         (byte)Command.IrrigationValveTableGet,
         valveTableId
     }));
 }
 public static ZWaveMessage Remove(ZWaveNode node, byte groupId, byte targetNodeId)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.Association,
         (byte)Command.AssociationRemove,
         groupId,
         targetNodeId
     }));
 }
示例#45
0
 public static void SensorBinaryGet(ZWaveNode node, byte instance)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         0x06, // ??
         instance,
         (byte)CommandClass.SensorBinary,
         0x04 //
     });
 }
 public static ZWaveMessage SensorMultiLevelGet(ZWaveNode node, byte instance)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         0x06, // ??
         instance,
         (byte)CommandClass.SensorMultilevel,
         0x04 //
     }));
 }
 public static void SensorMultiLevelGet(ZWaveNode node, byte instance)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         0x06, // ??
         instance,
         (byte)CommandClass.SensorMultilevel,
         0x04 //
     });
 }
 public static void SwitchBinaryGet(ZWaveNode node, byte instance)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         0x0d, // ?? (MultiInstaceV2Encapsulated ??)
         0x00, // ??
         instance,
         (byte)CommandClass.SwitchBinary,
         (byte)Command.MultiInstanceGet
     });
 }
 public static void Set(ZWaveNode node, uint interval)
 {
     node.SendDataRequest(new byte[] {
         (byte)CommandClass.WakeUp,
         (byte)Command.WakeUpIntervalSet,
         (byte)((interval >> 16) & 0xff),
         (byte)((interval >> 8) & 0xff),
         (byte)((interval) & 0xff),
         0x01
     });
 }
示例#50
0
        /// <summary>
        /// This command allows the irrigation system to be configured accordingly.
        /// </summary>
        /// <param name="node"></param>
        /// <param name="config"></param>
        /// <returns>SDS13781 4.42.8 Irrigation System Config Set Command</returns>
        public static ZWaveMessage SystemConfigSet(ZWaveNode node, IrrigationSystemConfig config)
        {
            var commandBytes = new List <byte>
            {
                (byte)CommandClass.Irrigation,
                (byte)Command.IrrigationSystemConfigSet
            };

            commandBytes.AddRange(config.ToByteArray());
            return(node.SendDataRequest(commandBytes.ToArray()));
        }
示例#51
0
 public static ZWaveMessage Set(ZWaveNode node, uint interval)
 {
     return(node.SendDataRequest(new byte[] {
         (byte)CommandClass.WakeUp,
         (byte)Command.WakeUpIntervalSet,
         (byte)((interval >> 16) & 0xff),
         (byte)((interval >> 8) & 0xff),
         (byte)((interval) & 0xff),
         0x01
     }));
 }
示例#52
0
 public static ZWaveMessage 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);
     return node.SendDataRequest(message.ToArray());
 }
示例#53
0
 public static ZWaveMessage GetCapability(ZWaveNode node, int colorindex)
 {
     return node.SendDataRequest(new byte[] {
         (byte)CommandClass.SwitchColor,
         (byte)Command.SwitchColorGet,
         (byte)colorindex
     });
 }
示例#54
0
        public static ZWaveMessage Set(ZWaveNode node, Value value)
        {
            byte lockValue;
            if (value == DoorLock.Value.Secured)
                lockValue = 255;
            else
                lockValue = 0;

            return node.SendDataRequest(new byte[] { 
                (byte)CommandClass.DoorLock, 
                (byte)Command.DoorLockSet,
                (byte)lockValue
            });
        }
示例#55
0
 public static ZWaveMessage SendToSleep(ZWaveNode node)
 {
     ZWaveMessage msg = null;
     var wakeUpStatus = (WakeUpStatus)node.GetData("WakeUpStatus", new WakeUpStatus()).Value;
     if (!wakeUpStatus.IsSleeping)
     {
         // 0x01, 0x09, 0x00, 0x13, 0x2b, 0x02, 0x84, 0x08, 0x25, 0xee, 0x8b
         msg = node.SendDataRequest(new byte[] { 
             (byte)CommandClass.WakeUp, 
             (byte)Command.WakeUpNoMoreInfo,
             0x25
         }).Wait();
         wakeUpStatus.IsSleeping = true;
         var nodeEvent = new NodeEvent(node, EventParameter.WakeUpSleepingStatus, 1 /* 1 = sleeping, 0 = awake */, 0);
         node.OnNodeUpdated(nodeEvent);
     }
     return msg;
 }
示例#56
0
 public static ZWaveMessage Set(ZWaveNode node, ColorValue[] colors)
 {
     byte[] data = new byte[3 + 2 * colors.Length];
     data[0] = (byte)CommandClass.SwitchColor;
     data[1] = (byte)Command.SwitchColorSet;
     data[2] = (byte)colors.Length;
     for (int i = 0; i < colors.Length; i++)
     {
         data[3 + 2 * i] = (byte)colors[i].ColorNumber;
         data[4 + 2 * i] = (byte)colors[i].Value;
     }
     return node.SendDataRequest(data);
 }
 public static ZWaveMessage 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));
     return node.SendDataRequest(message.ToArray());
 }
示例#58
0
 public static ZWaveMessage SensorBinaryGet(ZWaveNode node, byte instance)
 {
     return node.SendDataRequest(new byte[] {
         (byte)CommandClass.MultiInstance,
         0x06, // ??
         instance,
         (byte)CommandClass.SensorBinary,
         0x04 //
     });
 }
示例#59
0
 public static ZWaveMessage Remove(ZWaveNode node, byte groupId, byte targetNodeId)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.Association, 
         (byte)Command.AssociationRemove, 
         groupId, 
         targetNodeId 
     });
 }
示例#60
0
 public static ZWaveMessage Get(ZWaveNode node, byte groupId)
 {
     return node.SendDataRequest(new byte[] { 
         (byte)CommandClass.Association, 
         (byte)Command.AssociationGet, 
         groupId 
     });
 }