| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 蜂鸣器推送
|
| | | //蜂鸣器数据
|
| | | else if (report.DeviceStatusReport.CluterID == 1282)
|
| | | {
|
| | | //mini夜灯
|
| | | if (Common.LocalDevice.Current.IsMiniLight(locadevice) == true)
|
| | | {
|
| | | foreach (var attData in report.DeviceStatusReport.AttriBute)
|
| | | {
|
| | | if (attData.AttributeId == 0)
|
| | | {
|
| | | //这个是报警持续时间(大于2秒时,标记为还在响着)
|
| | | ((ColorTemperatureLight)locadevice).IsBuzzerRing = attData.AttriButeData > 2 ? true : false;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ 窗帘数据
|
| | | //窗帘数据
|
| | | else if (report.DeviceStatusReport.CluterID == 258)
|
| | |
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | |
|
| | | if (locadevice is LightBase)
|
| | | {
|
| | | //当接收到亮度值时,默认打开
|
| | | ((LightBase)locadevice).OnOffStatus = 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
| | | //温度传感器
|
| | | if (locadevice is TemperatureSensor)
|
| | | {
|
| | | ((TemperatureSensor)locadevice).Temperatrue = temperatrue;
|
| | | ((TemperatureSensor)locadevice).currentTemperature = temperatrue;
|
| | | }
|
| | | //PM2.5传感器
|
| | | else if (locadevice is PMSensor)
|
| | |
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | //温度值需要保存
|
| | | locadevice.ReSave();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //湿度传感器
|
| | | if (locadevice is TemperatureSensor)
|
| | | {
|
| | | ((TemperatureSensor)locadevice).Humidity = humidity;
|
| | | ((TemperatureSensor)locadevice).currentHumidity = humidity;
|
| | | }
|
| | | //新风的湿度传感器
|
| | | else if (locadevice is HumiditySensor)
|
| | | {
|
| | | ((HumiditySensor)locadevice).Humidity = humidity;
|
| | | ((HumiditySensor)locadevice).currentHumidity = humidity;
|
| | | }
|
| | | //PM2.5传感器
|
| | | else if (locadevice is PMSensor)
|
| | | {
|
| | | ((PMSensor)locadevice).currentHumidity = (int)humidity;
|
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | //湿度值需要保存
|
| | | locadevice.ReSave();
|
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | }
|
| | | }
|
| | | #endregion
|