mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 02:59:01 +08:00
Online status
This commit is contained in:
parent
c683e1e988
commit
d128d2146a
@ -450,8 +450,8 @@ const App = function() {
|
||||
});
|
||||
};
|
||||
|
||||
subscribe(statusTopic)
|
||||
subscribe(txTopic)
|
||||
subscribe(statusTopic);
|
||||
subscribe(txTopic);
|
||||
});
|
||||
|
||||
MqttClient.on('message', (topic, message) => {
|
||||
@ -472,7 +472,8 @@ const App = function() {
|
||||
console.error('Invalid response');
|
||||
return;
|
||||
}
|
||||
device.online = params.status === 'online'
|
||||
device.online = params.status === 'online';
|
||||
setConnected(device.online);
|
||||
if (device.online) {
|
||||
device.config = params;
|
||||
if (!device.config.pins) device.config.pins = [];
|
||||
|
Loading…
Reference in New Issue
Block a user