| | |
| | | });
|
| | | return;
|
| | | }
|
| | | else if (topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
|
| | | || topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
|
| | | else if (UserCenterResourse.UserInfo.AuthorityNo == 3)
|
| | | {
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 3)
|
| | | if (topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
|
| | | || topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | |
| | |
|
| | | UserCenterLogic.ReLoginAgain(UserCenterResourse.UserInfo.Account, false);
|
| | | });
|
| | | return;
|
| | | }
|
| | | return;
|
| | | else if (topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Home.Id + "_" + Common.Config.Instance.Guid + "/PrimaryUserDelYou")
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //分享住宅已更改,请联系管理员!
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uShardResidenceHadDeletePleaseTakeToAdmin);
|
| | | var contr = new ShowMsgControl(ShowMsgType.Tip, msg);
|
| | | contr.Show();
|
| | |
|
| | | UserCenterLogic.ReLoginAgain(UserCenterResourse.UserInfo.Account, false);
|
| | | });
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | try
|
| | | {
|
| | | if (HdlGatewayLogic.Current.IsGatewayExist(gatewayId) == false)
|
| | |
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | }
|
| | | else if (attData.AttributeId == 4097)
|
| | | {
|
| | | //过虑网清洗标志:42
|
| | | ((AC)locadevice).CleanStatu = attData.AttriButeData == 42;
|
| | | }
|
| | | else if (attData.AttributeId == 4099)
|
| | | {
|
| | | //转换为二进制
|
| | | var value = Convert.ToString(attData.AttriButeData, 2).PadLeft(16, '0');
|
| | | //这五个设置是放在后面的
|
| | | value = value.Substring(value.Length - 5, 5);
|
| | | for (int i = 0; i < value.Length; i++)
|
| | | {
|
| | | //自定义的空调模式
|
| | | ((AC)locadevice).listSupportMode[i] = Convert.ToInt32(value[i].ToString());
|
| | | }
|
| | | locadevice.ReSave();
|
| | | }
|
| | | }
|
| | | }
|
| | | //空调数据
|
| | |
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | }
|
| | | else if (attData.AttributeId == 4097)
|
| | | {
|
| | | //转换为二进制
|
| | | var value = Convert.ToString(attData.AttriButeData, 2).PadLeft(16, '0');
|
| | | //这个设置是放在后面的
|
| | | value = value.Substring(value.Length - 1, 1);
|
| | | //启用摆风功能
|
| | | ((AC)locadevice).UseSwingFunction = value == "1";
|
| | | locadevice.ReSave();
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
| | | else if (report.DeviceStatusReport.CluterID == 8)
|
| | | {
|
| | | locadevice.DeviceStatusReport = report.DeviceStatusReport;
|
| | | if (report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
|
| | | if (locadevice.Type == DeviceType.DimmableLight && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
|
| | | {
|
| | | //此属性表明当前亮度程度
|
| | | ((DimmableLight)locadevice).Level = report.DeviceStatusReport.AttriBute[0].AttriButeData;
|