NEWS
Variable Startzeiten mit CronPlus Node
-
Hallo zusammen,
ich möchte meine Heizungssteuerung so erweitern, dass ich z.B. die Startzeit und die Temperatur der Nachtabsenkung einstellen kann. Dazu habe ich die Startzeit als veränderbaren String im Flow zur Verfügung. Ich habe nun einen Node gesucht, der täglich zu dieser Zeit den Flow startet der die Soll-Temperatur am Thermostat ändert. CronPlus soll das können, allerdings komm ich mit den Beispielen und der Hilfe nicht ganz klar. Wie würde das aussehen? Hat jemand CronPlus im Einsatz? Schon mal Danke und beste Grüße!
SuperElmi
-
@superelmi Ich habe den Light Scheduler im Einsatz
-
@mickym Danke für den Hinweis.
Ich habe jetzt auf den ersten Blick allerdings nicht erkannt, wie ich die Startzeit per externen Input ändern kann.
Ich hab in meiner VIS einen Schalter, mit dem ich die Startzeit wählen kann, das landet als String in NodeRed und zu dieser Startzeit soll ab dann zukünftig jeden Tag die Nachtabsenkung starten. Kann ich das mit dem Light Scheduler machen?Gruß
-
@superelmi Nein das geht nicht
-
@superelmi Ich denke ich habe eine Node gefunden, die das kann. Zumindest schaut das bei mir ganz gut aus. Nach dem kurzen Test.
Werde ich mir auch installieren.
Probier die mal: https://flows.nodered.org/node/node-red-contrib-eztimer
Unter Programmatic Control siehst wie man dann mit einem Input den Zeitplan erstellen kann. Zusätzlich kann man ihn natürlich auch noch über das Interface konfigurieren, aber das ist ja nichts besonderes.
Hier mal eine Inject-Node um zu sehen, wie man das programmatisch macht:
und hier siehst dass das ganze gut funktioniert hat:
und ich finde es gar nicht mal so komplziert.
-
@superelmi Die Eingabe des Zeitplans als JSON- String geht auch:
{"ontime":"23:00:00","offtime":"05:00:00","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true}
Aus einem Datenpunkt ausgelesen bekommst Du den String, den Du halt mit einer JSON Node noch umwandeln musst.
Jetzt liegts eigentlich nur noch an VIS - Dir so einen String entweder zu erzeugen und Du machst das in einem eigenen Flow.
-
@mickym Wow!
Danke dir vielmals fürs Raussuchen!
Wenn mir der Nachwuchs eine ruhige Minute gönnt, schau ich mir das sehr genau an. Kann sich nur noch um Stunden handeln 🤪 -
@superelmi said in Variable Startzeiten mit CronPlus Node:
@mickym Wow!
Danke dir vielmals fürs Raussuchen!
Wenn mir der Nachwuchs eine ruhige Minute gönnt, schau ich mir das sehr genau an. Kann sich nur noch um Stunden handeln 🤪So, jetzt bin ich dazu gekommen mir das anzusehen und hab auch gleich was halbwegs funktionierendes gebastelt:
[{"id":"c622b62a.06497","type":"tab","label":"Heizung Kind EZTimer","disabled":false,"info":""},{"id":"2c910296.b8bcce","type":"ioBroker in","z":"c622b62a.06497","name":"Nachtabsenkung","topic":"0_userdata.0.Nachtabsenkung_Kind","payloadType":"value","onlyack":false,"func":"all","gap":"","fireOnStart":"true","x":300,"y":140,"wires":[["4e95581b.86c9c"]]},{"id":"bde5639a.d238c8","type":"ioBroker in","z":"c622b62a.06497","name":"Anlauftemperatur","topic":"0_userdata.0.Anlauftemperatur_Kind","payloadType":"value","onlyack":false,"func":"all","gap":"","fireOnStart":"true","x":300,"y":200,"wires":[["3f0d920b.13d0e6"]]},{"id":"472e5af4.3b1bc4","type":"ioBroker in","z":"c622b62a.06497","name":"Tagestemperatur","topic":"0_userdata.0.Tagestemperatur_Kind","payloadType":"value","onlyack":false,"func":"all","gap":"","fireOnStart":"true","x":300,"y":260,"wires":[["4db9eac2.864584"]]},{"id":"9d2e1c6e.66494","type":"ioBroker in","z":"c622b62a.06497","name":"Start Nachtabsenkung","topic":"0_userdata.0.Start_Nacht_Kind","payloadType":"value","onlyack":false,"func":"all","gap":"","fireOnStart":"true","x":320,"y":420,"wires":[["8f3fdcd0.867da8","27982b57.9baf2c","f1826bfc.4d65c"]]},{"id":"cd715aaa.3a3ea8","type":"ioBroker in","z":"c622b62a.06497","name":"Start Anlauf","topic":"0_userdata.0.Start_Anlauf_Kind","payloadType":"value","onlyack":false,"func":"all","gap":"","fireOnStart":"true","x":290,"y":480,"wires":[["27982b57.9baf2c","b1c7ad0a.6a2ae8","c9e38c3.516b4f"]]},{"id":"69153b84.876374","type":"ioBroker in","z":"c622b62a.06497","name":"Start Tag","topic":"0_userdata.0.Start_Tag_Kind","payloadType":"value","onlyack":false,"func":"all","gap":"","fireOnStart":"true","x":280,"y":540,"wires":[["9b15a777.9149","27982b57.9baf2c","51eb0966.32e9a"]]},{"id":"8f3fdcd0.867da8","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.offtime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":580,"wires":[["5fcd3989.c127f8"]]},{"id":"9b15a777.9149","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.ontime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":540,"wires":[["5fcd3989.c127f8"]]},{"id":"5fcd3989.c127f8","type":"eztimer","z":"c622b62a.06497","name":"","debug":true,"autoname":" - ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"zone.home","lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"2","ontimesun":"dawn","ontimetod":"","onpropertytype":"msg","onproperty":"payload","onvaluetype":"json","onvalue":"","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":1370,"y":540,"wires":[["2bc930d.a0eb4d"]]},{"id":"2bc930d.a0eb4d","type":"ioBroker out","z":"c622b62a.06497","name":"902010/32 Occupied Target Temperature","topic":"zigbee.0.000d6f000c2b99c6.heating_setpnt_occupied","ack":"false","autoCreate":"false","stateName":"","role":"","payloadType":"","readonly":"","stateUnit":"","stateMin":"","stateMax":"","x":1760,"y":440,"wires":[]},{"id":"51eb0966.32e9a","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.offtime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":500,"wires":[["4c0030e2.13e5d"]]},{"id":"b1c7ad0a.6a2ae8","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.ontime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":460,"wires":[["4c0030e2.13e5d"]]},{"id":"c9e38c3.516b4f","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.offtime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":420,"wires":[["5924326e.f7d8fc"]]},{"id":"f1826bfc.4d65c","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.ontime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":380,"wires":[["5924326e.f7d8fc"]]},{"id":"4c0030e2.13e5d","type":"eztimer","z":"c622b62a.06497","name":"","debug":false,"autoname":" - ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"zone.home","lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"2","ontimesun":"dawn","ontimetod":"","onpropertytype":"msg","onproperty":"payload","onvaluetype":"json","onvalue":"","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":1370,"y":440,"wires":[["2bc930d.a0eb4d"]]},{"id":"5924326e.f7d8fc","type":"eztimer","z":"c622b62a.06497","name":"","debug":false,"autoname":" - ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"zone.home","lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"2","ontimesun":"dawn","ontimetod":"","onpropertytype":"msg","onproperty":"payload","onvaluetype":"json","onvalue":"","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":1370,"y":360,"wires":[["2bc930d.a0eb4d"]]},{"id":"27982b57.9baf2c","type":"change","z":"c622b62a.06497","name":"Wochentage","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.mon","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.tue","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.wed","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.thu","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.fri","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.sat","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"payload.sun","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":320,"wires":[["5fcd3989.c127f8","5924326e.f7d8fc","4c0030e2.13e5d"]]},{"id":"4e95581b.86c9c","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.onvalue","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":140,"wires":[["5924326e.f7d8fc"]]},{"id":"3f0d920b.13d0e6","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.onvalue","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":200,"wires":[["4c0030e2.13e5d"]]},{"id":"4db9eac2.864584","type":"change","z":"c622b62a.06497","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.onvalue","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":260,"wires":[["5fcd3989.c127f8"]]}]
Ich hab allerdings das Problem, dass nach dem Deploy vom EZTimer der Wert 0 getriggert wird, ebenso wenn ich eine Zeit oder eine Temperatur im inaktiven Zeitfenster ändere. 0°C ist ein bisschen kalt im Kinderzimmer... Wo ist da der Hund begraben?
Gruß
SuperElmi -
@superelmi Du hast ja gar kein offvalue gesetzt. bzw. da steht ja 0 drin
Es gibt 2 Möglichkeiten - Du setzt on und off Werte - oder Du schaltest das Ganze auf Trigger um und es wird nur grundsätzlich der Triggerwert (triggervalue) gesetzt. Da musst Du nur aufpassen, dass Du in der Node auch den richtigen Typ drin stehen hast, sonst schmeißt es einen Fehler. (hab ich gestern noch rausgefunden)
-
@mickym Hab auf Trigger umgestellt, jetzt scheint es gut zu funktionieren. Ich muss aber noch ein paar Tage testen, ob die Temperaturen auch entsprechend getriggert werden.
Danke für deine Hilfe!