Qortora · Search · Indexed page

community.home-assistant.ioFetched 2026-08-13T18:53:12Z

Bug or wrong program? - ESPHome - Home Assistant Community

Hello everybody, I am writing a program to manage my watering with ESPHOME, it is the first time : I have a Rainbird system, and all the sprinkers were transferred in HA, when a sprinkler is on, I put the water pump ON,…

Open original source · Full cached text

Bug or wrong program? - ESPHome - Home Assistant Community = 40rem)" rel="stylesheet" data-target="desktop" /> = 40rem)" rel="stylesheet" data-target="chat_desktop" /> = 40rem)" rel="stylesheet" data-target="discourse-ai_desktop" /> = 40rem)" rel="stylesheet" data-target="discourse-reactions_desktop" /> = 40rem)" rel="stylesheet" data-target="poll_desktop" /> = 40rem)" rel="stylesheet" data-target="desktop_theme" data-theme-id="19" data-theme-name="scroll to top"/> Bug or wrong program? ESPHome Vertau (Gilles BAJOLET) August 13, 2026, 1:28pm 1 Hello everybody, I am writing a program to manage my watering with ESPHOME, it is the first time : I have a Rainbird system, and all the sprinkers were transferred in HA, when a sprinkler is on, I put the water pump ON, I register the starting hour, the flow of water and the stopping hour, for each register, I write on a data base and for several weeks , everything was perfect. Then I just want to add a new signal which is coming from another Valve and then, all the data Registered were wrong , I tested my cabling with a scope, all the signals were perfect… I came back to the old program, and everybody became again correct !! I look for problems during hours without succes, If somebody have a good idea, I thank him or her in advance. I use a ESPhome ESP32 wroom 32U and a home assistant green with the last version of software: I just add: - platform: gpio name: "Remplissage citerne" id: remplissage_citerne pin: number: GPIO26 mode: input: true pullup: false the wrong program is: ############################################################################### # # PROJET : AIS - Arrosage Intelligent Supervision # # Fichier : esphome-debit-arrosage.yaml # # Version : V1.0.0 # # Date : 11/08/2026 # # Description # ----------- # ESP32 dédié à la supervision hydraulique de l'arrosage. # # Fonctions : # # - Mesure du débit d'arrosage par débitmètre à effet Hall # - Calcul du débit instantané (L/min) # - Calcul du volume distribué pendant un cycle # - Remise à zéro du volume par service Home Assistant # - Détection de la vanne de remplissage de la citerne (GPIO26) # ############################################################################### esphome: name: "esphome-debit-arrosage" friendly_name: esphome-debit-arrosage comment: "AIS V1.0.0 - Débitmètre + Remplissage citerne" min_version: 2026.4.0 name_add_mac_suffix: false esp32: variant: esp32 framework: type: esp-idf logger: api: actions: # Remise à zéro du volume du cycle - action: raz_volume_cycle then: - pulse_counter.set_total_pulses: id: debit_impulsions value: 0 ota: - platform: esphome wifi: ssid: !secret wifi_ssid password: !secret wifi_password sensor: ########################################################################### # Niveau WiFi ########################################################################### - platform: wifi_signal name: "ESP Débit Arrosage RSSI" update_interval: 60s ########################################################################### # Temps de fonctionnement ########################################################################### - platform: uptime name: "Allumé depuis (s)" id: uptime_sec ########################################################################### # Débitmètre ########################################################################### - platform: pulse_counter pin: number: GPIO27 mode: input: true pullup: false count_mode: rising_edge: DISABLE falling_edge: INCREMENT name: "Débit impulsions" id: debit_impulsions unit_of_measurement: "imp/min" accuracy_decimals: 0 update_interval: 1s total: id: volume_cycle name: "Volume cycle" unit_of_measurement: "L" device_class: water state_class: total accuracy_decimals: 2 filters: - lambda: |- return x / 65.0; ########################################################################### # Débit instantané ########################################################################### - platform: template name: "Débit instantané" id: debit_l_min unit_of_measurement: "L/min" device_class: volume_flow_rate state_class: measurement accuracy_decimals: 2 lambda: |- return id(debit_impulsions).state / 65.0; update_interval: 1s ########################################################################### # Détection de la vanne de remplissage de la citerne ########################################################################### binary_sensor: - platform: gpio name: "Remplissage citerne" id: remplissage_citerne pin: number: GPIO26 mode: input: true pullup: false ########################################################################### # Commandes ########################################################################### switch: - platform: restart name: "Redémarrage" Karosm (Karosm) August 13, 2026, 1:55pm 2 I don’t understand from your description what kind of problem you actually have, you should have a look at your esphome logs to see what’s going on. What is this gpio sensor? Does it have external pullup/pulldown? Some software filtering would likely make it more robust. Vertau (Gilles BAJOLET) August 13, 2026, 2:54pm 3 The problem is that my data-base was corrupted with strange and wrong data. The GPIO is a signal which is coming from a valve: I got the signal 24 volts AC, I transformer it in DC, after I have an opto-coupler with transform the signal to 0 or 3.3 volts DC, I checked the signal with a scope, and it is clean, the change between 0 —> 1 or reverse is transmitted to Home-assistant without problem. Vertau (Gilles BAJOLET) August 13, 2026, 3:31pm 4 IMG68171920×2560 698 KB Here is a view of the signal change, the voltage is only 3.12 volts Vertau (Gilles BAJOLET) August 13, 2026, 3:47pm 5 The interface opto-coupler is similar to the attachéd picture, do you need that is it nécessaire to add an option es pullup or pulldown? IMG05961920×1334 213 KB Karosm (Karosm) August 13, 2026, 4:36pm 6 I think it has sufficient pullup via 510R+LED. But your signal is inverted, I don’t know if you considered it on your code. neel-m (Neel Malik) August 13, 2026, 4:37pm 7 It is unlikely that your esphome device corrupted your database. Which database is it? What exactly is corrupted? Is it the whole database or just some values of some sensors?