Peristaltic Pump / Autodoser upgrade / conversion to Home Assistant Control Project


I must work on a box to range them.

I used a 4 channel really as describe here : 4 channel Relay ESP8266 Wifi board WORKING with esphome. I got inspired by you project where i replace sonnoff by this est relay.
I made integration with Esphome.

esphome:
  name: 4ch_reef_pompes_doseuse
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "yours"
  password: "yours"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "4Ch Reef Pompes Doseuse"
    password: "yours"

captive_portal:

# Enable Home Assistant API
api:

ota:

logger:
  baud_rate: 0 #need this to free up UART pins

uart:
  baud_rate: 115200 # speed to STC15L101EW
  tx_pin: GPIO1
  rx_pin: GPIO3

switch:
  - platform: template
    name: 'Pompe doseuse Kh'
    id: PomdosKh
    turn_on_action:
      - uart.write: [0xA0, 0x01, 0x01, 0xA2]
    turn_off_action:
      - uart.write: [0xA0, 0x01, 0x00, 0xA1]
    optimistic: true
  - platform: template
    name: 'Pompe doseuse Ca'
    id: PomdosCa
    turn_on_action:
      - uart.write: [0xA0, 0x02, 0x01, 0xA3]
    turn_off_action:
      - uart.write: [0xA0, 0x02, 0x00, 0xA2]
    optimistic: true
  - platform: template
    name: 'Pompe doseuse Min'
    id: PomdosMin
    turn_on_action:
      - uart.write: [0xA0, 0x03, 0x01, 0xA4]
    turn_off_action:
      - uart.write: [0xA0, 0x03, 0x00, 0xA3]
    optimistic: true
  - platform: template
    name: 'Pompe doseuse Mg'
    id: PomdosMg
    turn_on_action:
      - uart.write: [0xA0, 0x04, 0x01, 0xA5]
    turn_off_action:
      - uart.write: [0xA0, 0x04, 0x00, 0xA4]
    optimistic: true
  - platform: restart
    name: "RS4switch_a Restart"

As relay can be activated by wifi as independent switch. So, one card = 4 switch.
1 switch on pump and all in 12V.

I simply use your code for Boolean, sensors, input-select, automatisation… without the MQTT part and replace your switch item in automation action by mine.
Sorry if my english is bad. I her not partake a lot.

2 Likes