diff --git a/Rotex-Daikin-CAN.yaml b/Rotex-Daikin-CAN.yaml new file mode 100644 index 0000000..9bcbf2c --- /dev/null +++ b/Rotex-Daikin-CAN.yaml @@ -0,0 +1,1363 @@ +########. Version 1.2 ######## + +esphome: + name: rotex + friendly_name: Rotex + +esp32: + board: esp32-s3-devkitc-1 + framework: + type: arduino + +# Enable logging +logger: + + +# Enable Home Assistant API +api: + encryption: + key: "heqmwzvu7TckUlOZjse5Y2dPSiNR8a5+LZDPmSC3URI=" + +ota: +web_server: + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Rotex Fallback Hotspot" + password: "H3jGqANSa7aL" + +captive_portal: + + + +text_sensor: + - platform: template + name: "Betriebsmodus" + id: text_status + lambda: |- + if(id(Betriebsmodus).state == 0){ + return {"Notbetrieb"}; + } else if (id(Betriebsmodus).state == 1){ + return {"Bereitschaft"}; + } else if (id(Betriebsmodus).state == 3){ + return {"Heizen"}; + } else if (id(Betriebsmodus).state == 4){ + return {"Absenken"}; + } else if (id(Betriebsmodus).state == 5){ + return {"Sommer"}; + } else if (id(Betriebsmodus).state == 11){ + return {"Automatik 1"}; + } else if (id(Betriebsmodus).state == 12){ + return {"Automatik 2"}; + } else if (id(Betriebsmodus).state == 17){ + return {"Kühlen"}; + } else { + return {"Unknown"}; + } + + - platform: template + name: "Betriebart" + id: text_status1 + lambda: |- + if(id(Betriebsart).state == 0){ + return {"Standby"}; + } else if (id(Betriebsart).state == 1){ + return {"Heizen"}; + } else if (id(Betriebsart).state == 2){ + return {"Kühlen"}; + } else if (id(Betriebsart).state == 3){ + return {"Abtauen"}; + } else if (id(Betriebsart).state == 4){ + return {"Warmwasserbereitung"}; + } else { + return {"Unknown"}; + } + + - platform: template + name: "Status Kompressor" + id: text_status2 + lambda: |- + if(id(status_kessel).state == 0){ + return {"Aus"}; + } else if (id(status_kessel).state == 1){ + return {"An"}; + } else { + return {"Unknown"}; + } + +button: + - platform: template + name: Warmwasser bereiten + id: ww_button + icon: "mdi:water-boiler" + on_press: + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0xBC, 0x00, 0x00 ] # 45 Grad Grundeinstellung + can_id: 0x680 + - delay: 10s + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xC2, 0x00, 0x00 ] # 70 Grad + can_id: 0x680 + - logger.log: CAN Nachricht wurde gesendet + + + + +sensor: + + + - platform: template + name: "Thermische Leistung" + device_class: "power" + unit_of_measurement: "kwh" + accuracy_decimals: 2 + update_interval: 10 s + lambda: |- + + return ((id(TVBH).state - id(ruecklauf).state)*(4.91 * id(durchfluss).state))/3600; + + + - platform: template + name: "Raumsoll 1" + id: raumsoll1 + unit_of_measurement: "°C" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 1 + internal: false # don't show on HA + + - platform: template + name: "Status Kessel" + id: status_kessel + unit_of_measurement: "" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 0 + internal: false # don't show on HA + + + - platform: template + name: "Wasserdruck" + id: Wasserdruck + unit_of_measurement: "Bar" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 2 + + - platform: template + name: "Erzeugte Energie Gesamt" + id: Erzeugte_Energie_Gesamt + unit_of_measurement: "kwh" + icon: "mdi:thermometer-lines" + device_class: "ENERGY_STORAGE" + state_class: "measurement" + accuracy_decimals: 0 + + - platform: template + name: "Umwaelzpumpe" + id: Umwaelzpumpe + unit_of_measurement: "%" + icon: "mdi:thermometer-lines" + device_class: "battery" + state_class: "measurement" + accuracy_decimals: 0 + + - platform: template + name: "Betriebsmodus" + id: Betriebsmodus + unit_of_measurement: "" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 0 + + + - platform: template + name: "Betriebsart" + id: Betriebsart + unit_of_measurement: "" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 0 + + + - platform: template + name: "T-WW-Soll1" + id: t_ww_soll + unit_of_measurement: "°C" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 0 + + - platform: template + name: "Vorlauf Soll" + id: vl_soll + unit_of_measurement: "°C" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 1 + + + - platform: template + name: "Aussentemperatur" + id: temperature_outside + unit_of_measurement: "°C" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 1 + + + - platform: template + name: "Warmwassertemperatur" + id: temperature_water + unit_of_measurement: "°C" + icon: "mdi:thermometer-lines" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 1 + + - platform: template + name: "Vorlauftemperatur Heizung (TVBH)" + id: TVBH + unit_of_measurement: "°C" + icon: "mdi:waves-arrow-right" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 1 + + - platform: template + name: "Heizkreis Vorlauf (TV)" + id: TV + unit_of_measurement: "°C" + icon: "mdi:waves-arrow-right" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 1 + + - platform: template + name: "Ruecklauftemperatur Heizung" + id: ruecklauf + unit_of_measurement: "°C" + icon: "mdi:waves-arrow-left" + device_class: "temperature" + state_class: "measurement" + accuracy_decimals: 1 + + - platform: template + name: "Durchfluss" + id: durchfluss + unit_of_measurement: "ltr/h" + icon: "mdi:waves-arrow-left" + device_class: "water" + state_class: "measurement" + accuracy_decimals: 0 + + - platform: template + name: "BPV" + id: BPV + unit_of_measurement: "%" + icon: "mdi:waves-arrow-left" + device_class: "battery" + state_class: "measurement" + accuracy_decimals: 0 + + + + + + + + + + + +select: + - platform: template + name: "Betriebsmodus setzen" + id: betrieb + optimistic: true + options: + - "Bereitschaft" + - "Heizen" + - "Absenken" + - "Sommer" + - "Kühlen" + initial_option: Heizen + set_action: + then: + - delay: 500ms + - if: + condition: + - lambda: |- + return (id(betrieb).state) == "Bereitschaft"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0xFA, 0x01, 0x12, 0x01, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(betrieb).state) == "Heizen"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0xFA, 0x01, 0x12, 0x03, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(betrieb).state) == "Sommer"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0xFA, 0x01, 0x12, 0x05, 0x00 ] + can_id: 0x680 + + + + + - platform: template + name: "Raumsoll 1 Einstellen" + id: r_soll + optimistic: true + options: + - "15 °C" + - "15,5 °C" + - "16 °C" + - "16,5 °C" + - "17 °C" + - "17,5 °C" + - "18 °C" + - "18,5 °C" + - "19 °C" + - "19,5 °C" + - "20 °C" + - "20,5 °C" + - "21 °C" + - "21,5 °C" + - "22 °C" + - "22,5 °C" + - "23 °C" + - "23,5 °C" + - "24 °C" + - "24,5 °C" + - "25 °C" + initial_option: 20 °C + set_action: + then: + - delay: 500ms + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "15 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0x96, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "15,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0x9B, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "16 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xA0, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "16,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xA5, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "17 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xAA, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "17,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xAF, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "18 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xB4, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "18,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xB9, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "19 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xBE, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "19,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xC3, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "20 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xC8, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "20,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xCD, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "21 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xD2, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "21,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xD7, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "22 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xDC, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "22,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xE1, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "23 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xE6, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "23,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xEB, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "24 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xF0, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "24,5 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xF5, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(r_soll).state) == "25 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x05, 0x00, 0xFA, 0x00, 0x00 ] + can_id: 0x680 + + + - platform: template + name: "Warmwasser Einstellen" + id: ww_soll + optimistic: true + options: + - "35 °C" + - "36 °C" + - "37 °C" + - "38 °C" + - "39 °C" + - "40 °C" + - "41 °C" + - "42 °C" + - "43 °C" + - "44 °C" + - "45 °C" + - "46 °C" + - "47 °C" + - "48 °C" + - "49 °C" + - "50 °C" + - "51 °C" + - "52 °C" + - "53 °C" + - "54 °C" + - "55 °C" + - "56 °C" + - "57 °C" + - "58 °C" + - "59 °C" + - "60 °C" + + initial_option: 45 °C + set_action: + then: + - delay: 500ms + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "35 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0x5E, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "36 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0x68, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "37 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0x72, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "38 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0x7C, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "39 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0x86, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "40 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0x90, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "41 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0x9A, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "42 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xA4, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "43 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xAE, 0x00, 0x00] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "44 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xB8, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "45 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xC2, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "46 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xCC, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "47 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xD6, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "48 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xE0, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "49 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xEA, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "50 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xF4, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "51 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x01, 0xFE, 0x00, 0x00 ] + can_id: 0x680 + + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "52 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x08, 0x00, 0x00 ] + can_id: 0x680 + + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "53 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x12, 0x00, 0x00 ] + can_id: 0x680 + + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "54 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x1C, 0x00, 0x00 ] + can_id: 0x680 + + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "55 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x26, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "56 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x30, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "57 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x3A, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "58 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x44, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "59 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x4E, 0x00, 0x00 ] + can_id: 0x680 + - if: + condition: + - lambda: |- + return (id(ww_soll).state) == "60 °C"; + then: + - canbus.send: + data: [ 0x30, 0x00, 0x13, 0x02, 0x58, 0x00, 0x00 ] + can_id: 0x680 + + +time: + - platform: homeassistant + id: homeassistant_time + on_time: + + - seconds: /10 + then: +#Raumsoll1 + - canbus.send: + data: [0x61, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00] + can_id: 0x680 + - delay: 500ms + +#Status Kessel + - canbus.send: + data: [0x31, 0x00, 0xFA, 0x0A, 0x8C, 0x00, 0x00] + can_id: 0x680 + - delay: 500ms + + +#Wasserdruck + - canbus.send: + data: [0x31, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00] + can_id: 0x680 + - delay: 500ms + + +#T-WW-Soll1 + - canbus.send: + data: [0x31, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Erzeugte Energie gesamt + - canbus.send: + data: [0x31, 0x00, 0xFA, 0x09, 0x30, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Umwälzpumpe + - canbus.send: + data: [0x31, 0x00, 0xFA, 0xC0, 0xF7, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Betriebsmodus + - canbus.send: + data: [0x31, 0x00, 0xFA, 0x01, 0x12, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Betriebsart + - canbus.send: + data: [0x31, 0x00, 0xFA, 0xC0, 0xF6, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#VL Soll et dec value - ok /10 + - canbus.send: + data: [0x31, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00] + can_id: 0x680 + - delay: 500ms + +#BPV et dec value - ok /10 + - canbus.send: + data: [0x31, 0x00, 0xFA, 0xC0, 0xFB, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Volumenstrom 1/10 °C et dec value - ok /10 + - canbus.send: + data: [ 0x31, 0x00, 0xFA, 0x01, 0xDA, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Außentemperatur 1/10 °C et dec value - ok /10 + - canbus.send: + data: [ 0x31, 0x00, 0xfa,0x00,0x0c,0x00,0x00 ] + can_id: 0x680 + - delay: 500ms + +#Warmwasser Temperatur °C et dec value - ok /10 + - canbus.send: + data: [ 0x31, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Vorlauftemperatur (TVBH) - ok 1/10 + - canbus.send: + data: [ 0x31, 0x00, 0xFA, 0xC1, 0x02, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms +#Vorlauftemperatur Hzg (TV) - ok 1/10 + - canbus.send: + data: [ 0x31, 0x00, 0xFA, 0xC0, 0xFC, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#Rücklauftemperatur Hzg - ok 1/10 + - canbus.send: + data: [ 0x31, 0x00, 0xFA, 0xC1, 0x00, 0x00, 0x00 ] + can_id: 0x680 + - delay: 500ms + +#WW Temperatur - ok + offset + - canbus.send: + data: [ 0x31, 0x00, 0xfa,0x00,0x0e,0x00,0x00 ] + can_id: 0x680 + - delay: 500ms + + + + + +canbus: + - platform: esp32_can + tx_pin: GPIO47 + rx_pin: GPIO48 + can_id: 0x680 + bit_rate: 20kbps + id: can_bus + on_frame: + +#Raumsoll1 + - can_id: 0x301 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0x05) { + float temperature =float((float((int((x[4])+( (x[3])<<8))))/10)); + id(raumsoll1).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#Status Kessel + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0x0A and x[4] ==0x8C) { + float temperature =float((float((int((x[6])+( (x[5])<<8)))))); + id(status_kessel).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#Wasserdruck + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0x1C) { + float temperature =float((float((int((x[4])+( (x[3])<<8))))/1000)); + id(Wasserdruck).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + + + +#Erzeugte Energie gesamt + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0x09 and x[4] ==0x30) { + float temperature =float((float((int((x[6])+( (x[5])<<8)))))); + id(Erzeugte_Energie_Gesamt).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + + +#Umwälzpumpe + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0xC0 and x[4] ==0xF7) { + float temperature =float((float((int((x[6])+( (x[5]))))))); + id(Umwaelzpumpe).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#Betriebsart + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0xC0 and x[4] == 0xF6) { + float temperature =float((float((int((x[6])+( (x[5]))))))); + id(Betriebsart).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + + +#Betriebsmodus + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0x01 and x[4] ==0x12) { + float temperature =float((float((int((x[6])+( (x[5]))))))); + id(Betriebsmodus).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + + + +#T-WW-Soll1 + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]== 0x13 ) { + float temperature =float((float((int((x[4])+( (x[3])<<8))))/10)); + id(t_ww_soll).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#VL Soll + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0x02) { + float temperature =float((float((int((x[4])+( (x[3])<<8))))/10)); + id(vl_soll).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#BPV + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0xC0 and x[4]==0xFB) { + float temperature =float((float((int((x[6])+( (x[5])<<8)))))); + id(BPV).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#Volumenstrom + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0x01 and x[4] ==0xDA) { + float temperature =float((float((int((x[6])+( (x[5])<<8)))))); + id(durchfluss).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#Warmwasser-Temperaturabfrage + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[1]==0x00 and x[3]==0x00 and x[4] == 0x0e) { + float temperature =float((float((int((x[6])+( (x[5])<<8))))/10)); + id(temperature_water).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#Vorlauftemperaturabfrage (TVBH) + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0xC1 and x[4] == 0x02) { + float temperature =float(float((int((x[6])+( (x[5])<<8))))/10); + id(TVBH).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + +#Vorlauftemperaturabfrage Heizkreis (TV) + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[2]==0xFA and x[3]==0xC0 and x[4] == 0xFC) { + float temperature =float(float((int((x[6])+( (x[5])<<8))))/10); + id(TV).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } +#Rücklauftemperaturabfrage + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[1]==0x00 and x[3]==0xC1 and x[4] == 0x00) { + float temperature =float(float((int((x[6])+( (x[5])<<8))))/10); + id(ruecklauf).publish_state(temperature); + ESP_LOGD("main", "Temperature received over can is %f", temperature); + } + + +#Außentemperaturabfrage + # - can_id: 0x180 + # then: + # - lambda: |- + # if(x[0]==0xd2 and x[1]==0x00 and x[3]==0x00 and x[4] == 0x0c) { + # float temperature =float(float((int((x[6])+( (x[5])<<8))))/10); + # id(temperature_outside).publish_state(temperature); + # ESP_LOGD("main", "Temperature received over can is %f", temperature); + # } + + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[1]==0x00 and x[3]==0x00 and x[4] == 0x0c) { + float temperature =float((int16_t((x[6])+( (x[5])<<8)))); + if (temperature > 65000){ + temperature=(temperature-65536); + } + temperature=temperature/10; + id(temperature_outside).publish_state(temperature); + ESP_LOGD("main", "Aussen-Temperature received over can is %f", temperature); + } +#Betriebsmodus (Automatik bei jeglicher Änderung)0x31, 0x00, 0xFA, 0x01, 0x12, 0x00, 0x00 + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[1]==0x00 and x[2]==0xfa and x[3]==0x01 and x[4]==0x12) { + if (x[5]==0x01){ + auto call = id(betrieb).make_call(); + call.set_option("Bereitschaft"); + call.perform();} + else if (x[5]==0x03){ + auto call = id(betrieb).make_call(); + call.set_option("Heizen"); + call.perform();} + else if (x[5]==0x04){ + auto call = id(betrieb).make_call(); + call.set_option("Absenken"); + call.perform();} + else if (x[5]==0x05){ + auto call = id(betrieb).make_call(); + call.set_option("Sommer"); + call.perform();} + else if (x[5]==0x17){ + auto call = id(betrieb).make_call(); + call.set_option("Kühlen"); + call.perform();} + else if (x[5]==0x11){ + auto call = id(betrieb).make_call(); + call.set_option("Automatik 1"); + call.perform();} + } + +#Raumsoll 0x30, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00 (Automatik bei jeglicher Änderung) + - can_id: 0x301 + then: + - lambda: |- + if(x[0]==0xd2 and x[1]==0x00 and x[2]==0x05 and x[3]==0x00 and x[5]==0x00) { + if (x[4]==0x96){ + auto call = id(r_soll).make_call(); + call.set_option("15 °C"); + call.perform();} + else if (x[4]==0x9B){ + auto call = id(r_soll).make_call(); + call.set_option("15,5 °C"); + call.perform();} + else if (x[4]==0xA0){ + auto call = id(r_soll).make_call(); + call.set_option("16 °C"); + call.perform();} + else if (x[4]==0xA5){ + auto call = id(r_soll).make_call(); + call.set_option("16,5 °C"); + call.perform();} + else if (x[4]==0xAA){ + auto call = id(r_soll).make_call(); + call.set_option("17 °C"); + call.perform();} + else if (x[4]==0xAF){ + auto call = id(r_soll).make_call(); + call.set_option("17,5 °C"); + call.perform();} + else if (x[4]==0xB4){ + auto call = id(r_soll).make_call(); + call.set_option("18 °C"); + call.perform();} + else if (x[4]==0xB9){ + auto call = id(r_soll).make_call(); + call.set_option("18,5 °C"); + call.perform();} + else if (x[4]==0xBE){ + auto call = id(r_soll).make_call(); + call.set_option("19 °C"); + call.perform();} + else if (x[4]==0xC3){ + auto call = id(r_soll).make_call(); + call.set_option("19,5 °C"); + call.perform();} + else if (x[4]==0xC8){ + auto call = id(r_soll).make_call(); + call.set_option("20 °C"); + call.perform();} + else if (x[4]==0xCD){ + auto call = id(r_soll).make_call(); + call.set_option("20,5 °C"); + call.perform();} + else if (x[4]==0xD2){ + auto call = id(r_soll).make_call(); + call.set_option("21 °C"); + call.perform();} + else if (x[4]==0xD7){ + auto call = id(r_soll).make_call(); + call.set_option("21,5 °C"); + call.perform();} + else if (x[4]==0xDC){ + auto call = id(r_soll).make_call(); + call.set_option("22 °C"); + call.perform();} + else if (x[4]==0xE1){ + auto call = id(r_soll).make_call(); + call.set_option("22,5 °C"); + call.perform();} + else if (x[4]==0xE6){ + auto call = id(r_soll).make_call(); + call.set_option("23 °C"); + call.perform();} + else if (x[4]==0xEB){ + auto call = id(r_soll).make_call(); + call.set_option("23,5 °C"); + call.perform();} + else if (x[4]==0xF0){ + auto call = id(r_soll).make_call(); + call.set_option("24 °C"); + call.perform();} + else if (x[4]==0xF5){ + auto call = id(r_soll).make_call(); + call.set_option("24,5 °C"); + call.perform();} + else if (x[4]==0xFA){ + auto call = id(r_soll).make_call(); + call.set_option("25 °C"); + call.perform();} + } + + +#WW Soll 1 0x31, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00 (Automatik bei jeglicher Änderung) + - can_id: 0x180 + then: + - lambda: |- + if(x[0]==0xd2 and x[1]==0x00 and x[2]==0x13 and x[3]==0x01 and x[5]==0x00) { + if (x[4]==0x5E){ + auto call = id(ww_soll).make_call(); + call.set_option("35 °C"); + call.perform();} + else if (x[4]==0x68){ + auto call = id(ww_soll).make_call(); + call.set_option("36 °C"); + call.perform();} + else if (x[4]==0x72){ + auto call = id(ww_soll).make_call(); + call.set_option("37 °C"); + call.perform();} + else if (x[4]==0x7C){ + auto call = id(ww_soll).make_call(); + call.set_option("38 °C"); + call.perform();} + else if (x[4]==0x86){ + auto call = id(ww_soll).make_call(); + call.set_option("39 °C"); + call.perform();} + else if (x[4]==0x90){ + auto call = id(ww_soll).make_call(); + call.set_option("40 °C"); + call.perform();} + else if (x[4]==0x9A){ + auto call = id(ww_soll).make_call(); + call.set_option("41 °C"); + call.perform();} + else if (x[4]==0xA4){ + auto call = id(ww_soll).make_call(); + call.set_option("42 °C"); + call.perform();} + else if (x[4]==0xAE){ + auto call = id(ww_soll).make_call(); + call.set_option("43 °C"); + call.perform();} + else if (x[4]==0xB8){ + auto call = id(ww_soll).make_call(); + call.set_option("44 °C"); + call.perform();} + else if (x[4]==0xC2){ + auto call = id(ww_soll).make_call(); + call.set_option("45 °C"); + call.perform();} + else if (x[4]==0xCC){ + auto call = id(ww_soll).make_call(); + call.set_option("46 °C"); + call.perform();} + else if (x[4]==0xD6){ + auto call = id(ww_soll).make_call(); + call.set_option("47 °C"); + call.perform();} + else if (x[4]==0xE0){ + auto call = id(ww_soll).make_call(); + call.set_option("48 °C"); + call.perform();} + else if (x[4]==0xEA){ + auto call = id(ww_soll).make_call(); + call.set_option("49 °C"); + call.perform();} + else if (x[4]==0xF4){ + auto call = id(ww_soll).make_call(); + call.set_option("50 °C"); + call.perform();} + else if (x[4]==0xFE){ + auto call = id(ww_soll).make_call(); + call.set_option("51 °C"); + call.perform();} + else if (x[4]==0x08){ + auto call = id(ww_soll).make_call(); + call.set_option("52 °C"); + call.perform();} + else if (x[4]==0x12){ + auto call = id(ww_soll).make_call(); + call.set_option("53 °C"); + call.perform();} + else if (x[4]==0x1C){ + auto call = id(ww_soll).make_call(); + call.set_option("54 °C"); + call.perform();} + else if (x[4]==0x26){ + auto call = id(ww_soll).make_call(); + call.set_option("55 °C"); + call.perform();} + else if (x[4]==0x30){ + auto call = id(ww_soll).make_call(); + call.set_option("56 °C"); + call.perform();} + else if (x[4]==0x3A){ + auto call = id(ww_soll).make_call(); + call.set_option("57 °C"); + call.perform();} + else if (x[4]==0x44){ + auto call = id(ww_soll).make_call(); + call.set_option("58 °C"); + call.perform();} + else if (x[4]==0x4E){ + auto call = id(ww_soll).make_call(); + call.set_option("59 °C"); + call.perform();} + else if (x[4]==0x58){ + auto call = id(ww_soll).make_call(); + call.set_option("60 °C"); + call.perform();} + } + +#Show data in raw form as hex-values + - can_id: 0x180 + then: + - lambda: |- + int wert0 = int(x[0]); + int wert1 =int(x[1]); + int wert2 =int(x[2]); + int wert3 =int(x[3]); + int wert4 =int(x[4]); + int wert5 =int(x[5]); + int wert6 =int(x[6]); + float wert7 = float(int((x[6])+( (x[5])<<8))); + ESP_LOGD("main", "Antwort von 180 Hex: %x %x %x %x %x %x %x", wert0, wert1, wert2, wert3, wert4, wert5, wert6); + ESP_LOGD("main", "Antwort von 180 Float: %f", wert7); + ESP_LOGI("main", "Antwort von 180 Dez.: %i %i", wert5, wert6); + + #Show data in raw form as hex-values + - can_id: 0x300 + then: + - lambda: |- + int wert0 = int(x[0]); + int wert1 =int(x[1]); + int wert2 =int(x[2]); + int wert3 =int(x[3]); + int wert4 =int(x[4]); + int wert5 =int(x[5]); + int wert6 =int(x[6]); + float wert7 = float(int((x[6])+( (x[5])<<8))); + ESP_LOGD("main", "Antwort von 180 Hex: %x %x %x %x %x %x %x", wert0, wert1, wert2, wert3, wert4, wert5, wert6); + ESP_LOGD("main", "Antwort von 180 Float: %f", wert7); + ESP_LOGI("main", "Antwort von 180 Dez.: %i %i", wert5, wert6); + +#Show data in raw form as hex-values + - can_id: 0x301 + then: + - lambda: |- + int wert0 = int(x[0]); + int wert1 =int(x[1]); + int wert2 =int(x[2]); + int wert3 =int(x[3]); + int wert4 =int(x[4]); + int wert5 =int(x[5]); + int wert6 =int(x[6]); + float wert7 = float(int((x[6])+( (x[5])<<8))); + ESP_LOGD("main", "Antwort von 180 Hex: %x %x %x %x %x %x %x", wert0, wert1, wert2, wert3, wert4, wert5, wert6); + ESP_LOGD("main", "Antwort von 180 Float: %f", wert7); + ESP_LOGI("main", "Antwort von 180 Dez.: %i %i", wert5, wert6); + + + \ No newline at end of file