Handle NOK master_node
This commit is contained in:
parent
63504df84d
commit
613d846dbe
2 changed files with 18 additions and 28 deletions
|
|
@ -742,6 +742,7 @@ exports.install = function(instance) {
|
|||
async function sendRvoStatus() {
|
||||
|
||||
if (SETTINGS === undefined) return;
|
||||
SETTINGS.masterNodeIsResponding ? deviceStatus["master_node"] = "OK" : deviceStatus["master_node"] = "NOK";
|
||||
|
||||
const table = {
|
||||
"OK": 1,
|
||||
|
|
@ -776,7 +777,7 @@ exports.install = function(instance) {
|
|||
let status = "OK";
|
||||
|
||||
for (const [key, value] of Object.entries(deviceStatus)) {
|
||||
if (["em", "twilight_sensor", "temperature"].includes(key) && value == "NOK") status = "NOK";
|
||||
if (["em", "twilight_sensor", "temperature", "master_node"].includes(key) && value == "NOK") status = "NOK";
|
||||
}
|
||||
|
||||
if (status == "OK") {
|
||||
|
|
@ -794,7 +795,6 @@ exports.install = function(instance) {
|
|||
|
||||
// battery status. If value is 1 - battery is NOK
|
||||
if (previousValues[5] === 1) status = "NOK";
|
||||
if (!SETTINGS.masterNodeIsResponding) status = "NOK";
|
||||
if (SETTINGS.no_voltage.size > 0) status = "NOK";
|
||||
|
||||
// console.log("rvo status",status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue