| | |
| | | } |
| | | else if (MainPage.InternetStatus == 1) |
| | | { |
| | | if (!Ins.IsRemote) |
| | | //if (!Ins.IsRemote) |
| | | { |
| | | Ins.IsRemote = true; |
| | | //Ins.IsRemote = true; |
| | | DAL.Mqtt.MqttClient.InitState(); |
| | | } |
| | | } |
| | |
| | | |
| | | MainPage.Log($"发送数据:{Newtonsoft.Json.JsonConvert.SerializeObject(commandDictionary)}"); |
| | | |
| | | //useRemote = true; |
| | | ///第三方涂鸦设备统一使用远程控制 |
| | | switch(function.spk) |
| | | { |
| | | case SPK.ElectricTuyaAirCleaner: |
| | | case SPK.ElectricTuyaFan: |
| | | case SPK.ElectricTuyaWaterValve: |
| | | case SPK.ElectricTuyaWeepRobot: |
| | | useRemote = true; |
| | | break; |
| | | } |
| | | |
| | | //远程通讯 |
| | | if (Ins.IsRemote || useRemote == true) |
| | | { |
| | |
| | | var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(functionControlDataObj); |
| | | var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson); |
| | | new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id); |
| | | MainPage.Log($"发送HDL-Link数据:{functionControlDataJson}"); |
| | | MainPage.Log($"本地通讯 发送HDL-Link数据:{functionControlDataJson}"); |
| | | } |
| | | } |
| | | } |
| | |
| | | }; |
| | | var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(readDataObj); |
| | | var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ReadStatus, functionControlDataJson); |
| | | MainPage.Log($"发送HDL-Link数据:{functionControlDataJson}"); |
| | | MainPage.Log($"本地通讯 发送HDL-Link数据:{functionControlDataJson}"); |
| | | new Control_Udp().SendLocalHdlLinkData(sendBytes, readDataObj.id); |
| | | } |
| | | } |