wei
2021-02-22 abf4a98837e43e542701c60b7ec6a088cd5236da
HDL_ON/DAL/DriverLayer/Control.cs
@@ -207,9 +207,9 @@
            }
            else if (MainPage.InternetStatus == 1)
            {
                if (!Ins.IsRemote)
                //if (!Ins.IsRemote)
                {
                    Ins.IsRemote = true;
                    //Ins.IsRemote = true;
                    DAL.Mqtt.MqttClient.InitState();
                }
            }
@@ -310,7 +310,17 @@
            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)
            {
@@ -343,7 +353,7 @@
                    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}");
                }
            }
        }
@@ -452,7 +462,7 @@
                    };
                    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);
                }
            }