protected override void Execute(ZwaveDevice device, Node node, ZwaveCommandQueue queue) { queue.AddDistinct("Get Alarm", async () => { var result = await node.GetCommandClass<Alarm>().Get(); HandleAlarmReport(result); }); }
protected override void Execute(ZwaveDevice device, Node node, ZwaveCommandQueue queue) { queue.AddDistinct("Get SensorMultiLevel", async () => { var result = await node.GetCommandClass<SensorMultiLevel>().Get(); HandleSensorMultiLevelReport(result); }); }
protected override void Execute(ZwaveDevice device, Node node, ZwaveCommandQueue queue) { foreach (AlarmType alarmType in Enum.GetValues(typeof(AlarmType))) { queue.AddDistinct("Get SensorAlarm " + alarmType, async () => { var result = await node.GetCommandClass<SensorAlarm>().Get(alarmType); HandleSensorAlarmReport(result); }); } }
protected override void Execute(ZwaveDevice device, Node node, ZwaveCommandQueue queue) { queue.AddDistinct("Get Meter", async () => { if ((DateTime.UtcNow - _lastUpdate) < _interval) { return; } var result = await node.GetCommandClass<Meter>().Get(); HandleMeterReport(result); }); }