增加日志推送,增加房态变化的时候 断电功能

This commit is contained in:
2026-02-03 08:53:47 +08:00
parent e4610f1ffa
commit 1d77141ffe
21 changed files with 229 additions and 26 deletions

View File

@@ -406,6 +406,7 @@ namespace RCUHost.Implement
DataTongJi.TotalCount.TryAdd(TotalKey, u);
}
//logger.Error("升级拉取指令:" + Tools.ByteToString(data));
udpClient.Send(data, data.Length, endPoint);
// 使用同一个 Socket 发送回复
//udpClient.SendTo(data, endPoint);
@@ -1247,6 +1248,10 @@ namespace RCUHost.Implement
byte cmdType = context111.SystemHeader.Value.CmdType;
if (cmdType == 0x68)
{
logger.Error("收到升级返回:" + Tools.ByteToString(gga.Data));
}
ushort MyFrameNO = context111.SystemHeader.Value.FrameNo;
byte[] framenolist = BitConverter.GetBytes(MyFrameNO);
@@ -1274,6 +1279,7 @@ namespace RCUHost.Implement
o.CurrentStatus = "on";
o.CurrentTime = DateTime.Now;
o.EndPoint = EndPointStr;
o.UnixTime = Tools.GetUnixTime();
//新来的数据
var n = Newtonsoft.Json.JsonConvert.SerializeObject(o);
@@ -1358,7 +1364,7 @@ namespace RCUHost.Implement
d1.device_id = HostNNN;
d1.frame_id = MyFrameNO;
d1.cmd_word = "0F";
d1.udp_raw = Tools.ByteToString(OriginalByte);
d1.udp_raw = OriginalByte;
d1.direction = "上报";
string sss = Newtonsoft.Json.JsonConvert.SerializeObject(d1);
CSRedisCacheHelper.Publish("redis-0X36-0X0F", sss);
@@ -1857,7 +1863,7 @@ namespace RCUHost.Implement
d1.device_id = HostNNN;
d1.frame_id = MyFrameNO;
d1.cmd_word = "36";
d1.udp_raw = Tools.ByteToString(OriginalByte);
d1.udp_raw = OriginalByte;
d1.direction = "上报";
List<ts_deviceitem> lll1 = new List<ts_deviceitem>();