|
@@ -188,8 +188,10 @@ func MessageDisconnected(topicName string, message []byte) {
|
|
r_Device.T_monitor = 0
|
|
r_Device.T_monitor = 0
|
|
if !strings.Contains(r_Device.T_model, "BW100") {
|
|
if !strings.Contains(r_Device.T_model, "BW100") {
|
|
DeviceSensorList := Device.Read_DeviceSensor_ByTsn(r_Device.T_sn)
|
|
DeviceSensorList := Device.Read_DeviceSensor_ByTsn(r_Device.T_sn)
|
|
|
|
+ logs.Println("DeviceSensorList:", DeviceSensorList)
|
|
for _, v := range DeviceSensorList {
|
|
for _, v := range DeviceSensorList {
|
|
DeviceData_t, is := Device.RedisDeviceData_Get(r_Device.T_sn+"_Redis", v.T_id)
|
|
DeviceData_t, is := Device.RedisDeviceData_Get(r_Device.T_sn+"_Redis", v.T_id)
|
|
|
|
+ logs.Println("DeviceData_t is:", is)
|
|
if is {
|
|
if is {
|
|
Device.Add_DeviceData(r_Device.T_sn, v.T_id, DeviceData_t, true)
|
|
Device.Add_DeviceData(r_Device.T_sn, v.T_id, DeviceData_t, true)
|
|
Device.RedisDeviceData_Del(r_Device.T_sn+"_Redis", v.T_id) // 清除缓存标志
|
|
Device.RedisDeviceData_Del(r_Device.T_sn+"_Redis", v.T_id) // 清除缓存标志
|