Water tank automatic filler

Hi!
Sorry about my english.
I created an automatic water tank filler for my Jura coffe machine( or whatever another water tank).
Used hardware:
1.Sonoff Basic V1
2. Rain drop sensor without plate itself,only litle PCB module (see pic below)
3. 220V AC magnetic solenoid valve
4. Some wires(for wiring)
5.Stiff stainless wire (for tank sensor)
6.Some connecting stuff for wires
7. Water hose from solenoid to water tank
Used software:
ESPHome,there is yaml:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO14
      mode:
        input: true
        pullup: false
      inverted: false
    name: "Coffesensor"
    filters:
      - delayed_on: 5s
      - delayed_off: 500ms
    on_press:
      - switch.turn_on: relay
      
  

switch:
  - platform: gpio
    name: "Coffeswitch"
    pin: GPIO12
    id: relay
    restore_mode: ALWAYS_OFF
    on_turn_on:
      then:
       - delay: 40s
       - switch.turn_off: relay

status_led:
  pin:
    number: GPIO13
    inverted: yes

Wiring diagram:


1 Like