| | |
| | | } |
| | | if (DB_ResidenceData.Instance.GatewayType == 0) |
| | | { |
| | | new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255, new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) }); |
| | | new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255, |
| | | new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) }); |
| | | } |
| | | else if (DB_ResidenceData.Instance.GatewayType == 1) |
| | | { |
| | |
| | | var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson); |
| | | new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id,resend); |
| | | MainPage.Log($"本地通讯 发送HDL-Link数据:{functionControlDataJson}"); |
| | | //Control.Ins.MsgInfoList.Add($"本地通讯 发送HDL-Link数据:{functionControlDataJson}"+"\r\n"); |
| | | } |
| | | } |
| | | //远程通讯 |
| | |
| | | gatewayId = DB_ResidenceData.Instance.HomeGateway.gatewayId, |
| | | sid = securityAlarm.sid, status = state, userSecurityId = securityAlarm.userSecurityId |
| | | } }); |
| | | MainPage.Log($"安防控制结果:code:{result.Code};msg:{result.message}"); |
| | | MainPage.Log($"安防控制结果:{result.Code}"); |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <summary> |
| | | /// 更新设备状态 |
| | | /// A协议数据 |
| | | /// Tag Link状态处理 |
| | | /// </summary> |
| | | /// <param name="updateBytes"></param> |
| | | public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid); |
| | | if (localFunction == null) |
| | |
| | | RollingShutterPage.UpdataState(localFunction); |
| | | break; |
| | | case SPK.CurtainShades: |
| | | break; |
| | | case SPK.HvacCac: |
| | | Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status); |
| | | |
| | | break; |
| | | case SPK.AcStandard: |
| | | case SPK.HvacAC: |
| | |
| | | case SPK.AirFreshStandard: |
| | | case SPK.HvacAirFresh: |
| | | case SPK.SensorGas: |
| | | case SPK.SensorHelp: |
| | | //设备状态推送 |
| | | //状态更新 |
| | | Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status); |