黄学彪
2020-05-11 2e7e5f9af5b32cfe1fc3c6ba40bf7eb984bbd0a4
ZigbeeApp/Shared/Phone/ZigBee/Device/AC.cs
@@ -4,7 +4,7 @@
namespace ZigBee.Device
{
    [System.Serializable]
    public class AC : ThirdPartyModuleUpgrade
    public class AC : CommonDevice
    {
        public AC()
        {
@@ -14,35 +14,23 @@
        /// <summary>
        ///当前室内温度
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int currentLocalTemperature = 0;
        /// <summary>
        /// 当前加热度数
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int currentHeatingSetpoint = 0;
        /// <summary>
        /// 当前制冷度数
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int currentCoolingSetpoint = 0;
        /// <summary>
        /// 当前自动温度
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int currentAutoSetpoint;
        /// <summary>
        ///恒温设备类型
        /// <para>恒温设备具备功能,Attribute Values如下</para>
        /// <para>0:(Cooling Only) 无Heat和Emergency功能</para>
        /// <para>1:(Cooling With Reheat)无Heat和Emergency功能</para>
        /// <para>2:(Heating Only)无Cool和Precooling功能</para>
        /// <para>3:(Heating With Reheat)无Cool和Precooling功能</para>
        /// <para>4:(Cooling and Heating 4-pipes)可能有所有功能</para>
        /// <para>5:(Cooling and Heating 4-pipes with Reheat)可能有所有功能</para>
        /// </summary>
        public int currentAcType = 0;
        /// <summary>
        /// 恒温设备当前模式
        /// <para>恒温设备具备功能,SystemMode Attribute Values如下</para>
@@ -56,8 +44,8 @@
        /// <para>8:Dry </para>
        /// <para>9:Sleep</para>
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int currentSystemMode = 0;
        /// <summary>
        /// 风扇当前模式
        /// <para>0:Off </para>
@@ -68,8 +56,8 @@
        /// <para>5:Auto </para>
        /// <para>6:Smart</para>
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int currentFanMode = 0;
        /// <summary>
        /// 风扇zz扫风当前模式
        /// <para>0:1挡 </para>
@@ -79,18 +67,9 @@
        /// <para>4:5 </para>
        /// <para>7:Auto </para>
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int currentFanSwingMode = 0;
        /// <summary>
        /// 支持的控制模式
        /// </summary>
        public List<AcMode> acModes = new List<AcMode> { };
        /// <summary>
        /// 支持的风速模式
        /// </summary>
        public List<FanMode> fanModes = new List<FanMode> { };
        /// <summary>
        /// <para>自定义空调支持的模式(默认全开)</para>
        /// <para>数组索引 -> 0:制冷 1:制热 2:送风 3:除湿 4:自动</para>
        /// <para>值 -> 1:代表使用  0:代表不使用</para>
@@ -100,10 +79,10 @@
        /// 是否启用摆风功能 false:不使用摆风功能 true:使用摆风功能
        /// </summary>
        public bool UseSwingFunction = true;
        /// <summary>
        /// 过滤网清洗状态
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public bool CleanStatu = false;
        /// <summary>
@@ -261,8 +240,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -276,7 +254,6 @@
                    if (topic == gatewayID + "/" + "SetWritableValue_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
                        if (tempData == null)
@@ -340,8 +317,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -355,7 +331,6 @@
                    if (topic == gatewayID + "/" + "SetWritableValue_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
                        if (tempData == null)
@@ -418,8 +393,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -433,7 +407,6 @@
                    if (topic == gatewayID + "/" + "SetWritableValue_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
                        if (tempData == null)
@@ -496,8 +469,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -511,7 +483,6 @@
                    if (topic == gatewayID + "/" + "SetWritableValue_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
                        if (tempData == null)
@@ -574,8 +545,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -589,7 +559,6 @@
                    if (topic == gatewayID + "/" + "SetWritableValue_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
                        if (tempData == null)
@@ -692,8 +661,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -707,7 +675,6 @@
                    if (topic == gatewayID + "/" + "SetWritableValue_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
                        if (tempData == null)