wei
2020-12-23 271faaf6664166dc368639b9f2e577f63f901be5
HDL_ON/DAL/DriverLayer/Control.cs
@@ -225,8 +225,6 @@
                        //本地搜索不到网关
                        if (!Ins.IsRemote)
                        {
                            //连接mqtt前,先断开--2020-12-21
                            DAL.Mqtt.MqttClient.DisConnectRemote();
                            Ins.IsRemote = true;
                            DAL.Mqtt.MqttClient.InitState();
                        }
@@ -243,7 +241,11 @@
        {
            if (Ins.IsRemote || DB_ResidenceData.Instance.GatewayType == 1)
            {
                ControlAProtocolScene(scene);
                new System.Threading.Thread(() =>
                {
                    ControlAProtocolScene(scene);
                })
                { IsBackground = true }.Start();
            }
            else
            {
@@ -264,7 +266,7 @@
        /// <returns></returns>
        public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary)
        {
            function.usageCount++;
            function.controlCounter++;
            function.refreshTime = DateTime.Now;
            //如果是控制调光的开时,亮度值不能为0
@@ -289,6 +291,8 @@
                }
            }
            MainPage.Log($"发送数据:{Newtonsoft.Json.JsonConvert.SerializeObject(commandDictionary)}");
            //远程通讯
            if (Ins.IsRemote)
            {
@@ -298,7 +302,6 @@
                var actionObjs = new List<ApiAlinkControlActionObj>();
                actionObjs.Add(apiControlData);
                var pack = httpServer.ControlDevice(actionObjs);
                //MainPage.Log($"{pack.Code}:{pack.Data}");
            }
            //本地通讯
            else
@@ -403,8 +406,8 @@
        {
            if (Ins.IsRemote)
            {
                var pm = new HDL_ON.DAL.Server.HttpServerRequest();
                pm.ExecuteScene(scene.userSceneId);
                var pm = new DAL.Server.HttpServerRequest();
                var result = pm.ExecuteScene(scene.userSceneId);
            }
            else
            {