| | |
| | | if (function.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0]) |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.TempType, receiveBytes[1].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.IndoorTemp, receiveBytes[2].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.RoomTemp, receiveBytes[2].ToString()); |
| | | function.trait_on_off.curValue = receiveBytes[8] == 1 ? "on" : "off"; |
| | | acFunction.SetMode(receiveBytes[9],function); |
| | | acFunction.SetFan(receiveBytes[10],function); |
| | |
| | | { |
| | | indoorTemp = receiveBytes[9]; |
| | | } |
| | | function.SetAttrState(FunctionAttributeKey.IndoorTemp, indoorTemp); |
| | | function.SetAttrState(FunctionAttributeKey.RoomTemp, indoorTemp); |
| | | |
| | | function.lastState += " " + function.GetAttrState(FunctionAttributeKey.Mode) + new FloorHeating().GetTempUnitString(function); |
| | | RoomPage.UpdataStates(function); |
| | |
| | | { |
| | | if (ac.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0]) |
| | | { |
| | | ac.SetAttrState(FunctionAttributeKey.IndoorTemp, receiveBytes[1].ToString()); |
| | | ac.SetAttrState(FunctionAttributeKey.RoomTemp, receiveBytes[1].ToString()); |
| | | FunctionPage.UpdataStates(ac); |
| | | } |
| | | } |
| | |
| | | Control.Ins.IsSearchLocalGatewaySuccessful = true; |
| | | Control.Ins.GatewayOnline_Local = true; |
| | | DAL.Mqtt.MqttClient.DisConnectRemote();//断开mqtt |
| | | } |
| | | break; |
| | | case Command.FreshAirControlACK_JinMao: |
| | | case Command.FreshAirReadACK_JinMao: |
| | | var airFresh = FunctionList.List.GetAirFreshList().Find((obj) => obj.GetBusId() == subnetID + "_" + deviceID + "_" + receiveBytes[0]); |
| | | if (airFresh != null) |
| | | { |
| | | /// 3 开关 0-关机,1-开机 |
| | | /// 4 运行模式 1-通风,2-加湿 humidification/fan |
| | | /// 5 节能舒适选择 1-舒适,2-节能 true/false |
| | | /// 6 风速档位 0-自动,1-1档,2-2档,3-3档 level_1/level_2/level_3/auto |
| | | /// 7 湿度设定 % |
| | | /// 8 室内温度值 ℃ |
| | | /// 9 室内湿度值 ℃ |
| | | /// 10 过滤网剩余 % |
| | | /// 11 过滤网使用超时 1 超时 0 无 true/false |
| | | airFresh.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[2] == 0 ? "off" : "on"); |
| | | airFresh.SetAttrState(FunctionAttributeKey.Mode, receiveBytes[3] == 1 ? "humidification" : "fan"); |
| | | airFresh.SetAttrState(FunctionAttributeKey.Energy, receiveBytes[4] == 1 ? "true" : "false"); |
| | | switch (receiveBytes[5]) |
| | | { |
| | | case 0: |
| | | airFresh.SetAttrState(FunctionAttributeKey.FanSpeed, "auto"); |
| | | break; |
| | | case 1: |
| | | airFresh.SetAttrState(FunctionAttributeKey.FanSpeed, "level_1"); |
| | | break; |
| | | case 2: |
| | | airFresh.SetAttrState(FunctionAttributeKey.FanSpeed, "level_2"); |
| | | break; |
| | | case 3: |
| | | airFresh.SetAttrState(FunctionAttributeKey.FanSpeed, "level_3"); |
| | | break; |
| | | } |
| | | airFresh.SetAttrState(FunctionAttributeKey.Humidity, receiveBytes[6].ToString()); |
| | | airFresh.SetAttrState(FunctionAttributeKey.IndoorTemp, receiveBytes[7].ToString()); |
| | | airFresh.SetAttrState(FunctionAttributeKey.IndoorHumidity, receiveBytes[8].ToString()); |
| | | airFresh.SetAttrState(FunctionAttributeKey.FilterRemain, receiveBytes[9].ToString()); |
| | | airFresh.SetAttrState(FunctionAttributeKey.FilterTimeout, receiveBytes[10] == 1 ? "true" : "false"); |
| | | } |
| | | break; |
| | | } |
| | |
| | | switch (command) |
| | | { |
| | | case Command.SetSingleLightACK: |
| | | case Command.FreshAirReadACK: |
| | | case Command.FreshAirControlACK: |
| | | case Command.FreshAirReadACK_JinMao: |
| | | case Command.FreshAirControlACK_JinMao: |
| | | receiveFlag += string.Format("{0}", usefulBytes[0]); |
| | | break; |
| | | case Command.SetLogicLoopColorACK: |