Procesy z życia wzięte - Ogrzewanie

Zdefiniowałeś tempON tempOFF - wielkość liter ma znaczenie.

Dziękuję! To faktycznie było to… Poprawiłem trochę i dorobiłem jeszcze kilka warunków i testuję tę automatyzację wzdłuż i wszerz zanim skopiuje ją jeszcze 9 razy na pozostałe strefy…
Działa jak powinna, ale za każdym razem przy zmianie temperatury wyzwala mi node call service. Przykładowo jeśli swich jest on, to i tak wysyła do home assistanta rządanie jego ponownego uruchomienia (w fazie testowej wyzwala to też zbędną notyfikację). Jak najprościej to ubić? Próbowałem “current state node” użyć, ale to mi psuje poprawne działanie…

W domoticzu było proste :upside_down_face: :

    -- switch the device on but only if the current state isn't already on:
    device.switchOn().checkFirst()
    -- this is a short for:
    if (device.state == 'Off') then
        devices.switchOn()

Kod tych wypocin:

[{"id":"7d7eedb88ba64fe3","type":"server-state-changed","z":"061055714bb08075","name":"Łazienka górna - zmiana temp","server":"3d4cd457.4ac1ac","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.sztuczna_temp","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","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":140,"y":1060,"wires":[["499049a3305a4a9d"]]},{"id":"e1d2469336291899","type":"server-state-changed","z":"061055714bb08075","name":"Łazienka górna - zmiana ust.","server":"3d4cd457.4ac1ac","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.lazienka_gorna","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","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":140,"y":1120,"wires":[["499049a3305a4a9d"]]},{"id":"499049a3305a4a9d","type":"api-current-state","z":"061055714bb08075","name":"Czy nie off?","server":"3d4cd457.4ac1ac","version":3,"outputs":2,"halt_if":"Off","halt_if_type":"str","halt_if_compare":"is_not","entity_id":"input_select.tryb_sterowania","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":370,"y":1100,"wires":[["b543ab9d236cabd3"],[]]},{"id":"b543ab9d236cabd3","type":"stoptimer","z":"061055714bb08075","duration":"1","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":540,"y":1080,"wires":[["9813cc1f9f7ccb2b"],[]]},{"id":"9813cc1f9f7ccb2b","type":"api-current-state","z":"061055714bb08075","name":"Zadana","server":"bf1cdba.1929828","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.lazienka_gorna","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"zadana","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":700,"y":1080,"wires":[["54ec9b9d937ee615"]]},{"id":"54ec9b9d937ee615","type":"api-current-state","z":"061055714bb08075","name":"Aktualna","server":"bf1cdba.1929828","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.sztuczna_temp","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"aktualna","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":860,"y":1080,"wires":[["ad8a44432a84681b"]]},{"id":"ad8a44432a84681b","type":"api-current-state","z":"061055714bb08075","name":"Wartość histerezy","server":"bf1cdba.1929828","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.histereza","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"hister","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":1070,"y":1080,"wires":[["9d39327bbf7eac98"]]},{"id":"9d39327bbf7eac98","type":"function","z":"061055714bb08075","name":"histereza","func":"// przykładowo zadaję temperaturę 22stopnie\n//ale pozwalam jej zejśc do zadana -0.3 = 21,7 = tempON\n//nie chcę natomiast przegrzewać, więc tempOFF=22+0,1=tempOFF\n\n\nvar tempON=msg.zadana + msg.hister //+ (- 0.3) //np. =21.7\nvar tempOFF=msg.zadana //+ 0.1 //np. =22.1\nvar aktualna=msg.aktualna\n\n/*\n//wariant 1 aktualna = 21.8\n//21.8>21.7 && 21.8<22.1 - nic nie rób\n\nif (aktualna>tempON && aktualna<tempOFF) {\n    msg.ustawstan={ payload:\"idle\" };\n    //return msg;\n}\n\n//wariant2 aktualna = 20\n//20<21.7 -zimno - włącz grzanie\nelse if (aktualna<=tempON){\n    msg.ustawstan={ payload:\"on\" };\n}\n\n//wariant3 aktualna=25\n//25>=22.1\nelse if (aktualna>=tempOFF){\n    msg.ustawstan={ payload:\"off\" };\n}\n\n*/\n\nif (aktualna>tempON && aktualna<tempOFF){  \n   msg.ustawstan={ payload:\"idle\" }  //nic nie robić\n}else if(aktualna<=tempON){  \n      msg.ustawstan={ payload:\"on\" }  //włączyć\n}  \nelse if(aktualna>=tempOFF){  \n      msg.ustawstan={ payload:\"off\" }  //wyłączyć\n}  \nelse{  \n      msg.ustawstan={ payload:\"error?\" } //trzymać czy usunąć?\n} \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1300,"y":1080,"wires":[["17bd85dd26fb657f"]]},{"id":"17bd85dd26fb657f","type":"switch","z":"061055714bb08075","name":"on / off / idle / error","property":"ustawstan.payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1510,"y":1080,"wires":[["c675017b607cea27","86833e16d1548da1"],["c675017b607cea27","5a88ac72b6f70be4"]]},{"id":"7c1231dde88cb885","type":"api-current-state","z":"061055714bb08075","name":"Działa teraz?","server":"3d4cd457.4ac1ac","version":3,"outputs":2,"halt_if":"On","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.lazienka_2","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1730,"y":1000,"wires":[[],[]]},{"id":"4759fb1bd4485dcb","type":"api-current-state","z":"061055714bb08075","name":"Działa teraz?","server":"3d4cd457.4ac1ac","version":3,"outputs":2,"halt_if":"On","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.lazienka_2","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1750,"y":1140,"wires":[[],[]]},{"id":"c675017b607cea27","type":"debug","z":"061055714bb08075","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1710,"y":1320,"wires":[]},{"id":"86833e16d1548da1","type":"api-call-service","z":"061055714bb08075","name":"ON","server":"bf1cdba.1929828","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.lazienka_2","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1890,"y":1020,"wires":[["c83cd9e7f5a8f0ca"]]},{"id":"5a88ac72b6f70be4","type":"api-call-service","z":"061055714bb08075","name":"OFF","server":"bf1cdba.1929828","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.lazienka_2","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1890,"y":1080,"wires":[["01d35d6388e9b405"]]},{"id":"c83cd9e7f5a8f0ca","type":"function","z":"061055714bb08075","name":"Właczenie ogrzewania","func":"msg.wiadomosc =\n{\n    \"temat\":\"Ogrzewanie\",\n    \"tresc\":\"Temperatura spadła poniżej \"+msg.zadana+\" stopni celcjusza. Włączam ogrzewanie\",\n    \"typ\":\"info\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2080,"y":1020,"wires":[["90e9c4e57f90d527"]]},{"id":"01d35d6388e9b405","type":"function","z":"061055714bb08075","name":"Wyłaczenie ogrzewania","func":"msg.wiadomosc =\n{\n    \"temat\":\"Ogrzewanie\",\n    \"tresc\":\"Temperatura zgodna z ustawioną. Wyłączam ogrzewanie.\",\n    \"typ\":\"info\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2090,"y":1080,"wires":[["90e9c4e57f90d527"]]},{"id":"90e9c4e57f90d527","type":"function","z":"061055714bb08075","name":"Wiadomość","func":"msg.payload =\n{\n    \"data\":\n    {\n        \"message\": msg.wiadomosc.tresc,\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2330,"y":1060,"wires":[["f48dfc46c5852ea5"]]},{"id":"f48dfc46c5852ea5","type":"api-call-service","z":"061055714bb08075","name":"Na telefon","server":"bf1cdba.1929828","version":3,"debugenabled":false,"service_domain":"notify","service":"mobile_app_redmi_note_8_pro","entityId":"","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2510,"y":1040,"wires":[[]]},{"id":"3d4cd457.4ac1ac","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"bf1cdba.1929828","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

Artur u siebie miał przyciski + - do zmiany temperatury. Zrobiłem tak u siebie i to działało. Teraz przechodzę z całym wyglądem na custom:button-card (bo ładniej) i po dodaniu takiego kodu:

type: custom:button-card
tap_action:
  action: call-service
  service: input_number.increment
  service_data: {}
  target:
    entity_id: input_number.temperatura_duzy
icon: mdi:thermometer-plus
aspect_ratio: 1/1
styles:
  card:
    - border-radius: 10%

mam błąd: “Nie udało się wywołać usługi input_number/increment. must contain at least one of entity_id, device_id, area_id.”. Gdzie robię błąd?

Dodm, że wyklinkany i działajacy przycisk wygląda tak:

type: button
tap_action:
  action: call-service
  service: input_number.increment
  service_data: {}
  target:
    entity_id: input_number.temperatura_duzy
entity: input_number.temperatura_duzy
icon: mdi:thermometer-plus
show_name: false

Jedyna różnica to “entity: input_number.temperatura_duzy” ale dodanie nic nie zmienia.

Zamień:

      service_data: {}
      target:
      entity_id: input_number .temperatura_duzy

na :

    service_data:
      entity_id: input_number.temperatura_duzy
1 Like

Panowie, nie umiem znaleźć rozwiązania. Posiadam ogrzewanie w domu od salusa na zigbee - system zamknięty. Wyciagnąłem Stany sensorów działania ze wszystkich 5 termostatów od ogrzewania ze wszystkich pomieszczeń. Dają one Stany heating oraz idle. Chciałem je dodać do licznika czasu pracy kotła jednakże nie umiem ich zgrupować tak jak w edytorze to robimy tak aby w przypadku gdy chociaż jeden regulator ma stan heating to nod dawał heating, a w przypadku wszystkich stanów idle nod wypluł idle. Dodam że zgrupowanie w editor wszystkich sensorów daje uniknown. W systemie salus niestety nie da się odczytać stanu stycznika załączającego kocioł. Macie może jakiś pomysł?
Z góry dziękuję za odpowiedź

Witam serdecznie,

Zaczynam przenosić sterowanie ogrzewaniem z domoticza-svt do home assistanta.
I tak przeglądam temat-swoją drogą dość ciekawy :slight_smile:
Chciałbym zapytać czy po wdrożeniu tej automatyzacji w ogrzewanie podłogowe piecem gazowym są jakieś propozycję do zmiany?
Osobiście brakuje mi takiej opcji jak wymuszenie włączenia ogrzewania, chyba że jest a nie doczytałem :slight_smile: Wracamy do domu z ferii, i aby wrócić do ciepłego domu to 3h wcześniej ręcznie uruchamiamy ogrzewanie.

Podpowie ktoś jak ma rozwiązane sterowanie strefami przy pomocy tej automatyzacji ?

gdzie to wpisać bo chyba coś robie nie tak

Poczytaj ostatnie wpisy z poniższego wątku:

(post usunięty przez autora)

dołożyłem sensor w template

template:
  sensors:
    czas_w_h:
      friendly_name: "Czas w godzinach"
      value_template: >-
        {% set list = states('sensor.ogrzewanie_dzisiaj').split('.') %}
        {{ list[0] }}h {{ (60 * ('0.'~list[1]) | float (0)) | round(0) }}m

i zmieniłem na:


  ### Ogrzewanie działało przez: {{ states('sensor.czas_w_h') }}

1

Posiada ktoś i podzieli się uproszczoną wersją ogrzewania Artura bez okien i lokatorów? (może być okrojony flow tylko na jedno pomieszczenie)