| | |
| | | public void SearchLoaclGateway() |
| | | { |
| | | //2021-01-15 : 住宅没有绑定网关的时候不用搜索,并且不能链接mqtt |
| | | if (DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId) || |
| | | !UserInfo.Current.IsLogin) |
| | | if (DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId)) |
| | | //|| !UserInfo.Current.IsLogin) |
| | | { |
| | | return; |
| | | } |
| | |
| | | |
| | | |
| | | //如果是控制调光的开时,亮度值不能为0 |
| | | if (commandDictionary.Count > 2) |
| | | if (commandDictionary.Count >= 2) |
| | | { |
| | | if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff) && commandDictionary.ContainsKey(FunctionAttributeKey.Brightness)) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public void ConvertReceiveData(byte[] receiveBytes, string ip) |
| | | { |
| | | if (!UserInfo.Current.IsLogin) |
| | | { |
| | | return; |
| | | } |
| | | //if (!UserInfo.Current.IsLogin) |
| | | //{ |
| | | // return; |
| | | //} |
| | | var reString = Encoding.UTF8.GetString(receiveBytes); |
| | | AnalysisReceiveData(reString, receiveBytes, ip); |
| | | } |
| | |
| | | //2021-09-23 新增获取当前网关是否本地加密 |
| | | Ins.IsLocalEncrypt = device.isLocalEncrypt; |
| | | //MainPage.Log("网关本地加密状态:" + device.local_encrypt.ToString()); |
| | | //登录网关Tcp |
| | | //登录网关Tcp tcp连接网关 |
| | | //OpenTcpClent(); |
| | | |
| | | |
| | |
| | | VenetianBlindsPage.UpdataState(localFunction); |
| | | break; |
| | | case SPK.AcStandard: |
| | | case SPK.HvacAC: |
| | | case SPK.HvacAC:case SPK.HvacAcPanel: |
| | | case SPK.AcIr: |
| | | Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status); |
| | | if (localFunction != null) |