Add language notifications; Add power door handel

This commit is contained in:
rasta5man 2025-05-31 22:03:23 +02:00
parent d97d90cf95
commit 0876e73c68
12 changed files with 445 additions and 581 deletions

View file

@ -4,8 +4,7 @@ exports.group = 'Worksys';
exports.color = '#888600';
exports.version = '1.0.2';
exports.icon = 'sign-out';
exports.input = 1;
exports.output = ["blue"];
exports.output = 2;
exports.html = `<div class="padding">
<div class="row">
@ -33,6 +32,12 @@ exports.readme = `
const { promisifyBuilder, makeMapFromDbResult } = require('./helper/db_helper.js');
const { initNotification } = require('./helper/notification_reporter');
const errorHandler = require('./helper/ErrorToServiceHandler');
const SEND_TO = {
db_init: 0,
infoSender: 1
};
exports.install = async function(instance) {
@ -94,15 +99,26 @@ exports.install = async function(instance) {
}
FLOW.dbLoaded = true;
errorHandler.setProjectId(dbs.settings.project_id);
initNotification();
//APP START - send to data services
const toService = {
id: dbs.settings.project_id,
name: dbs.settings.rvo_name,
fw_version: dbs.settings.edge_fw_version,
startdate: new Date().toISOString().slice(0, 19).replace('T', ' '),
js_error: "",
error_message: ""
};
instance.send(SEND_TO.infoSender, toService);
console.log("----------------> START - message send to service", toService);
setTimeout(() => {
console.log("DB_INIT - data loaded");
instance.send(0, "_")
instance.send(SEND_TO.db_init, "_")
}, 5000)
};