|
|
@@ -68,7 +68,7 @@ namespace DataVAPI.UpAndDown |
|
|
|
ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接失败"); |
|
|
|
} |
|
|
|
//属性状态变xin |
|
|
|
Subscribe(IOTDevServer.TargetStatusSubTopic); |
|
|
|
//Subscribe(IOTDevServer.TargetStatusSubTopic); |
|
|
|
|
|
|
|
//订阅上下线 |
|
|
|
Subscribe(IOTDevServer.HeartbeatSubTopic); |
|
|
@@ -324,14 +324,15 @@ namespace DataVAPI.UpAndDown |
|
|
|
logController.Create(Tools.JsonToObjectTools<LogTable>(message)); |
|
|
|
|
|
|
|
} |
|
|
|
} else if (topic == IOTDevServer.TargetStatusSubTopic)//属性变更 |
|
|
|
{ |
|
|
|
ReceiveModel rEmodel = Tools.JsonToObjectTools<ReceiveModel>(message); |
|
|
|
string name= rEmodel.deviceContext.deviceName; |
|
|
|
string status = rEmodel.props.NodeStatus.value; |
|
|
|
string id = deviceController.QueryDeviceName(name)?.obj?.data?.ClientId; |
|
|
|
screenController.CreateOrUpdate(new LargeScreenTable() { json = status, devicename = name, ClientId = id, DeviceId = "" }); |
|
|
|
} |
|
|
|
} |
|
|
|
//else if (topic == IOTDevServer.TargetStatusSubTopic)//属性变更 |
|
|
|
//{ |
|
|
|
// ReceiveModel rEmodel = Tools.JsonToObjectTools<ReceiveModel>(message); |
|
|
|
// string name= rEmodel.deviceContext.deviceName; |
|
|
|
// string status = rEmodel.props.NodeStatus.value; |
|
|
|
// string id = deviceController.QueryDeviceName(name)?.obj?.data?.ClientId; |
|
|
|
// screenController.CreateOrUpdate(new LargeScreenTable() { json = status, devicename = name, ClientId = id, DeviceId = "" }); |
|
|
|
//} |
|
|
|
} |
|
|
|
} |
|
|
|
} |