Open gabrielbalincaaeg opened 2 weeks ago
FIX :
server/runtime/devices/s7/index.js
this.polling = async function () // Line 99
and
// Line 110
try {
const result = await Promise.all(readVarsfnc);
_checkWorking(false);
if (result.length) {
let varsValueChanged = await _updateVarsValue(result);
lastTimestampValue = new Date().getTime();
_emitValues(varsValue);
if (this.addDaq && !utils.isEmptyObject(varsValueChanged)) {
this.addDaq(varsValueChanged, data.name, data.id);
}
} else {
// console.error('not');
}
if (lastStatus !== 'connect-ok') {
_emitStatus('connect-ok');
}
}catch (reson) {
if (reason && reason.stack) {
logger.error(`'${data.name}' _readVars error! ${reason.stack}`);
} else {
logger.error(`'${data.name}' _readVars error! ${reason}`);
}
_checkWorking(false);
};
@gabrielbalincaaeg create a PR for the Fix and @unocelli can review it
Hi,
I'm experiencing the same issue the S7 driver is functioning and values are refreshing, but they are not being stored in the SQLite database, which means historical values can't be displayed in charts.
Hi, @gabrielbalincaaeg Thanks a lot for the report and the fix. I just commit in master branch
Describe the bug Archiving Siemens S7 Tag's values in SQLite DB doesn't work and no the values aren't there, I used SQLite Studio to check if they are there. I installed FUXA 1.2.0-1832 on fresh windows 10 virtual machine and tested with Siemens S7 1500 PLC and Modbus Simulator (ModRSsim2) and KEPServerEX 6 (OPC UA driver). Values are refreshing (so I guess the driver works ) but I can't see them in the database. With Modbus simulator and KEPServerEX 6 everything works fine.
To Reproduce Steps to reproduce the behavior: Just add an Siemens S7 connection and activate the registration.
Expected behavior See the history values of Siemens S7 Tags in charts.
Environment