{"id":8260,"date":"2024-12-28T01:16:23","date_gmt":"2024-12-27T23:16:23","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=8260"},"modified":"2026-01-03T16:22:09","modified_gmt":"2026-01-03T14:22:09","slug":"je-domotiser-ma-consommation-deau","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau","title":{"rendered":"Ich domotisiere meinen Wasserverbrauch"},"content":{"rendered":"<p>Dieser Artikel kn\u00fcpft an den vorhergehenden Artikel an:<\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/de\/domotiser-sa-consommation-deau\/\" target=\"_blank\" rel=\"noopener\">Den Wasserverbrauch d\u00e4mpfen<\/a><\/li>\r\n<\/ul>\r\n<p><!--more--><\/p>\r\n<p>Ich wollte einen D1 Mini durch einen D1 Mini ersetzen.\u00a0<a href=\"https:\/\/www.sigalou-domotique.fr\/de\/produkt\/d1-mini-v4\/\" target=\"_blank\" rel=\"noopener\">D1 Mini V4<\/a> Neue Version.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8278\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20241221_140313.png\" alt=\"D1 Mini V4\" width=\"394\" height=\"268\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20241221_140313.png 1494w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20241221_140313-600x408.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20241221_140313-300x204.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20241221_140313-1024x696.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20241221_140313-768x522.png 768w\" sizes=\"auto, (max-width: 394px) 100vw, 394px\" \/><\/p>\r\n<p>Das vorherige war mit Esp Easy geflasht, das neue habe ich mit ESP Home geflasht.<\/p>\r\n<p>Hier die beiden Tutorials:<\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/de\/flasher-un-d1-mini\/\" target=\"_blank\" rel=\"noopener\">Blitzen Sie einen D1 Mini mit ESP Easy<\/a><\/li>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/de\/flasher-un-d1-mini-v4\/\" target=\"_blank\" rel=\"noopener\">Blitzen Sie einen D1 Mini V4 mit ESP Home<\/a><\/li>\r\n<\/ul>\r\n<p>Sobald der\u00a0<a href=\"https:\/\/www.sigalou-domotique.fr\/de\/produkt\/d1-mini-v4\/\" target=\"_blank\" rel=\"noopener\">D1 Mini V4<\/a> Wenn ich mit Esp Home blitze, fahre ich mit dem Setup fort.<\/p>\r\n<p>Ich nutze die \u00c4nderung von D1Mini, um den Widerstand der Teilerbr\u00fccke zwischen A0 und GND zu ersetzen, ich setze eine 51K. Der Wert dieses Widerstands richtet sich nach dem Wert des Widerstands bei 25 \u00b0C (manuell vor der Installation zu messen).<\/p>\r\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6ae892c17e486\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ae892c17e486\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Pour_memoire_voici_le_schema_de_cablage\" >Zur Erinnerung, hier ist das Verdrahtungsschema<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Je_realise_la_configuration_du_fichier_yaml_du_device_ESP_Home\" >Ich f\u00fchre die Konfiguration der Yaml-Datei des ESP Home-Ger\u00e4ts durch<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Je_selectionne_les_capteurs_que_je_garde\" >Ich w\u00e4hle die Sensoren aus, die ich behalte<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Jajoute_3_capteurs_doffset\" >Ich f\u00fcge 3 Offsetsensoren hinzu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Jajoute_3_automatisations_pour_gerer_le_Reset_du_compteur_du_D1_Mini\" >Ich f\u00fcge 3 Automatisierungen hinzu, um den Z\u00e4hler-Reset des D1 Mini zu verwalten<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Je_declare_les_capteurs_finaux_de_consommation\" >Ich deklariere die Endverbrauchssensoren<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Je_configure_recorder\" >Ich konfiguriere Recorder<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Je_teste_le_reset_du_D1_Mini_V4\" >Ich teste das Reset des D1 Mini V4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Resultat\" >Ergebnis<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.sigalou-domotique.fr\/de\/je-domotiser-ma-consommation-deau\/#Si_cetait_a_refaire_idees_ou_retour_dexperience\" >Sollte dies noch einmal geschehen (Ideen oder R\u00fcckmeldungen)<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Pour_memoire_voici_le_schema_de_cablage\"><\/span>Zur Erinnerung, hier ist das Verdrahtungsschema<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8358\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/D1MiniCapteurDebitEauChaude-1.png\" alt=\"\" width=\"1146\" height=\"729\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/D1MiniCapteurDebitEauChaude-1.png 1146w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/D1MiniCapteurDebitEauChaude-1-600x382.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/D1MiniCapteurDebitEauChaude-1-300x191.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/D1MiniCapteurDebitEauChaude-1-1024x651.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/D1MiniCapteurDebitEauChaude-1-768x489.png 768w\" sizes=\"auto, (max-width: 1146px) 100vw, 1146px\" \/><\/p>\r\n<p>Die Verkabelung des D1 Mini ist unver\u00e4ndert, daher reproduziere ich das Schema mit dem D1 Mini V4.<\/p>\r\n<p>Weitere Erl\u00e4uterungen finden Sie auf dieser Seite:<\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/de\/domotiser-sa-consommation-deau\/\" target=\"_blank\" rel=\"noopener\">Den Wasserverbrauch d\u00e4mpfen<\/a><\/li>\r\n<\/ul>\r\n<h2><span class=\"ez-toc-section\" id=\"Je_realise_la_configuration_du_fichier_yaml_du_device_ESP_Home\"><\/span>Ich f\u00fchre die Konfiguration der Yaml-Datei des ESP Home-Ger\u00e4ts durch<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Sobald der <a href=\"https:\/\/www.sigalou-domotique.fr\/de\/flasher-un-d1-mini-v4\/\" target=\"_blank\" rel=\"noopener\">D1 Mini-V4-Blitz<\/a>, gehe ich zu ESPHome Builder und finde meine Ausr\u00fcstung:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8267\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome111.png\" alt=\"ESPHome Builder\" width=\"1060\" height=\"382\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome111.png 1060w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome111-600x216.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome111-300x108.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome111-1024x369.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome111-768x277.png 768w\" sizes=\"auto, (max-width: 1060px) 100vw, 1060px\" \/><\/p>\r\n<p>Ich klicke auf EDIT und bearbeite die yaml-Datei, hier ist die Konfiguration:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">Substitutionen: name: esphome-web-e586c5 friendly_name: ESPHome Hei\u00dfes Wasser esphome: name: ${name} friendly_name: ${friendly_name} min_version: 2024.6.0 name_add_mac_suffix: false project: name: esphome.web version: dev esp8266: Board: esp01_1m # Logger-Protokollierung aktivieren: # Aktivieren Sie die API Home Assistant api: # Over-The-Air-Ota-Updates zulassen: - platform: Esphome # Wi-Fi-Konfiguration \u00fcber den seriellen Port improv_serial zulassen: WiFi: # Einrichten eines Wi-Fi-AP-Hotspots: {} # In Kombination mit der Option \u00bfap\u00bf erm\u00f6glicht dies dem Benutzer # Wi-Fi-Anmeldeinformationen \u00fcber die Wi-Fi-AP konfigurieren. captive_portal: dashboard_import: _import_url-Paket: github:\/\/esphome\/example-configs\/esphome-web\/esp8266.yaml@main import_full_config: true # Um eine \"n\u00e4chste URL\" f\u00fcr improv_serial web_server zu erhalten: sensor: - platform: ntc sensor: temp_resistance name: \"Temperatur\" unit_of_measurement: \"\u00b0C\" accuracy_decimals: 2 Kalibrierung: b_constant: 3950 reference_temperature: 25\u00b0C reference_resistance: 50kOhm - platform: resistance id: temp_resistance sensor: temp_voltage Konfiguration: DOWNSTREAM resistor: 50kOhm reference_voltage: 3.3V - Plattform: adc pin: A0 id: temp_voltage # Turbinensensor f\u00fcr kaltes Wasser - platform: pulse_meter pin: Nummer: GPIO13 Modus: Input: True Pullup: true name: 'Trinkwasserdurchsatz' unit_of_measurement: 'L\/min' accuracy_decimals: 0 internal_filter: 100ms timeout: 5s filters: - multiply: 0.013 insgesamt: name: 'Total Trinkwasser' unit_of_measurement: 'Die ID: total_eau_potable accuracy_decimals: 2 filters: - multiply: 0.013 # Turbinensensor f\u00fcr Warmwasser - platform: pulse_meter pin: Nummer: GPIO14 Modus: Input: True Pullup: true name: 'Warmwasserdurchfluss' unit_of_measurement: 'L\/min' accuracy_decimals: 0 internal_filter: 100ms timeout: 5s filters: - multiply: 0.013 # 1\/77 insgesamt: name: 'Total Conso Warmwasser' unit_of_measurement: 'Die ID: total_eau_chaude accuracy_decimals: 2 filters: - multiply: 0.013 # 1\/77 # Calculated sensor for net cold water consumption - Plattform: template name: \"Total Conso Kaltwasser\" unit_of_measurement: \"L\" accuracy_decimals: 2 Lambda: |- return id(total_eau_potable).state - id(total_eau_chaude).state;\r\n<\/pre>\r\n<p>&nbsp;<\/p>\r\n<p>In wenigen Zeilen wird dies erl\u00e4utert:<\/p>\r\n<p>Temperatursensor (NTC):<\/p>\r\n<ul>\r\n<li>Verwendet einen NTC-Thermistor<\/li>\r\n<li>Messung in \u00b0C mit 2 Dezimalstellen<\/li>\r\n<li>Kaskadenkonfiguration: ADC (A0) \u2192 Widerstand \u2192 ntc<\/li>\r\n<li>Kalibriert mit einer B-Konstante von 3950 und einem Bezug auf 25\u00b0C\/50k\u03a9<\/li>\r\n<\/ul>\r\n<p>Zwei Wasserdurchflusssensoren (pulse_meter):<\/p>\r\n<ul>\r\n<li>Trinkwasser auf GPIO13, Warmwasser auf GPIO14<\/li>\r\n<li>Konfiguration im Input-Modus mit aktiviertem Pullup<\/li>\r\n<li>Umrechnung: multipliziert mit 0,013 (kalibriert auf 77 Impulse\/L)<\/li>\r\n<li>5s-Timeout (R\u00fcckgang auf 0, wenn keine Impulse vorhanden sind)<\/li>\r\n<li>100ms interner Filter zur Stabilisierung der Wiedergabe<\/li>\r\n<li>Jeder hat einen Gesamtz\u00e4hler in Litern<\/li>\r\n<li>Pr\u00e4zisierung: 0 Dezimalstellen f\u00fcr den Durchsatz, 2 Dezimalstellen f\u00fcr den Gesamtdurchsatz<\/li>\r\n<\/ul>\r\n<p>Ein berechneter Sensor:<\/p>\r\n<ul>\r\n<li>Berechnet den Kaltwasserverbrauch<\/li>\r\n<li>Formel: Trinkwasser insgesamt \u2013 Warmwasser insgesamt<\/li>\r\n<li>Pr\u00e4zisierung: 2 Dezimalstellen<\/li>\r\n<\/ul>\r\n<h2><span class=\"ez-toc-section\" id=\"Je_selectionne_les_capteurs_que_je_garde\"><\/span>Ich w\u00e4hle die Sensoren aus, die ich behalte<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8242\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome105.png\" alt=\"Auswahl der Sensoren\" width=\"1198\" height=\"437\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome105.png 1198w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome105-600x219.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome105-300x109.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome105-1024x374.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome105-768x280.png 768w\" sizes=\"auto, (max-width: 1198px) 100vw, 1198px\" \/><\/p>\r\n<p>Ich behalte die letzten 4 Sensoren, schalte die anderen aus und benenne sie um in:<\/p>\r\n<ul>\r\n<li>sensor.temperature_eau_chaude<\/li>\r\n<li>sensor.esphome_total_Wasser_potable<\/li>\r\n<li>sensor.esphome_total_eau_chaude<\/li>\r\n<li>sensor.esphome_total_Wasser_kalt<\/li>\r\n<\/ul>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8246\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome106-1.png\" alt=\"Umbenennen von Sensoren\" width=\"340\" height=\"291\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome106-1.png 340w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome106-1-300x257.png 300w\" sizes=\"auto, (max-width: 340px) 100vw, 340px\" \/><\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8247\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome107.png\" alt=\"Umbenennen von Sensoren\" width=\"824\" height=\"242\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome107.png 824w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome107-600x176.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome107-300x88.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome107-768x226.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/p>\r\n<h2><span class=\"ez-toc-section\" id=\"Jajoute_3_capteurs_doffset\"><\/span>Ich f\u00fcge 3 Offsetsensoren hinzu<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Wenn der D1 Mini V4 neu gestartet wird (z.B. Saftausschnitt), beginnt die Z\u00e4hlung wieder bei Null.<\/p>\r\n<p>Daher habe ich die Berechnung der Gesamtz\u00e4hlung \u00fcber einen Sensor organisiert, der mir die Summe aus einem Offset und dem Wert der laufenden Z\u00e4hlung gibt.<\/p>\r\n<p>Daher habe ich drei Offset-Einheiten hinzugef\u00fcgt. F\u00fcr Puristen sind nur zwei obligatorisch, der 3. kann berechnet werden.<\/p>\r\n<p>Also habe ich unter Einstellungen\/Ger\u00e4te und Dienste\/Eintr\u00e4ge einen Eintrag hinzugef\u00fcgt.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8236\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome101.png\" alt=\"Hinzuf\u00fcgen eines Eintrags\" width=\"213\" height=\"63\" \/><\/p>\r\n<p>Und dann die Zahl<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8237\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome102.png\" alt=\"Hinzuf\u00fcgen einer Zahl\" width=\"516\" height=\"580\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome102.png 516w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome102-267x300.png 267w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8238\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome103.png\" alt=\"Konfigurieren der Anzahl\" width=\"519\" height=\"459\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome103.png 519w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome103-300x265.png 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/p>\r\n<p>Dadurch erschaffe ich input_number.eau_froide_offset.<\/p>\r\n<p>Ich mache das f\u00fcr die beiden anderen Offset<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8239\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome104.png\" alt=\"Konfigurieren von Offsets\" width=\"888\" height=\"195\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome104.png 888w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome104-600x132.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome104-300x66.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome104-768x169.png 768w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><\/p>\r\n<p>Ich habe mich daf\u00fcr entschieden, \u201eTrinkwasser\u201c f\u00fcr alles zu verwenden, was in den Trinkwasserz\u00e4hler gelangt, also den Gesamtverbrauch: kaltes Wasser + hei\u00dfes Wasser.<\/p>\r\n<h2><span class=\"ez-toc-section\" id=\"Jajoute_3_automatisations_pour_gerer_le_Reset_du_compteur_du_D1_Mini\"><\/span>Ich f\u00fcge 3 Automatisierungen hinzu, um den Z\u00e4hler-Reset des D1 Mini zu verwalten<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Der D1 Mini hat einen Fehler in der Gr\u00f6\u00dfe, er verliert den Wert seiner Z\u00e4hler im Falle eines Reset, so dass alles bei Null beginnt, also passt es mir nicht.<\/p>\r\n<p>Mir ist aufgefallen, dass die Sensoren zum Zeitpunkt des Reset in den Zustand \u201eunavailable\u201c wechseln, bevor sie auf Null zur\u00fcckgesetzt werden.<\/p>\r\n<p>Ich werde daher den vorherigen Zustand unavailable einem Input_number zuordnen, der mir als Offset, d. h. als Korrekturwert f\u00fcr die Gesamtz\u00e4hlung, dienen wird.<\/p>\r\n<p>Um es einfacher zu machen, mache ich 3 Automatisierungen, die dies realisieren:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">alias: Offset Hei\u00dfwasser auf Unavailable triggers: - entity_id: sensor.esphome_total_eau_chaude to: unavailable trigger: state actions: - target: entity_id: input_number.eau_chaude_offset data: value: &gt;- {{ states('input_number.eau_chaude_offset') | float + trigger.from_state.state | float }} Aktion: input_number.set_value mode: Single alias: Offset Kaltes Wasser auf Unavailable triggers: - entity_id: sensor.esphome_total_eau_froide to: unavailable trigger: state actions: - target: entity_id: input_number.eau_froide_offset data: value: &gt;- {{ states('input_number.eau_froide_offset') | float + trigger.from_state.state | float }} Aktion: input_number.set_value mode: Single alias: Offset Wasser Trinkbar auf Unavailable triggers: - entity_id: sensor.esphome_total_eau_potable to: unavailable trigger: state actions: - target: entity_id: input_number.eau_potable_offset data: value: &gt;- {{ states('input_number.eau_potable_offset') | float + trigger.from_state.state | float }} Aktion: input_number.set_value mode: Single<\/pre>\r\n<p class=\"whitespace-pre-wrap break-words\">F\u00fcr jede Art von Wasser (warm, kalt, trinkbar), wenn der Sensor nicht mehr verf\u00fcgbar ist (\u201aunavailable\u2018):<\/p>\r\n<ul class=\"-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8\">\r\n<li class=\"whitespace-normal break-words\">Automatisierung erfasst den letzten bekannten Wert vor der Trennung<\/li>\r\n<li class=\"whitespace-normal break-words\">Dieser Wert wird einem Offsetz\u00e4hler hinzugef\u00fcgt, der in einem _number-Input gespeichert ist.<\/li>\r\n<li class=\"whitespace-normal break-words\">Dadurch bleibt die Gesamtkumulierung auch nach einem Neustart des Sensors erhalten<\/li>\r\n<\/ul>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8251\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome108.png\" alt=\"Automatisierung\" width=\"369\" height=\"191\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome108.png 369w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome108-300x155.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/p>\r\n<h2><span class=\"ez-toc-section\" id=\"Je_declare_les_capteurs_finaux_de_consommation\"><\/span>Ich deklariere die Endverbrauchssensoren<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>In meiner Datei templates.yaml f\u00fcge ich diese drei Sensoren hinzu:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8270\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome109-1.png\" alt=\"Endsensoren\" width=\"1070\" height=\"517\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome109-1.png 1070w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome109-1-600x290.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome109-1-300x145.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome109-1-1024x495.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome109-1-768x371.png 768w\" sizes=\"auto, (max-width: 1070px) 100vw, 1070px\" \/><\/pre>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">- sensor: - name: \"Verbrauch Trinkwasser\" einzigartig_id: sensor.consumation_eau_potable unit_of_measurement: \"L\" device_class: water state_class: total_increasing state: &gt; {% set measure_aktuell = states('sensor.esphome_total_eau_potable') | float %} {% set total_offset = states('input_number.eau_potable_offset') | float %} {{ total_offset + Ma\u00df_aktuell if states('sensor.esphome_total_eau_potable') != 'unavailable' else total_offset }} - name: \"Verbrauch Kaltes Wasser\" einzigartig_id: sensor.consumation_eau_froide unit_of_measurement: \"L\" device_class: water state_class: total_increasing state: &gt; {% set measure_aktuell = states('sensor.esphome_total_eau_froide') | float %} {% set total_offset = states('input_number.eau_froide_offset') | float %} {{ total_offset + Ma\u00df_aktuell if states('sensor.esphome_total_eau_froide') != 'unavailable' else total_offset }} - name: \"Warmwasserverbrauch\" einzigartig_id: sensor.consumation_eau_chaude unit_of_measurement: \"L\" device_class: water state_class: total_increasing state: &gt; {% set measure_aktuell = states('sensor.esphome_total_eau_chaude') | float %} {% set total_offset = states('input_number.eau_chaude_offset') | float %} {{ total_offset + Ma\u00df_aktuell if states('sensor.esphome_total_eau_chaude') != 'unavailable' else total_offset }}      <\/pre>\r\n<p>Bei diesen Sensoren handelt es sich um virtuelle Sensoren (Templates), mit denen der Wasserverbrauch dauerhaft \u00fcberwacht werden kann. Analysieren wir, wie sie funktionieren:<\/p>\r\n<p>Datenquellen:<\/p>\r\n<ul>\r\n<li>Physikalische Sensoren ESP Home (sensor.esphome_total_eau_*)<\/li>\r\n<li>Offsetz\u00e4hler (input_number.eau_*_offset)<\/li>\r\n<\/ul>\r\n<p>Arten von Ma\u00dfnahmen:<\/p>\r\n<ul>\r\n<li>Trinkwasser: Zulaufwasser insgesamt<\/li>\r\n<li>Warmwasser: Warmwasserverbrauch<\/li>\r\n<li>Kaltwasser: Kaltwasserverbrauch<\/li>\r\n<\/ul>\r\n<p>Gemeinsame Merkmale:<\/p>\r\n<ul>\r\n<li>state_class: total_increasing: Zeigt einen Z\u00e4hler an, der kontinuierlich ansteigt<\/li>\r\n<li>unit_of_measurement: \u201eL\u201c: Messung in Litern<\/li>\r\n<\/ul>\r\n<p>Funktionslogik:<\/p>\r\n<p>{% set measurement_aktuell = states(\u201asensor.esphome_total_eau_*\u2018) | float %}<br \/>{% set total_offset = states(\u201ainput_number.eau_*_offset\u2018) | float %}<br \/>{{ total_offset + Ma\u00df_aktuell if states(\u2026) != \u2018unavailable\u2019 else total_offset }}<\/p>\r\n<ul>\r\n<li>Wenn der ESP-Sensor verf\u00fcgbar ist: Insgesamt = Offset + aktuelle Ma\u00dfnahme<\/li>\r\n<li>Wenn der ESP-Sensor nicht verf\u00fcgbar ist: Total = nur Offset<\/li>\r\n<\/ul>\r\n<h2><span class=\"ez-toc-section\" id=\"Je_configure_recorder\"><\/span>Ich konfiguriere Recorder<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Man muss daran denken, das zu behalten, was man braucht, aber auch daran, nicht aufzuzeichnen, was nicht n\u00fctzlich ist.<\/p>\r\n<p>So setze ich in der Recorder-Konfiguration Folgendes ein:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">  include: entity_globs: [...] - input_number.eau_* - sensor.consumation_eau_* ausgeschlossen: entity_globs: [...] - sensor.esphome*    <\/pre>\r\n<h2><span class=\"ez-toc-section\" id=\"Je_teste_le_reset_du_D1_Mini_V4\"><\/span>Ich teste das Reset des D1 Mini V4<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Am Ende habe ich also<\/p>\r\n<ul>\r\n<li>3 input_number, die als Offset dienen,<\/li>\r\n<li>3 Sensoren, die mir den Wert der aktuellen Z\u00e4hler des D1 Mini geben<\/li>\r\n<li>3 berechnete Sensoren, die mir den Wert der permanenten Z\u00e4hler geben<\/li>\r\n<\/ul>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8271\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome112.png\" alt=\"Reset-Test\" width=\"505\" height=\"467\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome112.png 505w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome112-300x277.png 300w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/p>\r\n<p>Zu diesem Zeitpunkt hat sich der D1 nie wieder erholt, so dass die Z\u00e4hler des D1 und die Dauerz\u00e4hler identisch sind.<\/p>\r\n<p>Ich stecke den D1 mini ab und wieder ein, die Sensoren werden f\u00fcr die Zeit des Reset nicht mehr verf\u00fcgbar sein und dann auf 0 zur\u00fcckgehen.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8272\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome113.png\" alt=\"Zur\u00fccksetzen des D1 Mini\" width=\"508\" height=\"465\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome113.png 508w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome113-300x275.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/p>\r\n<p>Zu diesem Zeitpunkt nehmen die Offsets die letzten Werte der Z\u00e4hler. Dann verbindet sich der D1 mini wieder mit dem Home Assistant:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8273\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome114.png\" alt=\"Verbindung zum D1 Mini\" width=\"503\" height=\"466\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome114.png 503w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome114-300x278.png 300w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/p>\r\n<p>Die Dauerz\u00e4hler nehmen den Offsetwert + den Z\u00e4hlerwert des D1 (0) auf.<\/p>\r\n<p>Ich gie\u00dfe ein wenig hei\u00dfes und ein wenig kaltes Wasser, die Offsetdrucke bewegen sich nicht, aber die Z\u00e4hler zeigen die richtigen Werte an:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8274\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome115.png\" alt=\"Verbrauchstest\" width=\"506\" height=\"466\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome115.png 506w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/esphome115-300x276.png 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/p>\r\n<p>Ich behalte also nur die letzten 3 Z\u00e4hler f\u00fcr mein Dashboard und f\u00fcr die conso-Statistiken.<\/p>\r\n<h2><span class=\"ez-toc-section\" id=\"Resultat\"><\/span>Ergebnis<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8291\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-scaled.jpg\" alt=\"Endergebnis\" width=\"320\" height=\"452\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-scaled.jpg 1812w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-scaled-600x848.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-212x300.jpg 212w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-725x1024.jpg 725w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-768x1085.jpg 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-1087x1536.jpg 1087w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173642-1449x2048.jpg 1449w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8292\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-scaled.jpg\" alt=\"Endergebnis\" width=\"319\" height=\"442\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-scaled.jpg 1849w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-scaled-600x831.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-217x300.jpg 217w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-740x1024.jpg 740w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-768x1063.jpg 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-1109x1536.jpg 1109w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_171840-1479x2048.jpg 1479w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8293\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-scaled.jpg\" alt=\"Endergebnis\" width=\"321\" height=\"431\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-scaled.jpg 1905w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-scaled-600x806.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-223x300.jpg 223w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-762x1024.jpg 762w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-768x1032.jpg 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-1143x1536.jpg 1143w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/12\/20250104_173050-1524x2048.jpg 1524w\" sizes=\"auto, (max-width: 321px) 100vw, 321px\" \/><\/p>\r\n<h2><span class=\"ez-toc-section\" id=\"Si_cetait_a_refaire_idees_ou_retour_dexperience\"><\/span>Sollte dies noch einmal geschehen (Ideen oder R\u00fcckmeldungen)<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<ul>\r\n<li>Ich w\u00fcrde eine Turbine mit Temperatursensor auch f\u00fcr kaltes Wasser verwenden, ich bin neugierig, die Temperatur vor allem im Winter wissen zu wollen.<\/li>\r\n<\/ul>\r\n\r\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Dieser Artikel kn\u00fcpft an den vorhergehenden Artikel an: Wasserverbrauch d\u00e4mpfen<\/p>","protected":false},"author":1,"featured_media":2842,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,23,166],"tags":[],"class_list":["post-8260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-jeedom-2","category-retex"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/8260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/comments?post=8260"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/8260\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media\/2842"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media?parent=8260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/categories?post=8260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/tags?post=8260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}