Actual flowserver on Senica rvo

This commit is contained in:
rasta5man 2024-04-13 20:29:31 +02:00
parent 67c503d980
commit 86619fbcff
29 changed files with 5833 additions and 9853 deletions

View file

@ -22,16 +22,12 @@ exports.html = `<div class="padding">
exports.readme = `# send all data to projects.worksys.io, required to monitor status of controller(unipi)`;
const { promisifyBuilder, makeMapFromDbResult } = require('./helper/db_helper.js');
const fs = require('fs');
var path = require('path');
exports.install = async function(instance) {
let id;
let allValues = {};
let dbSettings;
let sendAllValuesInterval;
let now = new Date();
@ -52,23 +48,11 @@ exports.install = async function(instance) {
}
}
try {
let p = path.join(__dirname + "/../databases/", 'settings.table');
if (fs.existsSync(p)) {
dbSettings = TABLE("settings");
let responseSettings = await promisifyBuilder(dbSettings.find());
id = responseSettings[0]["projects_id"];
//console.log(exports.title, responseSettings, id);
}
} catch(err) {
console.error(err);
}
function sendValues()
{
const id = FLOW.OMS_projects_id;
if(Object.keys(allValues).length > 0)
{
if(id !== undefined)