Sterowanie rekuperacją

Witajcie chciałem zautomatyzować moją rekuperacje, dopiero poznaje nodred i nie bardzo wiem jak połączyć czujnik wilgotności, co2, okapu i tajmera tak żeby po osiągnięciu zadanej wartości przez wszystkie rekuperator się wyłączył

Sposób zależy od Twoich umiejętności - domyślam się, że chciałbyś to wszystko “wyklikać”?

Najprościej to zapamiętywać ostatnią zmianę parametru w zmiennej.
Następnie cyklicznie wywoływać ich sprawdzanie, przez odpowiednią konstrukcje logiki za pomocą noda Switch.
Załączam szablon jakby to miało mniej więcej wyglądać. Ze względów estetycznych osobiście zrobiłbym to trochę inaczej :slight_smile:

flows (1).json (10,0 KB)

nie bardzo wiem co i jak uzupełnić, mój poziom jest bardzo początkowy, dopiero poznaje wszystko i przeglądam filmy, wilgotność w każdym z pokoi jest inna, co2 ma dwa poziomy które też sterują rekuperacją on/off, bardzo wysoki poziom co2 i okap jest niezależny i załącza wyjścia max

Dodaj wszystkie Swoje czujniki i elementy wykowawcze. Zrób coś na ile potrafisz.
Następnie eksportuj proces i umieść json na forum.
Na koniec opisz w miarę dokładnie algorytm działania procesu, czyli co chcesz uzyskać.
Coś się wymyśli.

czujnik wilgotności i co2 mają stany przy jakich mają uruchomić rekuperator, okap i bardzo wysoki stan co2 włączaj max moc rekuperatora, przydał bysie wyłącznik ogólny i starowanie według harmonogramu dodatkowo

flows (2).json (11,7 KB)

Czy to co przesłałeś działa?
Czego oczekiwałbyś, żeby w nim zmienić lub co nie działa?
edit… Chyba się domyślam - jeden spełniony warunek włącza a inny wyłącza, choć powinien pozostać włączonym?

Na początek przetestuj to:

[{"id":"6c038c37eaa9ec95","type":"api-call-service","z":"76d1a1768a032715","name":"Rekuperacja On","server":"34e94c8b.f59694","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.rekuperacja_on_off","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":400,"wires":[[]]},{"id":"8cd62dde439dd946","type":"switch","z":"76d1a1768a032715","name":"?hum_s","property":"hum_s","propertyType":"flow","rules":[{"t":"gt","v":"60","vt":"str"},{"t":"lt","v":"56","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":320,"y":420,"wires":[["6c038c37eaa9ec95"],["376ded34de6f36cc"]]},{"id":"c5e261cbfcbe36c5","type":"api-call-service","z":"76d1a1768a032715","name":"Rekuperacja off","server":"34e94c8b.f59694","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.rekuperacja_on_off","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1120,"y":600,"wires":[[]]},{"id":"0ab4cb11fd22acbb","type":"server-state-changed","z":"76d1a1768a032715","name":"Wilgotność sypialnia","server":"34e94c8b.f59694","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.sypialnia_humidity","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":100,"wires":[["575d4036591c1887"]]},{"id":"0b7fb6f4e8bcd1c5","type":"server-state-changed","z":"76d1a1768a032715","name":"Wilgotność tv","server":"34e94c8b.f59694","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.tv_humidity","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":280,"wires":[["6ed5ad150f047253"]]},{"id":"dc0aab2e05e7f1ca","type":"server-state-changed","z":"76d1a1768a032715","name":"Wilgotność łazienka","server":"34e94c8b.f59694","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.lazienka_humidity","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":160,"wires":[["bdd673b4427e94ce"]]},{"id":"c521371b450570bb","type":"server-state-changed","z":"76d1a1768a032715","name":"Wilgotność mały","server":"34e94c8b.f59694","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.maly_humidity","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":220,"wires":[["143a5c65d77298be"]]},{"id":"376ded34de6f36cc","type":"switch","z":"76d1a1768a032715","name":"?hum_l","property":"hum_l","propertyType":"flow","rules":[{"t":"gt","v":"59","vt":"str"},{"t":"lt","v":"55","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":460,"y":460,"wires":[["6c038c37eaa9ec95"],["397b8e40d68003a7"]]},{"id":"397b8e40d68003a7","type":"switch","z":"76d1a1768a032715","name":"?hum_m","property":"hum_m","propertyType":"flow","rules":[{"t":"gt","v":"55","vt":"str"},{"t":"lt","v":"50","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":620,"y":500,"wires":[["6c038c37eaa9ec95"],["bbf66c59b671bd89"]]},{"id":"bdbec19d05ab0da5","type":"server-state-changed","z":"76d1a1768a032715","name":"Wilgotność kuchnia","server":"34e94c8b.f59694","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"jsonata","halt_if_compare":"jsonata","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":340,"wires":[["6065c3d25e6e87a1"]]},{"id":"575d4036591c1887","type":"change","z":"76d1a1768a032715","name":"hum_s","rules":[{"t":"set","p":"hum_s","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":100,"wires":[[]]},{"id":"bdd673b4427e94ce","type":"change","z":"76d1a1768a032715","name":"hum_l","rules":[{"t":"set","p":"hum_s","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":160,"wires":[[]]},{"id":"143a5c65d77298be","type":"change","z":"76d1a1768a032715","name":"hum_m","rules":[{"t":"set","p":"hum_m","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":220,"wires":[[]]},{"id":"6ed5ad150f047253","type":"change","z":"76d1a1768a032715","name":"hum_t","rules":[{"t":"set","p":"hum_t","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":280,"wires":[[]]},{"id":"6065c3d25e6e87a1","type":"change","z":"76d1a1768a032715","name":"hum_k","rules":[{"t":"set","p":"hum_k","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":340,"wires":[[]]},{"id":"bbf66c59b671bd89","type":"switch","z":"76d1a1768a032715","name":"?hum_k","property":"hum_k","propertyType":"flow","rules":[{"t":"gt","v":"55","vt":"str"},{"t":"lt","v":"50","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":540,"wires":[["6c038c37eaa9ec95"],["b9022b6f6d7b1c9d"]]},{"id":"1055e3be3f2e2f7b","type":"inject","z":"76d1a1768a032715","name":"every 5sek","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":140,"y":420,"wires":[["8cd62dde439dd946"]]},{"id":"b9022b6f6d7b1c9d","type":"switch","z":"76d1a1768a032715","name":"?hum_t","property":"hum_t","propertyType":"flow","rules":[{"t":"gt","v":"55","vt":"str"},{"t":"lt","v":"50","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":920,"y":580,"wires":[["6c038c37eaa9ec95"],["c5e261cbfcbe36c5"]]},{"id":"3f9faafda15a3645","type":"inject","z":"76d1a1768a032715","name":"Set variable start value","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"-1","payloadType":"str","x":170,"y":40,"wires":[["575d4036591c1887","bdd673b4427e94ce","143a5c65d77298be","6ed5ad150f047253","6065c3d25e6e87a1"]]},{"id":"34e94c8b.f59694","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Jak zaskoczysz to sam dokończysz :slight_smile:

EDIT… Ponieważ wcześniej przeoczyłem fakt, że jest histereza na parametrach - to co jest wyżej nie będzie dobrze działać.
Wprowadziłem pewne zmiany:
Proces ma się uruchamiać tylko po zmianie parametru (nie jak wcześniej - cyklicznie).
Nie wiem tylko jaki jest priorytet “Rekuperacja max on/off” i “Rekuperacja on/off” w samej klimie i co dalej za tymi encjami się chowa.
To ewentualnie wymagać będzie dostosowania.
Miałem “wyklikać”, więc jest w tej formie.
Proces NIE BYŁ testowany.


rekup.json (41,4 KB)

wygląda ok, rekuperator się załączy ale nie wyłączy pomimo spełnionych wszystkich warunków, okap i sterownie zrobiłem na przełączniku dotykowym do testów,

flows (3).json (23,5 KB)

Widzę, że dołożyłeś debug.
Czy msg dolatuje do “Rekuperacja OFF”?
We wszystkich switchach "?co2"jest błąd - nie powinno być msg.payload, a flow.co2.
…coż, kopiowanie :slight_smile:

Musisz jeszcze sprawdzić jak “ścieżka” na wyłączenie zachowa się gdy przestanie działać jeden z czujników. Trzeba wymyśleć jakieś zabepieczenie.