| | |
| | | UserDeviceToLight.UpdataEnergy (usefullBytes [0], updateFlag, usefullBytes [2] * 256 + usefullBytes [3]); |
| | | UserRoom.UpdataEnergy (usefullBytes [0], common.Type + "_" + updateFlag, usefullBytes [2] * 256 + usefullBytes [3]); |
| | | break; |
| | | } else if (usefullBytes [0] == 11) { |
| | | UserDeviceToSocket.UpdataEnergy (usefullBytes [0], updateFlag, usefullBytes [2] * 256 * 256 * 256 + usefullBytes [3] * 256 * 256 + usefullBytes [4] * 256 + usefullBytes [5]); |
| | | UserDeviceToLight.UpdataEnergy (usefullBytes [0], updateFlag, usefullBytes [2] * 256 * 256 * 256 + usefullBytes [3] * 256 * 256 + usefullBytes [4] * 256 + usefullBytes [5]); |
| | | UserRoom.UpdataEnergy (usefullBytes [0], common.Type + "_" + updateFlag, usefullBytes [2] * 256 * 256 * 256 + usefullBytes [3] * 256 * 256 + usefullBytes [4] * 256 + usefullBytes [5]); |
| | | break; |
| | | } |
| | | //2020-07-01 客户提出隐藏kwh |
| | | //else if (usefullBytes [0] == 11) { |
| | | // UserDeviceToSocket.UpdataEnergy (usefullBytes [0], updateFlag, usefullBytes [2] * 256 * 256 * 256 + usefullBytes [3] * 256 * 256 + usefullBytes [4] * 256 + usefullBytes [5]); |
| | | // UserDeviceToLight.UpdataEnergy (usefullBytes [0], updateFlag, usefullBytes [2] * 256 * 256 * 256 + usefullBytes [3] * 256 * 256 + usefullBytes [4] * 256 + usefullBytes [5]); |
| | | // UserRoom.UpdataEnergy (usefullBytes [0], common.Type + "_" + updateFlag, usefullBytes [2] * 256 * 256 * 256 + usefullBytes [3] * 256 * 256 + usefullBytes [4] * 256 + usefullBytes [5]); |
| | | // break; |
| | | //} |
| | | } |
| | | |
| | | |
| | |
| | | //} else if (deviceType1.ToString ().Contains ("Switch")) { |
| | | // devcieLoopName = "Relay SW" + usefullBytes [2].ToString (); |
| | | //} |
| | | |
| | | //2020-07-03 如果是红外模块类型,备注为空的话,默认为TV名字 |
| | | if (deviceType1 == DeviceType.InfraredMode) { |
| | | devcieLoopName = "TV " + usefullBytes [2].ToString (); |
| | | } else if (deviceType1 == DeviceType.ACInfrared) { |
| | | //2020-08-28 如果是红外空调类型,备注为空的话,默认为AC名字 |
| | | devcieLoopName = "AC " + usefullBytes [2].ToString (); |
| | | } |
| | | byte [] ddd = CommonPage.MyEncodingGB2312.GetBytes (devcieLoopName); |
| | | byte [] newddd = new byte [20]; |
| | | Array.Copy (ddd, 0, newddd, 0, 20 < ddd.Length ? 20 : ddd.Length); |