old mode 100644
new mode 100755
| | |
| | | /// </summary> |
| | | /// <param name="commandString"></param> |
| | | /// <param name="function"></param> |
| | | /// <param name="useRemote">是否直接使用远程发送</param> |
| | | /// <returns></returns> |
| | | public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary) |
| | | public void SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false) |
| | | { |
| | | function.controlCounter++; |
| | | function.refreshTime = DateTime.Now; |
| | |
| | | MainPage.Log($"发送数据:{Newtonsoft.Json.JsonConvert.SerializeObject(commandDictionary)}"); |
| | | |
| | | //远程通讯 |
| | | if (Ins.IsRemote) |
| | | if (Ins.IsRemote || useRemote == true) |
| | | { |
| | | DAL.Server.HttpServerRequest httpServer = new DAL.Server.HttpServerRequest(); |
| | | //ALink控制、Bus控制使用同一个接口控制,由云端负责解析 |
| | |
| | | break; |
| | | case SPK.ElectricTV: |
| | | break; |
| | | case SPK.ElectricTuyaAirCleaner:
|
| | | case SPK.ElectricTuyaFan:
|
| | | case SPK.ElectricTuyaWeepRobot: |
| | | //设备状态推送 |
| | | var myDevice = Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp); |
| | | if (myDevice != null)
|
| | | {
|
| | | localObj = myDevice;
|
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (localObj != null)
|
| | | {
|
| | | HomePage.UpdataFunctionStates(localObj); |
| | | RoomPage.UpdataStates(localObj); |
| | | FunctionPage.UpdataStates(localObj); |
| | | ClassificationPage.UpdataInfo(localObj); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"A协议更新状态异常:{ex.Message}"); |