pH metre DIY via ESPHome

Bonjour et merci pour les réponses
A+

Délosé pour le anglais. Je n’ai parle pas francais.

I could not found how you dealed with the fact that the d1_mini A0 input deals only with 3.3v (max 3.6v), and the pH probe sends 0-5V on it. Did you put a divisor ?

TRADUCION:
Je n’ai pas trouvé comment tu as géré le fait que l’entrée d1_mini A0 ne traite que 3,3v (max 3,6v), et que la sonde pH envoie 0-5V dessus. As-tu mis un diviseur ?

Bonjour,
je ne comprend pas la notion de « package HA », ou doit-on entrer ces paramètres ?
</
###################################################################################

device_tracker:

###################################################################################
device_tracker:

  • platform: ping
    interval_seconds: 30
    hosts:
    ph_meter: 192.168.1.26
    ####################################################################################

PH meter

####################################################################################
input_boolean:
##################################
calib_ph:
name: « Calib mode »

input_select:
##################################
c_calib_ph4:
name: Calibration pH4
icon: mdi:adjust
options:
- « 4.00 »
- « 4.01 »
c_calib_ph7:
name: Calibration pH7
icon: mdi:adjust
options:
- "6.86 "
- « 7.00 »
- « 7.01 »
c_calib_ph9_10:
name: Calibration pH9-10
icon: mdi:adjust
options:
- « 9.00 »
- « 9.18 »
- « 9.21 »
- « 10.00 »
- « 10.01 »

input_number:
v_calib_mv4:
name: Calibration mV à 4
icon: mdi:gauge

initial: 4.504

min: 3.500
max: 5.000
step: 0.001
mode: box

v_calib_mv7:
name: Calibration mV à 7
icon: mdi:gauge

initial: 4.013

min: 3.500
max: 5.000
step: 0.001
mode: box

v_calib_mv9:
name: Calibration mV à 9
icon: mdi:gauge

initial: 3.703

min: 3.500
max: 5.000
step: 0.001
mode: box

sensor:

  • platform: template
    sensors:
    reef_ph:
    friendly_name: « Valeur PH »
    value_template: ‹ {{ (states.input_select.c_calib_ph9_10.state | float) - ( (((states.input_number.v_calib_mv9.state | float)-(states.sensor.reef_ph_ads.state | float))*((states.input_select.c_calib_ph7.state | float)-(states.input_select.c_calib_ph9_10.state | float))) / ((states.input_number.v_calib_mv7.state | float)-(states.input_number.v_calib_mv9.state | float)) ) | round(2) }} ›

xc (states.sensor.reef_ph_ads.state | float)

(states.input_select.c_calib_ph4.state | float)

ya (states.input_select.c_calib_ph7.state | float)

yb (states.input_select.c_calib_ph9_10.state | float)

(states.input_number.v_calib_mv4.state | float)

xa (states.input_number.v_calib_mv7.state | float)

xb (states.input_number.v_calib_mv9.state | float)

#########################################################ph_meter

ph_meter ONLINE status sensors

  ph_meter:
    value_template: '{% if is_state("device_tracker.ph_meter", "home") %}Online{% else %}offline{% endif %}'
    friendly_name: 'État ph_meter'
    icon_template: >-
      {% if is_state('device_tracker.ph_meter', 'home') %}
        mdi:power-plug
      {% else %}
        mdi:power-plug-off
      {% endif %}

automation:

Notify offline

  • alias: Notify ph_meter offline
    trigger:
    platform: state
    entity_id: device_tracker.ph_meter
    to: ‹ not_home ›
    action:
    service: notify.iosdevice
    data:
    title: « ph_meter offline »
    message: "le pH mètre est hors ligne !!! Mesures impossibles !!! "
    data:
    push:
    thread-id: « activité_reef-group »

  • alias: ‹ Notif Reef Temp ›
    initial_state: ‹ on ›
    trigger:

    • platform: time_pattern
      hours: « /1 »
      seconds: « 03 »
      condition:
      condition: and
      conditions:
      • condition: template
        value_template: >
        {% if ( states(‹ sensor.time ›) > « 08:00 » ) and ( states(‹ sensor.time ›) < « 20:00 » )%}
        True
        {% else %}
        False
        {% endif %}
      • condition: or
        conditions:
        • condition: template
          value_template: « {{states(‹ sensor.reef_temperature_2 ›)| int > 26 | int}} »
        • condition: template
          value_template: « {{states(‹ sensor.reef_temperature_2 ›)| int < 23 | int}} »
          action:
          service: notify.iosdevice
          data_template:
          title: « Reef : Alerte Température »
          message: « La température d’eau est à {{states(‹ sensor.reef_temperature_2 ›)}} alors qu’elle devrait être comprise entre 23 et 26°C »
          data:
          push:
          thread-id: « activité_reef-group »
          />
          Merci d’avance

Pour information, pour moi
Avant sans isolation

Le pH joue le yoyo
Mise en place de ce module


Le pH est super stable.

Ce module analogique fonctionne super bien
Avant j’étais en I2C et j’utilisais
atlas-scientific


Mais suite a une panne et les prix prohebitif atlas-scientific je suis repassé sur un module chinois a pas cher et l’isolateur Gravity.
Pour une utilisation grand publique ça fonctionne parfaitement.
Je confirme, Isolation obligatoire de l’alimentation du pH

1 « J'aime »