Wenn ich das so ändere, dann geht die Pumpe nicht aus
//createState('javascript.0.Heizen Wintergarten.Sommerbutton', false); const idSommer = 'javascript.0.Heizen Wintergarten.Sommerbutton'; // ID eintragen const idPumpe = 'hm-rpc.0.xxxx.1.STATE'; const idsAuto = $('*.AUTO_MODE'); const idsManu = $('*.MANU_MODE'); const idsManuIP = $('hm-rpc.2*.CONTROL_MODE'); const idsAutoIP = $('hm-rpc.2*.CONTROL_MODE'); var sommer = getState(idSommer).val; function setManu() { idsManu.each(function(id, i) { setState(id, 15); // 15 °C }); } function setManuIP() { idsManuIP.each(function(id, i) { setState(id, 1); // Control_Mode auf 1 }); } function setAuto() { idsAuto.each(function(id,i) { setState(id, true); // Auto }); } function setAutoIP() { idsManuIP.each(function(id, i) { setState(id, 0); // Control_Mode auf 0 }); } on(idSommer, function(dp) { sommer = dp.state.val; if(sommer){ setManu(); setManuIP(); } else { setAuto(); setAutoIP(); } }); schedule('0 8 * * *', function() { // täglich 8:00 Uhr if(sommer) { setState(idPumpe, true); setState(idPumpe, false, 600000); // 10 Minuten } }); // 2-Punkt-Regler Raumheizung // halbe Hysterese in K var hh = 0.1; var xid = ("hm-rpc.0.xxxx.2.ACTUAL_TEMPERATURE"); var wid = ("hm-rpc.0.xxxx.2.SET_TEMPERATURE"); var yid = ("hm-rpc.0.xxxx.1.STATE"); var x = getState(xid).val; // Istwert in °C var w = getState(wid).val; // Sollwert in °C SET_POINT /*function hys() { if (x <= w - hh) setState(yid, true); else if (x >= w + hh) setState(yid, false); } if(sommer) // ; else{ hys(); // Script start on(xid, function(dp) { x = dp.state.val; hys(); }); on(wid, function(dp) { w = dp.state.val; hys(); }); }*/ var ventil = getState(yid).val; function hys() { if(sommer) { if(ventil) setState(yid, false); } else { if (x <= w - hh && !ventil) setState(yid, true); else if (x >= w + hh && ventil) setState(yid, false); } } on(yid, function(dp) { ventil = dp.state.val; });NEWS
Syntax Check im Editor markiert korrekte Syntax
-
Hallo,
Ich bekomme bei einer beiden ioBroker Installationen alle "require", "setTimeout" und "clearTimeout" Aufrufe als Fehler angezeigt.Die Scripte sind voll ablauffähig und die Syntax ist auch korrekt.
Außerdem werden Module, die ich korrekt über ioBroker eingebunden habe, als nicht gefunden markiert. Die Module werde auch korrekt ausgeführt.
Ich habe die ScriptEngine 4.1.12, Admin 3.6.7 und js-controller 1.5.14 installiert.
Hat einer eine Idee?