Testpanel with new thermometer komponent

This commit is contained in:
rasta5man 2024-12-02 18:35:11 +01:00
parent 31b5dbba5c
commit ba4a11a99a
39 changed files with 6415 additions and 2952 deletions

View file

@ -18,8 +18,8 @@ const SEND_TO = {
}
//read temperature - frequency
let timeoutMin = 5;//minutes
let NUMBER_OF_FAILURES_TO_SEND_ERROR = 13;
let timeoutMin = 1;//minutes
let NUMBER_OF_FAILURES_TO_SEND_ERROR = 3;
exports.install = function(instance) {
@ -45,7 +45,8 @@ exports.install = function(instance) {
if(temperatureAddress === "") throw "Thermometer: temperatureAddress is not defined";
exec(`owread -C ${temperatureAddress}/temperature`, (error, stdout, stderr) => {
debugger;
error = 1;
if(!error)
{
parseData(stdout)
@ -93,6 +94,6 @@ exports.install = function(instance) {
temperatureAddress = FLOW.GLOBALS.settings.temperature_address;
rvoTbName = FLOW.GLOBALS.settings.rvoTbName;
startRead = setInterval(main, timeoutMin * 1000 * 60);
setTimeout(main, 20000);
main();
})
};