Online status

This commit is contained in:
Sergey Lyubka 2024-02-15 09:49:59 +00:00
parent c683e1e988
commit d128d2146a

View File

@ -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 = [];