new switching line functionality - in progress
This commit is contained in:
parent
31fe341ef1
commit
d289a99d07
3 changed files with 1485 additions and 1194 deletions
|
|
@ -139,16 +139,16 @@ exports.install = function(instance) {
|
|||
|
||||
obj.transformResponse(resp, register, obj.deviceAddress);
|
||||
|
||||
obj.error = 0;
|
||||
obj.errors = 0;
|
||||
obj.index++;
|
||||
obj.readAnotherRegister();
|
||||
|
||||
}).catch (function () {
|
||||
|
||||
console.log("error pri citani modbus registra", register, obj.indexInDeviceConfig, tbName, tbAttribute);
|
||||
console.log("errors pri citani modbus registra", register, obj.indexInDeviceConfig, tbName, tbAttribute);
|
||||
|
||||
obj.error++;
|
||||
if(obj.error == obj.lengthOfActualDeviceStream)
|
||||
obj.errors++;
|
||||
if(obj.errors == obj.lengthOfActualDeviceStream)
|
||||
{
|
||||
instance.send(instanceSendTo.dido_controller, {status: "NOK-" + obj.device}); // NOK-em340, NOK-em111, NOK-twilight_sensor, NOK-thermometer
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ exports.install = function(instance) {
|
|||
numberOfNotResponding[obj.device] = 1;
|
||||
}
|
||||
|
||||
obj.error = 0;
|
||||
obj.errors = 0;
|
||||
numberOfNotResponding[obj.device] += 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue