Do not send 'switching profile applied to line' notification; Handle nok,ok,offline node status
This commit is contained in:
parent
c052887a1f
commit
63504df84d
2 changed files with 277 additions and 363 deletions
|
|
@ -1591,26 +1591,34 @@ exports.install = function(instance) {
|
|||
}
|
||||
}
|
||||
|
||||
//TODO -> status offline for rvo if rotary_switch_state is OFF
|
||||
//let relayStatus = 1;
|
||||
//if (relaysData[line] != undefined) {
|
||||
let contactorStatus = 1;
|
||||
if(relaysData[line] != undefined) contactorStatus = relaysData[line].contactor;
|
||||
|
||||
if (line == 0 || contactorStatus == 0) {
|
||||
interval = setInterval(runTasks, LONG_INTERVAL);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: -> status offline for rvo if rotary_switch_state is OFF, this is source of errors
|
||||
//
|
||||
// let relayStatus = 1;
|
||||
// if (relaysData[line] != undefined) {
|
||||
// relayStatus = relaysData[line].contactor;
|
||||
//}
|
||||
// }
|
||||
|
||||
// if (line == 0) relayStatus = 0;
|
||||
// if (type == "cmd-terminal") relayStatus = 1;
|
||||
|
||||
//if (line == 0) relayStatus = 0;
|
||||
//if (type == "cmd-terminal") relayStatus = 1;
|
||||
// //check if rotary_switch_state == "Off"
|
||||
// if (relayStatus == 0) {
|
||||
// console.log("------------------------------------relayStatus", relayStatus, line);
|
||||
// let values = { "status": "OFFLINE" };
|
||||
|
||||
//check if rotary_switch_state == "Off"
|
||||
//if (relayStatus == 0) {
|
||||
//console.log("------------------------------------relayStatus", relayStatus, line);
|
||||
//let values = { "status": "OFFLINE" };
|
||||
// if(tbname) sendTelemetry(values, tbname)
|
||||
|
||||
//if(tbname) sendTelemetry(values, tbname)
|
||||
|
||||
//interval = setInterval(runTasks, SHORT_INTERVAL);
|
||||
//return;
|
||||
//}
|
||||
// interval = setInterval(runTasks, SHORT_INTERVAL);
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (!rsPort.isOpen) {
|
||||
interval = setInterval(runTasks, LONG_INTERVAL);
|
||||
|
|
@ -1806,7 +1814,7 @@ exports.install = function(instance) {
|
|||
|
||||
}
|
||||
else {
|
||||
if(currentTask.debug) {
|
||||
if (currentTask.debug) {
|
||||
// currentTask.timestamp <= currentTimestamp && logger.debug("currentTask is not processed - task is in the future", currentTask);
|
||||
}
|
||||
|
||||
|
|
@ -1845,7 +1853,7 @@ exports.install = function(instance) {
|
|||
delete cmdCounter[node];
|
||||
logger.debug("profil nebol úspešne odoslaný na node č. ", params);
|
||||
|
||||
if(!nodeProfileSendFail.has(node)) {
|
||||
if (!nodeProfileSendFail.has(node)) {
|
||||
sendNotification("CMD Manager: process cmd", tbName, "configuration_of_dimming_profile_to_node_failed", { node: node }, "", SEND_TO.tb, instance);
|
||||
nodeProfileSendFail.add(node);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue