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

Did you check Aliexpress / Alibaba or Amazon? I’m still looking to get my hands on a very cheap / free unit to tinker with and try myself.

Hi @Twinsen68,

I never got around to doing a calibration function, because at least 4 of my AquaMedic pump channels did prove to still be accurate to the manufactures stated values and that was all I needed for Calcium, Mag, Iron and Alkalinity.

However, the other unit does appear to have lost some of it’s accuracy - and now I’m thinking about and considering trying my hand with Carbon dosing in the coming months. In which case, I will need to probably suss out the calibration function / script to maintain it’s accuracy. Can’t make any promises at the moment in regards to when I’ll have time for this however, as client/customer work at the moment has priority.

But my initial idea for the function would work something like this:

1.) Acquire the test calibration receptacle with volume demarcations in ml;
2.) ensure the pump hose lines are full with the fluid (ensuring all air bubbles are removed)
3.) Set the calibration receptacle volume (i.e.-25 ml, 100ml, 500ml, whatever) in the HA peristaltic pump calibration interface
4.) Press a button / toggle to begin the calibration process
5.) When the fluid in the receptacle volume reaches the set amount described in the HA calibration field, press / toggle the calibration switch to stop the pump
6.) The calibration script will then perform the necessary math behind the scenes to determine the flow rate of the pump & set that calibration value to be used until the next calibration is performed.

Does that seem legit & easy enough to use? Or are there better methods to calibrate which I’m not aware of, which you could suggest?

@cowboy Th for you answer.
Pumps work great ! I’m thinking to calibration. If i dot something I will publish it. I also thinking to a solution to know remaining volume in flask.

1 Like

From aliexpress. I take 12v peristaltic pump and 4 ch relay with ESP in 12V.

2 Likes

Please do keep us posted how it goes.

If you have time to do a write up of your build, I’m sure it would be appreciated by others who join us in our endeavours. :slight_smile:


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

@Twinsen68 which pumps have you ordered at ali ?

From Kramoer : KFS in 12V. prefer the two gear in B10. The single one I have are quite speed with 87ml/min.

2 Likes

I’m thinking have finishing my work but need validation.
I created lovelace carte like :


when auto mode is on :

when auto is off and calibration on :

Working also with the both on.
Activating calibration send a notification to check bubbles in tube and if it’s not empty :
when calibration is running i use 15 sec but think to add a input-number to choice a period time:

At end of this period, a notification come and ask to report qty value:

This value impact normally daily runtime:

        value_template: "{{ (float(states('input_number.reefdoser1_pump1_daily_dosage')) / float(states('input_number.reefdoser1_pump1_calibration_dosage'))/15 ) | round(2) }}"
        friendly_name: 'R1P1 Durée ajout quotidien'

See here entire code with Lovelace code at the end :

###################################################################################
#                                  Customize Gobal                                #
###################################################################################
homeassistant:
  customize_glob:
    "input_boolean.r2d*":
      icon: mdi:calendar-clock
    "input_boolean.r1d*":
      icon: mdi:calendar-clock
    "sensor.reefdoser*_pump*_daily_runtime":
      icon: mdi:history
    "sensor.reefdoser*_pump*_dosage_split":
      icon: mdi:beaker
    "sensor.reefdoser*_pump*_time_split":
      icon: mdi:update
    "input_number.reefdoser*_pump*_daily_mins":
      icon: mdi:clock
    "input_select.reefdoser1_pump*_daily_freq":
      icon: mdi:progress-clock

#switch:
#  - platform: mqtt
#    name: "Reefdoser1 Pump1"
#    state_topic:  "homeassistant/stat/Reefdoser1/POWER1"
#    command_topic: "homeassistant/cmnd/Reefdoser1/POWER1"
#    qos: 1
#    payload_on: "ON"
#    payload_off: "OFF"
#    retain: True

###################################################################################
#                                  input_boolean                                  #
###################################################################################
input_boolean:
  r1p1:
    name: "Kh (R1P1) : Mode auto"
    icon: mdi:arrow-decision-auto-outline
# Pump calibration 
  calibr1p1on:
    name: "Mode calibration"
    icon: mdi:tape-measure
  calibr1p1start:
    name: "start calibration for 15 sec"
    icon: mdi:clock-start
###################################################################################
#                                  sensor                                         #
###################################################################################
sensor:
  - platform: template
    sensors:
# Reefdosers ONLINE status sensors
      reefdoser1:
        value_template: '{% if is_state("device_tracker.reefdoser1", "home") %}Online{% else %}OFFLINE{% endif %}'
        friendly_name: 'État Reefdoser1'
        icon_template: >-
          {% if is_state('device_tracker.reefdoser1', 'home') %}
            mdi:power-plug
          {% else %}
            mdi:power-plug-off
          {% endif %}
# Reefdoser1 Runtime sensors
      reefdoser1_pump1_daily_runtime:
        value_template: "{{ (float(states('input_number.reefdoser1_pump1_daily_dosage')) / (float(states('input_number.reefdoser1_pump1_calibration_dosage'))/15)) | round(2) }}"
        friendly_name: 'R1P1 Durée ajout quotidien'
        unit_of_measurement: 'sec'
      reefdoser1_pump1_dosage_split:
        value_template: "{{ (float( states('input_number.reefdoser1_pump1_daily_dosage')) / float(states('input_select.reefdoser1_pump1_daily_freq'))) | round(2) }} "
        friendly_name: 'R1P1 Qté ajout fractioné'
        unit_of_measurement: 'ml'
      reefdoser1_pump1_time_split:
        value_template: "{{ (float(states('sensor.reefdoser1_pump1_daily_runtime')) / float(states('input_select.reefdoser1_pump1_daily_freq'))) | round(2) }}"
        friendly_name: 'R1P1 Durée ajout fractioné'
        unit_of_measurement: 'sec'
###################################################################################
#                                  device_tracker:                                #
###################################################################################
device_tracker:
  - platform: ping
    hosts:
      reefdoser1: 192.168.1.49
###################################################################################
#                                  input_numbers                                  #
###################################################################################
input_number:
  reefdoser1_pump1_daily_dosage:
    name: Ajout quotidiens
    min: 1
    max: 500
    step: 1
    unit_of_measurement: ml
    icon: mdi:beaker
#    initial: 30
  reefdoser1_pump1_daily_mins:
    name: Décal. min. /H. réf.
    min: 00
    max: 59
    step: 1
    mode: box
#    initial: 00
    unit_of_measurement: mins
  reefdoser1_pump1_calibration_dosage:
    name: Résultat calibration en ml
    min: 1
    max: 50
    step: 0.5
    unit_of_measurement: ml
    mode: box
    icon: mdi:flask-outline
#    initial: 30
###################################################################################
#                                  input_select                                   #
###################################################################################
input_select:
  reefdoser1_pump1_daily_freq:
    name: Nbr d'ajouts quotidiens
    options:
      - "1"
      - "2"
      - "3"
      - "4"
      - "6"
      - "8"
      - "12"
      - "24"
    icon: mdi:target
###################################################################################
#                                  automations                                    #
###################################################################################
automation:
# Reefdoser1 Section
# R1P1 Subsection Automations

- alias: Reefdoser1 Pump1 at the specified frequency
  trigger:
    - platform: time_pattern
      hours: "/1"
      seconds: "00"
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: "{{ now().hour % ( 24 / float(states('input_select.reefdoser1_pump1_daily_freq')))|int == 0 }}"
      - condition: template
        value_template: "{% if now().minute | int ==  states.input_number.reefdoser1_pump1_daily_mins.state | int %}true{% endif %}"
      - condition: state
        entity_id: sensor.reefdoser1
        state: 'Online'
      - condition: state
        entity_id: input_boolean.r1p1
        state: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.pompe_doseuse_kh
    - delay: '00:00:{{ states.sensor.reefdoser1_pump1_time_split.state | int }}'
    - service: switch.turn_off
      entity_id: switch.pompe_doseuse_kh

# Calibration start     
- alias: Notify ready calibration R1P1
  trigger:
    platform: state
    entity_id: input_boolean.Calibr1p1on 
    to: 'on'
  action:
    service: notify.mobile_app_iphone_x_raphael
    data:
      title: "Calibration R1P1 - Kh"
      message: "Vérifiez le tuyau ; plein et sans bulles d'air. Placez le recipient doseur en sortie et enclanchez calibration start"
      data:
        push:
          thread-id: "activité_reef-group"
# Calibration view reset with auto statut
# Allow to mask calibration card in lovelace if off
- alias: Reset calibration view
  trigger:
    platform: state
    entity_id: input_boolean.r1p1
    to: 'off'
  action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.calibr1p1on
# Calibration view reset with auto statut
# Allow to mask calibration card in lovelace if off
- alias: Calibration pump for 15 sec
  trigger:
    platform: state
    entity_id: input_boolean.calibr1p1start 
    to: 'on'
  condition:
    condition: and
    conditions:
      - condition: state  
        entity_id: sensor.reefdoser1
        state: 'Online'
      - condition: state
        entity_id: input_boolean.calibr1p1on
        state: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.pompe_doseuse_kh
    - delay: '00:00:15'
    - service: switch.turn_off
      entity_id: switch.pompe_doseuse_kh
    - service: input_boolean.turn_off
      entity_id: input_boolean.calibr1p1start
    - service: notify.mobile_app_iphone_x_raphael
      data:
        title: "Fin calibration"
        message: "Reporter la qté delivrée par la pompe"
        data:
          push:
            thread-id: "activité_reef-group"
###################################################################################
#                                  group                                          #
###################################################################################
group:
  aqua_view:
    view: yes
    name: Pompes Doseuses
    entities:
    - group.r1p1

  r1p1:
    name: R1P1 - Kh
    control: hidden
    entities:
    - switch.pompe_doseuse_kh
    - input_boolean.r1p1
    - input_number.reefdoser1_pump1_daily_mins
    - input_select.reefdoser1_pump1_daily_freq
    - input_number.reefdoser1_pump1_daily_dosage
    - sensor.reefdoser1_pump1_dosage_split
    - sensor.reefdoser1_pump1_daily_runtime
    - sensor.reefdoser1_pump1_time_split
###################################################################################
#                             Dynamic  Card in lovelace                           #
###################################################################################
#cards:
#  - card:
#      entities:
#        - entity: switch.pompe_doseuse_kh
#        - entity: input_boolean.r1p1
#        - entity: input_boolean.calibr1p1on
#      show_header_toggle: false
#      title: Kh - R1P1
#      type: entities
#    conditions:
#      - entity: input_boolean.r1p1
#        state: 'off'
#    title: Réveil - Aube
#    type: conditional
#  - card:
#      entities:
#        - entity: switch.pompe_doseuse_kh
#        - entity: input_boolean.r1p1
#        - entity: input_number.reefdoser1_pump1_daily_mins
#        - entity: input_select.reefdoser1_pump1_daily_freq
#        - entity: input_number.reefdoser1_pump1_daily_dosage
#        - entity: sensor.reefdoser1_pump1_dosage_split
#        - entity: sensor.reefdoser1_pump1_daily_runtime
#        - entity: sensor.reefdoser1_pump1_time_split
#        - entity: sensor.reefdoser1
#        - entity: input_boolean.calibr1p1on
#      show_header_toggle: false
#      title: Kh - R1P1
#      type: entities
#    conditions:
#      - entity: input_boolean.r1p1
#        state: 'on'
#    type: conditional
#  - card:
#      entities:
#        - entity: input_boolean.calibr1p1start
#        - entity: input_number.reefdoser1_pump1_calibration_dosage
#      show_header_toggle: false
#      title: Calibration Kh - R1P1
#      type: entities
#    conditions:
#      - entity: input_boolean.calibr1p1on
#        state: 'on'
#    type: conditional
#type: vertical-stack
#

Sorry for the French in code but it long to do a second time in english. It’s 1am30 here. Say me what you think about it. It’s my first project DIY.

3 Likes

My question is : what’s happened with calibration value when HA restart ?

1 Like

Hey @cowboy, ok found some 4 channel pumps on Aliexpress @70USD. They’re called Jebao Doser3.4. There is a version called Jebao Doser2.4 with manual control as well for 80USD. Seeing that this is not tested, does not work with corrosive liquids and costs almost the same, I’ll probably go the way described by @Twinsen68

1 Like

@Twinsen68 - Oh wow! Nice one!

I have you beat - I’ve stayed up until 5:30am (I’m in Netherlands) - but was working on customer / client assignments. I need to go to bed for at least a few hours before getting back up & going to work again.

But I look forward to testing out the calibration function this weekend.

As far as your question about calibration value - if you set that to an input_number, AND you do not declare an initial value for that input_number.reefdoser1_pump1_calibration_dosage in your YAML config (and it looks like you do not, as I see it commented out) - than it should take the last known value from the HA database instead.

I’ll make you a proposal - you don’t have to apologise for your French if I don’t have to apologise for my American English. Deal? :slight_smile: Besides, if you and I can’t figure it out how to translate something, I’ve got several French friends I can ask, including one who is also a fellow marine aquarist too.

Are you using HA just for dosing pumps, or are you making a full aquarium controller with Home Assistant?

And if you feel comfortable with sharing, I’m always happy to see a photo of your aquarium you are using this with. :slight_smile:

Here’s a recent photo of mine:

I don’t blame you. I almost want to try his build myself too. :smiley:

@monkey-house
In jebao pump, peristaltic pump cost 2-4$.
The use high quality by choice.

1 Like

@cowboy
I use HA for my house but view is capacity it give me envy to use it for my aquarium to make lot of automation.
I stop my tank few month ago because with two child and my work it don’t let me time to manage it. But I start it again ;-).
At it’s best time, picture of the previous tank:


Actually:

4 Likes

In action on phone. Pump in fonction on HA in video

1 Like

Wow…beautiful tank! I look forward to your next tank then. And I look forward to seeing how you ultimately incorporate more aquarium controller functions into your HA instance. Let me know if you need any help / guidance with your implementation.

Come May 2020, I will have been using HA as an aquarium controller (and home controller) for 3 years now, and am super happy with it. And imagine you will be too.

BTW, I’m going to post a link about your development / build back on the main aquarium controller thread ( https://community.home-assistant.io/t/going-to-next-level-of-aquarium-automation-whos-with-me/ ) as well as the Facebook Home Assistant group, just to keep everyone who’s not following this thread up to date. :slight_smile:

I modified code because I missing a “(”. It work now.
I will add choice for calibration time because I have pumps with 87ml/min and 7ml/min.

1 Like

OK this finally works correctly.
It include, calibration, choice of calibration time, instructions by notification via HA app, notification if pump is outline
The code is :

###################################################################################
#                                  Customize Gobal                                #
###################################################################################
homeassistant:
  customize_glob:
    "input_boolean.r2d*":
      icon: mdi:calendar-clock
    "input_boolean.r1d*":
      icon: mdi:calendar-clock
    "sensor.reefdoser*_pump*_daily_runtime":
      icon: mdi:history
    "sensor.reefdoser*_pump*_dosage_split":
      icon: mdi:beaker
    "sensor.reefdoser*_pump*_time_split":
      icon: mdi:update
    "input_number.reefdoser*_pump*_daily_mins":
      icon: mdi:clock
    "input_select.reefdoser1_pump*_daily_freq":
      icon: mdi:progress-clock

#switch:
#  - platform: mqtt
#    name: "Reefdoser1 Pump1"
#    state_topic:  "homeassistant/stat/Reefdoser1/POWER1"
#    command_topic: "homeassistant/cmnd/Reefdoser1/POWER1"
#    qos: 1
#    payload_on: "ON"
#    payload_off: "OFF"
#    retain: True

###################################################################################
#                                  input_boolean                                  #
###################################################################################
input_boolean:
  r1p1:
    name: "Kh (R1P1) : Mode auto"
    icon: mdi:arrow-decision-auto-outline
# Pump calibration 
  calibr1p1on:
    name: "Mode calibration"
    icon: mdi:tape-measure
  calibr1p1start:
    name: "Lancer la calibration"
    icon: mdi:clock-start
###################################################################################
#                                  sensor                                         #
###################################################################################
sensor:
  - platform: template
    sensors:
# Reefdosers ONLINE status sensors
      reefdoser1:
        value_template: '{% if is_state("device_tracker.reefdoser1", "home") %}Online{% else %}offline{% endif %}'
        friendly_name: 'État Reefdoser1'
        icon_template: >-
          {% if is_state('device_tracker.reefdoser1', 'home') %}
            mdi:power-plug
          {% else %}
            mdi:power-plug-off
          {% endif %}
# Reefdoser1 Runtime sensors
      reefdoser1_pump1_daily_runtime:
        value_template: "{{ (float(states('input_number.reefdoser1_pump1_daily_dosage')) / ((float(states('input_number.reefdoser1_pump1_calibration_dosage')))/(float(states('input_number.reefdoser1_pump1_calibration_time'))))) | round(2) }}"
        friendly_name: 'R1P1 Durée ajout quotidien'
        unit_of_measurement: 'sec'
      reefdoser1_pump1_dosage_split:
        value_template: "{{ (float( states('input_number.reefdoser1_pump1_daily_dosage')) / float(states('input_select.reefdoser1_pump1_daily_freq'))) | round(2) }} "
        friendly_name: 'R1P1 Qté ajout fractioné'
        unit_of_measurement: 'ml'
      reefdoser1_pump1_time_split:
        value_template: "{{ (float(states('sensor.reefdoser1_pump1_daily_runtime')) / float(states('input_select.reefdoser1_pump1_daily_freq'))) | round(2) }}"
        friendly_name: 'R1P1 Durée ajout fractioné'
        unit_of_measurement: 'sec'
###################################################################################
#                                  device_tracker:                                #
###################################################################################
device_tracker:
  - platform: ping
    hosts:
      reefdoser1: 192.168.1.49
###################################################################################
#                                  input_numbers                                  #
###################################################################################
input_number:
  reefdoser1_pump1_daily_dosage:
    name: Ajouts quotidiens
    min: 1
    max: 500
    step: 1
    unit_of_measurement: ml
    icon: mdi:beaker
#    initial: 30
  reefdoser1_pump1_daily_mins:
    name: Décal. min. /H. réf.
    min: 00
    max: 59
    step: 1
    mode: box
#    initial: 00
    unit_of_measurement: mins
  reefdoser1_pump1_calibration_dosage:
    name: Résultat calibration en ml
    min: 1
    max: 100
    step: 0.5
    unit_of_measurement: ml
    mode: box
    icon: mdi:flask-outline
#    initial: 30
    unit_of_measurement: mins
  reefdoser1_pump1_calibration_time:
    name: Durée calibration en sec
    min: 1
    max: 60
    step: 1
    unit_of_measurement: sec
    icon: mdi:timer-sand
#    initial: 30
#    initial: 30
###################################################################################
#                                  input_select                                   #
###################################################################################
input_select:
  reefdoser1_pump1_daily_freq:
    name: Nbr d'ajouts quotidiens
    options:
      - "1"
      - "2"
      - "3"
      - "4"
      - "6"
      - "8"
      - "12"
      - "24"
    icon: mdi:target
###################################################################################
#                                  automations                                    #
###################################################################################
automation:
# Reefdoser1 Section
# R1P1 Subsection Automations

- alias: Reefdoser1 Pump1 at the specified frequency
  trigger:
    - platform: time_pattern
      hours: "/1"
      seconds: "00"
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: "{{ now().hour % ( 24 / float(states('input_select.reefdoser1_pump1_daily_freq')))|int == 0 }}"
      - condition: template
        value_template: "{% if now().minute | int ==  states.input_number.reefdoser1_pump1_daily_mins.state | int %}true{% endif %}"
      - condition: state
        entity_id: sensor.reefdoser1
        state: 'Online'
      - condition: state
        entity_id: input_boolean.r1p1
        state: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.pompe_doseuse_kh
    - delay: '00:00:{{ states.sensor.reefdoser1_pump1_time_split.state | int }}'
    - service: switch.turn_off
      entity_id: switch.pompe_doseuse_kh
# Notify offline     
- alias: Notify reefdoser1 offline 
  trigger:
    platform: state
    entity_id: device_tracker.reefdoser1
    to: 'not_home'
  action:
    service: notify.mobile_app_iphone_x_raphael
    data:
      title: "Reefdoser1 offline"
      message: "les pompes reefdoser1 sont hors ligne et non fonctinelles "
      data:
        push:
          thread-id: "activité_reef-group"
# Calibration start     
- alias: Notify ready calibration R1P1
  trigger:
    platform: state
    entity_id: input_boolean.Calibr1p1on 
    to: 'on'
  action:
    service: notify.mobile_app_iphone_x_raphael
    data:
      title: "Calibration R1P1 - Kh"
      message: "Vérifiez le tuyau ; plein et sans bulles d'air. Choisisez la durée calibration. Placez le recipient doseur en sortie. Enclanchez calibration start"
      data:
        push:
          thread-id: "activité_reef-group"
# Calibration view reset with auto statut
# Allow to mask calibration card in lovelace if off
- alias: Reset calibration view
  trigger:
    platform: state
    entity_id: input_boolean.r1p1
    to: 'off'
  action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.calibr1p1on
# Calibration view reset with auto statut
# Allow to mask calibration card in lovelace if off
- alias: Calibration pump
  trigger:
    platform: state
    entity_id: input_boolean.calibr1p1start 
    to: 'on'
  condition:
    condition: and
    conditions:
      - condition: state  
        entity_id: sensor.reefdoser1
        state: 'Online'
      - condition: state
        entity_id: input_boolean.calibr1p1on
        state: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.pompe_doseuse_kh
    - delay: '00:00:{{ states.input_number.reefdoser1_pump1_calibration_time.state | int }}' 
    - service: switch.turn_off
      entity_id: switch.pompe_doseuse_kh
    - service: input_boolean.turn_off
      entity_id: input_boolean.calibr1p1start
    - service: notify.mobile_app_iphone_x_raphael
      data:
        title: "Fin calibration"
        message: "Reporter la qté delivrée par la pompe"
        data:
          push:
            thread-id: "activité_reef-group"
###################################################################################
#                                  group                                          #
###################################################################################
group:
  aqua_view:
    view: yes
    name: Pompes Doseuses
    entities:
    - group.r1p1

  r1p1:
    name: R1P1 - Kh
    control: hidden
    entities:
    - switch.pompe_doseuse_kh
    - input_boolean.r1p1
    - input_number.reefdoser1_pump1_daily_mins
    - input_select.reefdoser1_pump1_daily_freq
    - input_number.reefdoser1_pump1_daily_dosage
    - sensor.reefdoser1_pump1_dosage_split
    - sensor.reefdoser1_pump1_daily_runtime
    - sensor.reefdoser1_pump1_time_split
###################################################################################
#                             Dynamic  Card in lovelace                           #
###################################################################################
#cards:
#  - card:
#      entities:
#        - entity: switch.pompe_doseuse_kh
#        - entity: input_boolean.r1p1
#        - entity: input_boolean.calibr1p1on
#      show_header_toggle: false
#      title: Kh - R1P1
#      type: entities
#    conditions:
#      - entity: input_boolean.r1p1
#        state: 'off'
#    title: Réveil - Aube
#    type: conditional
#  - card:
#      entities:
#        - entity: switch.pompe_doseuse_kh
#        - entity: input_boolean.r1p1
#        - entity: input_number.reefdoser1_pump1_daily_mins
#        - entity: input_select.reefdoser1_pump1_daily_freq
#        - entity: input_number.reefdoser1_pump1_daily_dosage
#        - entity: sensor.reefdoser1_pump1_dosage_split
#        - entity: sensor.reefdoser1_pump1_daily_runtime
#        - entity: sensor.reefdoser1_pump1_time_split
#        - entity: sensor.reefdoser1
#        - entity: input_boolean.calibr1p1on
#      show_header_toggle: false
#      title: Kh - R1P1
#      type: entities
#    conditions:
#      - entity: input_boolean.r1p1
#        state: 'on'
#    type: conditional
#  - card:
#      entities:
#        - entity: input_number.reefdoser1_pump1_calibration_time
#        - entity: input_boolean.calibr1p1start
#        - entity: input_number.reefdoser1_pump1_calibration_dosage
#      show_header_toggle: false
#      title: Calibration Kh - R1P1
#      type: entities
#    conditions:
#      - entity: input_boolean.calibr1p1on
#        state: 'on'
#    type: conditional
#type: vertical-stack

Final look when all is developed :

1 Like

Remaining problem is accuracy of real delivery time. This doesn’t be a problem for long-time delivery but for short. If you do 1 sec delivery, this could be 2 secs.
Any idea to improve it?

I need to use history-stat to evaluate distributed qty to add notification when flask will be empty. Any idea how to proceed ?