| | |
| | | //设备控制状态反馈
|
| | | else if (reportTopic == "DeviceDefaultAck")
|
| | | {
|
| | | this.DeviceControlResponePush(JObject.Parse(msgData));
|
| | | //this.DeviceControlResponePush(JObject.Parse(msgData));
|
| | | }
|
| | | //撤防
|
| | | else if (topic == gatewayId + "/Security/WithdrawMode_Respon")
|
| | |
| | | else if (report.DeviceStatusReport.CluterID == 8)
|
| | | {
|
| | | locadevice.DeviceStatusReport = report.DeviceStatusReport;
|
| | | if (locadevice.Type == DeviceType.DimmableLight && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
|
| | | if (report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
|
| | | {
|
| | | //此属性表明当前亮度程度
|
| | | ((DimmableLight)locadevice).Level = report.DeviceStatusReport.AttriBute[0].AttriButeData;
|
| | | if (locadevice.Type == DeviceType.DimmableLight)
|
| | | {
|
| | | //此属性表明当前亮度程度
|
| | | ((DimmableLight)locadevice).Level = report.DeviceStatusReport.AttriBute[0].AttriButeData;
|
| | | }
|
| | | else if (locadevice.Type == DeviceType.ColorTemperatureLight)
|
| | | {
|
| | | //此属性表明当前亮度程度
|
| | | ((ColorTemperatureLight)locadevice).Level = report.DeviceStatusReport.AttriBute[0].AttriButeData;
|
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ 色温数据
|
| | | //色温数据
|
| | | else if (report.DeviceStatusReport.CluterID == 768)
|
| | | {
|
| | | locadevice.DeviceStatusReport = report.DeviceStatusReport;
|
| | | if (report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
|
| | | {
|
| | | if (locadevice.Type == DeviceType.ColorTemperatureLight)
|
| | | {
|
| | | //此属性表明当前色温
|
| | | ((ColorTemperatureLight)locadevice).ColorTemperature = report.DeviceStatusReport.AttriBute[0].AttriButeData;
|
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | }
|
| | |
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | }
|
| | | //温度传感器
|
| | | //湿度传感器
|
| | | if (locadevice is TemperatureSensor)
|
| | | {
|
| | | ((TemperatureSensor)locadevice).Humidity = humidity;
|
| | | }
|
| | | //新风的湿度传感器
|
| | | else if (locadevice is HumiditySensor)
|
| | | {
|
| | | ((HumiditySensor)locadevice).Humidity = humidity;
|
| | | }
|
| | | //PM2.5传感器
|
| | | else if (locadevice is PMSensor)
|
| | |
| | | var info = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockAlarmsResult>(receiveData["Data"].ToString());
|
| | | if (info.Clusterid == 257)
|
| | | {
|
| | | //216:锁上设置的常开 |
| | | //216:锁上设置的常开
|
| | | if (info.AlarmCode == 216)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | |
| | | //更新门锁涉及的常开/常关的界面
|
| | | if (UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction != null)
|
| | | {
|
| | | UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(device.DeviceAddr + device.DeviceEpoint, true);
|
| | | UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(device.DeviceAddr, true);
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | |
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | var result = await Shared.Phone.Device.Logic.SkipView.Exist(3, (ZigBee.Device.DoorLock)device[0]);
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //弹出徐梅的那个窗口
|
| | | DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device[0], DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush,
|
| | | result != 0 ? true : false, ControlCommonResourse.UpdateDoorLockStatusAction);
|
| | | //提示门锁已经失效
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NormallyClosed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
|
| | |
|
| | | //更新门锁涉及的常开/常关的界面
|
| | | if (UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction != null)
|
| | | {
|
| | | UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(deviceAddr, false);
|
| | | }
|
| | | });
|
| | | });
|
| | | }
|