├── .gitattributes ├── .github └── workflows │ └── build.yml ├── README.md ├── esphome ├── .clack-base.yaml ├── .clack-labels-en.yaml ├── .clack-labels-nl.yaml ├── .clack-optional.yaml ├── board-esp32-wemos-s3.yaml ├── clack.yaml └── secrets.yaml ├── home_assistant ├── clack_en.yaml ├── clack_en_1_rly_extra_code.yaml ├── clack_en_backwash2.yaml ├── clack_nl.yaml ├── lovelace_menu_en.yaml ├── lovelace_menu_en_backwash2.yaml └── lovelace_menu_nl.yaml ├── readme ├── Chlorinator_V3_1.jpeg ├── Chlorinator_V3_2.jpeg ├── Clack INSTLKRT_V3_NL.pdf ├── Clack_V3_2.jpeg ├── backside print.jpeg ├── clack_V3_1.jpeg ├── clorinator.png └── min_max_NL.jpg └── www └── images ├── softener.png ├── softener0.png ├── softener10.png ├── softener100.png ├── softener20.png ├── softener40.png ├── softener60.png └── softener80.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build ESPHome firmware 2 | 3 | # Controls when the action will run. Triggers the workflow on push 4 | on: 5 | push: 6 | pull_request: 7 | release: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | name: "Build" 13 | steps: 14 | - name: "Checkout" 15 | uses: actions/checkout@v3 16 | - name: "Create secrets file" 17 | run: | 18 | touch esphome/secrets.yaml 19 | cat < esphome/secrets.yaml 20 | wifi_ssid: TestWifi 21 | wifi_password: TestWifiSecret 22 | EOF 23 | - name: "Build" 24 | uses: esphome/build-action@v1 25 | id: esphome-build 26 | with: 27 | yaml_file: esphome/clack.yaml 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # clack-reader-v3 2 | Esphome component for Clack WS1 softener with M5stack TOF sensor saltlevel detection 3 | 4 | Relay for control of the chlorinator module from Aqmos.nl / .de 5 | and Power measurement with ina219 6 | 7 | ## Versions / Branches 8 | main: Tof1 sensor (VL53L0X) code without measurement during brine option. 9 | 10 | tof1: Tof1 sensor (VL53L0X) code with measurement during brine option. 11 | 12 | tof2: Tof2 sensor (VL53L1X) code with measurement during brine option 13 | 14 | ## Installation 15 | A dutch installation manual is written by [ViezeVis](https://github.com/ViezeVisNL). Visit his [webpage](https://bashoogers.nl/2024/01/11/clack-reader-v3-instructie-installatie-home-assistant/) for the document. 16 | The englisch version, you can find [here](https://bashoogers.nl/2024/01/22/clack-reader-v3-en-installation-manual-home-assistant/) 17 | 18 | For installation of this module you need to open the clack cover, this can be achieved by gently pulling on the 2 clips on the side. 19 | 20 | Once open, there is just enough space on the right side inside the Clack for the Clack reader PCB, but the chlorinator PCB is designed to be on the bottom 21 | 22 | For the Distance sensor, first install the 4-wire cable through the hole were the power supply goes through, after that the wire of the power supply. 23 | The flex cable will not be in the way, when inserted first, instead of the other way around. 24 | 25 | Connecting the module: 26 | 27 | ### General 28 | The power brick/adapter from the clack module will go in the middle in the `power IN` 29 | A new small cable (provided to you) will go from `power OUT` to the clack head. (This should now power up again) 30 | 31 | Connect the cable with the 3 loose strands to the connector on the right side with the names `RLY1`, `COM` and `RLY2`. 32 | 33 | From here you have to make a choice: (it is one or the other) 34 | 35 | #### DP-SW 36 | This will enable you to start or postphone a regen of the wax cylinder. 37 | 38 | For this you have been supplied a 2 pin molex cable and can be connected only on their respective spots. 39 | 40 | #### Chlorinator 41 | This will enable you to measure the power used by the chlorinator, but also to turn the chlorinator off (This hopefully prolongs the lifespan of the titanium chlorine cell) 42 | 43 | For this you need to take the cable that is connected to the PCB of the chlorinator and connect it to the chlorinator port of your V3. The chlorinator will now remain off 44 | In order to turn it on you need to programm the V3 (the relais is NC or Normally Closed) 45 | 46 | ``` 47 | NOTE: 48 | In normal conditions this cell needs to be replaced once in a while: BE: 2 years max, NL: 3/4 years max. 49 | With this choice hopefully it will last longer. 50 | ``` 51 | 52 | ToDo: Add wire diagram 53 | 54 | 55 | ## Contact 56 | Purchase: alphonsuijtdehaag at gmail dot com, if you are interested in a PCB with wemos s3 mini 57 | 58 | Help: Please open a issue on this git project. 59 | 60 | [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ebbenberg) 61 | -------------------------------------------------------------------------------- /esphome/.clack-base.yaml: -------------------------------------------------------------------------------- 1 | # Basics 2 | esphome: 3 | name: ${name} 4 | on_boot: 5 | priority: 200 6 | then: 7 | - script.execute: on_boot 8 | 9 | # OTA: 10 | ota: 11 | platform: esphome 12 | 13 | # Enable Home Assistant API 14 | api: 15 | reboot_timeout: 0s 16 | services: 17 | - service: meterstand_clack 18 | variables: 19 | meter_value: float 20 | then: 21 | - globals.set: 22 | id: totalWaterUsage 23 | value: !lambda "return ( meter_value ) ;" 24 | - sensor.template.publish: 25 | id: clack_watermeter 26 | state: !lambda |- 27 | return id(totalWaterUsage); 28 | - sensor.template.publish: 29 | id: clack_m3_left 30 | state: !lambda |- 31 | return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; 32 | - sensor.template.publish: 33 | id: clack_l_left 34 | state: !lambda |- 35 | return int(id(clack_capacity_liters).state - id(clack_watermeter).state); 36 | 37 | globals: 38 | - id: totalWaterUsage 39 | type: float 40 | restore_value: yes 41 | initial_value: '00' 42 | 43 | # Define a global variable for the chlorinator delay duration in minutes 44 | - id: duration 45 | type: int 46 | restore_value: yes 47 | initial_value: '15' 48 | 49 | # Define a global variable for last regeneration time 50 | - id: regeneration_last 51 | type: std::string 52 | restore_value: yes 53 | initial_value: '"Never"' 54 | 55 | script: 56 | ### On reboot or powerloss of the esp, set the time left, last regeneration time, and capacity counters 57 | - id: on_boot 58 | then: 59 | - sensor.template.publish: 60 | id: clack_m3_left 61 | state: !lambda |- 62 | return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; 63 | - sensor.template.publish: 64 | id: clack_l_left 65 | state: !lambda |- 66 | return int(id(clack_capacity_liters).state - id(clack_watermeter).state); 67 | - text_sensor.template.publish: 68 | id: clack_regeneration_last 69 | state: !lambda |- 70 | return id(regeneration_last); 71 | - light.turn_on: 72 | id: led 73 | effect: slow_pulse 74 | red: 100% 75 | green: 60% 76 | blue: 0% 77 | - wait_until: 78 | condition: 79 | wifi.connected: 80 | - light.turn_on: 81 | id: led 82 | effect: pulse 83 | red: 0% 84 | green: 100% 85 | blue: 0% 86 | - wait_until: 87 | condition: 88 | api.connected: 89 | - light.turn_on: 90 | id: led 91 | effect: none 92 | red: 0% 93 | green: 100% 94 | blue: 0% 95 | - delay: 5s 96 | - light.turn_off: 97 | id: led 98 | 99 | ### Define a script that turns on the chlorinator relay, waits for the duration, and turns it off 100 | - id: chlorinator_start 101 | mode: restart 102 | then: 103 | - switch.turn_on: chlorinator_relay 104 | # Use a lambda expression to return the delay in milliseconds 105 | - delay: !lambda "return id(duration) * 60 * 1000;" 106 | - switch.turn_off: chlorinator_relay 107 | 108 | light: 109 | #G47=RGB WS2812C-2020 110 | - platform: esp32_rmt_led_strip 111 | name: ${name} Led 112 | id: led 113 | rgb_order: GRB 114 | pin: 47 115 | num_leds: 4 116 | # RMT 0 channels will be occupied by IR 117 | rmt_channel: 1 118 | chipset: ws2812 119 | restore_mode: ALWAYS_OFF 120 | 121 | ### ESP restart button 122 | button: 123 | - platform: restart 124 | id: restart_button 125 | name: ${name} ${clack_restart} 126 | 127 | #----------- 128 | #SENSORS 129 | #----------- 130 | sensor: 131 | ## 132 | # Power meter 133 | - platform: ina219 134 | address: 0x40 135 | shunt_resistance: 0.1 ohm 136 | current: 137 | name: ${name} Current 138 | power: 139 | name: ${name} Power 140 | filters: 141 | - delta: 0.05 142 | bus_voltage: 143 | name: ${name} Voltage 144 | shunt_voltage: 145 | name: ${name} Shunt Voltage 146 | max_voltage: 32.0V 147 | max_current: 3.2A 148 | update_interval: 5s 149 | 150 | - platform: vl53l0x 151 | id: distance_cm 152 | address: 0x29 153 | update_interval: ${salt_level_update_interval} 154 | long_range: false 155 | internal: false 156 | filters: 157 | - filter_out: nan 158 | - lambda: return x*100; 159 | ### comment with # if you want a direct reading 160 | - median: 161 | window_size: 15 162 | send_every: 7 163 | send_first_at: 1 164 | - delta: 0.5 165 | ### 166 | - clamp: 167 | min_value: 0.0 168 | max_value: 160.0 169 | on_value: 170 | then: 171 | - sensor.template.publish: 172 | id: clack_distance 173 | state: !lambda |- 174 | return id(distance_cm).state; 175 | 176 | ## 177 | # ultrasonic distance sensor. 178 | - platform: template 179 | name: ${name} ${clack_distance} 180 | id: clack_distance 181 | unit_of_measurement: cm 182 | accuracy_decimals: 1 183 | icon: "mdi:arrow-expand-vertical" 184 | device_class: distance 185 | state_class: measurement 186 | on_value: 187 | then: 188 | - sensor.template.publish: 189 | id: clack_procent 190 | state: !lambda |- 191 | const float max_distance = id(clack_saltlevel_height_max).state; // heigt in cm to lowest level 192 | const float min_distance = id(clack_saltlevel_height_min).state; // height in cm to highest level 193 | return int((1-((id(clack_distance).state - min_distance)/max_distance))*100); 194 | - sensor.template.publish: 195 | id: clack_height 196 | state: !lambda |- 197 | const float max_distance = id(clack_saltlevel_height_max).state; // height in cm to lowest level 198 | return max_distance-id(clack_distance).state; 199 | - text_sensor.template.publish: 200 | id: clack_fill_salt 201 | state: !lambda |- 202 | if (id(clack_height).state < id(clack_saltlevel_height_fill).state) { 203 | return {"${clack_yes}"}; 204 | } else { 205 | return {"${clack_no}"}; 206 | } 207 | 208 | ## 209 | # ultrasonic distance sensor calculate tank_percentage 210 | - platform: template 211 | id: clack_procent 212 | name: ${name} ${clack_procent} 213 | unit_of_measurement: "%" 214 | accuracy_decimals: 0 215 | icon: "mdi:percent-box-outline" 216 | update_interval: ${tank_percentage_update_interval} 217 | state_class: measurement 218 | filters: 219 | - lambda: |- 220 | if (x >= 100) return 100.0; 221 | else if (x <= 0.0) return 0.0; 222 | else return x; 223 | ## 224 | # Saltlevel animation picture on dashboard 225 | - platform: copy 226 | source_id: clack_procent 227 | id: clack_salt_level 228 | name: ${name} ${clack_animation} 229 | filters: 230 | - lambda: |- 231 | if (x >= 80) return 100; 232 | else if (x >= 65 && x <= 79) return 80; 233 | else if (x >= 40 && x <= 64) return 60; 234 | else if (x >= 20 && x <= 39) return 40; 235 | else if (x >= 10 && x <= 19) return 20; 236 | else if (x >= 5 && x <= 9) return 10; 237 | else if (x <= 4) return 0; 238 | else return x; 239 | 240 | ## 241 | # ultrasonic distance sensor calculate salt level from bottom 242 | - platform: template 243 | id: clack_height 244 | name: ${name} ${clack_height} 245 | unit_of_measurement: cm 246 | accuracy_decimals: 1 247 | icon: "mdi:hydraulic-oil-level" 248 | update_interval: ${clack_height_update_interval} 249 | device_class: distance 250 | state_class: measurement 251 | filters: 252 | - lambda: |- 253 | if (x >= 100) return 100.0; 254 | else if (x <= 0.0) return 0.0; 255 | else return x; 256 | 257 | #------ 258 | # CLACK 259 | #------ 260 | ## 261 | # Watermeter 262 | - platform: template 263 | id: clack_watermeter 264 | name: ${name} ${clack_watermeter_total} 265 | icon: mdi:water 266 | update_interval: ${watermeter_update_interval} 267 | unit_of_measurement: L 268 | device_class: water 269 | state_class: total_increasing 270 | accuracy_decimals: 1 271 | lambda: |- 272 | return id(totalWaterUsage); 273 | 274 | - platform: template 275 | id: clack_m3_left 276 | name: ${name} ${clack_m3_left} 277 | unit_of_measurement: m³ 278 | device_class: water 279 | state_class: total_increasing 280 | accuracy_decimals: 2 281 | update_interval: ${watermeter_update_interval} 282 | 283 | - platform: template 284 | id: clack_l_left 285 | name: ${name} ${clack_l_left} 286 | unit_of_measurement: L 287 | device_class: water 288 | state_class: total_increasing 289 | accuracy_decimals: 0 290 | update_interval: ${watermeter_update_interval} 291 | 292 | switch: 293 | ## 294 | # Chlorinator Relay 295 | - platform: gpio 296 | pin: 297 | number: 10 298 | inverted: false 299 | name: ${name} ${clack_chlorinator} 300 | id: chlorinator_relay 301 | icon: mdi:alarm-bell 302 | 303 | select: 304 | - id: clack_select_chl_or_dpsw 305 | name: ${name} ${clack_select_chl_or_dpsw} 306 | platform: template 307 | options: 308 | - ${clack_off} 309 | - ${clack_chlorinator} 310 | initial_option: ${clack_off} 311 | optimistic: true 312 | restore_value: true 313 | 314 | ## 315 | # Text sensors with general information. 316 | text_sensor: 317 | ## 318 | # Expose ESPHome version as sensor. 319 | - platform: version 320 | id: clack_version 321 | name: ${name} ${clack_version} 322 | hide_timestamp: true 323 | 324 | ## 325 | # Expose WiFi information as sensors. 326 | - platform: wifi_info 327 | ip_address: 328 | name: ${name} ${clack_ip} 329 | icon: mdi:ip-network 330 | 331 | ## 332 | # Textsensor "Fill Salt" yes or no. 333 | - platform: template 334 | name: ${name} ${clack_fill_salt} 335 | id: clack_fill_salt 336 | icon: mdi:basket-fill 337 | update_interval: never 338 | 339 | ## 340 | # imput numbers as sliders for setting the dimensions of the tank and level alarm. 341 | number: 342 | ## 343 | # Set minimum distance (from bottom sensor / above plastic cap) 344 | - platform: template 345 | id: clack_saltlevel_height_min 346 | name: ${name} ${clack_saltlevel_height_min} 347 | icon: mdi:toggle-switch-variant 348 | optimistic: true 349 | mode: slider 350 | step: 0.5 351 | entity_category: config 352 | min_value: 0 353 | max_value: 10 354 | initial_value: 0 355 | restore_value: yes 356 | unit_of_measurement: cm 357 | on_value: 358 | then: 359 | - sensor.template.publish: 360 | id: clack_procent 361 | state: !lambda |- 362 | const float max_distance = id(clack_saltlevel_height_max).state; // heigt in cm to lowest level 363 | const float min_distance = id(clack_saltlevel_height_min).state; // height in cm to highest level 364 | return int((1-((id(clack_distance).state - min_distance)/max_distance))*100); 365 | - sensor.template.publish: 366 | id: clack_height 367 | state: !lambda |- 368 | const float max_distance = id(clack_saltlevel_height_max).state; // height in cm to lowest level 369 | return max_distance-id(clack_distance).state; 370 | 371 | ## 372 | # Set maximum distance (from bottom sensor / underneath plastic cap) to water level (to measure in pipe?) 373 | - platform: template 374 | id: clack_saltlevel_height_max 375 | name: ${name} ${clack_saltlevel_height_max} 376 | icon: mdi:toggle-switch-variant-off 377 | optimistic: true 378 | mode: slider 379 | step: 0.5 380 | entity_category: config 381 | min_value: 0 382 | max_value: 100 383 | initial_value: 30 384 | restore_value: yes 385 | unit_of_measurement: cm 386 | on_value: 387 | then: 388 | - sensor.template.publish: 389 | id: clack_procent 390 | state: !lambda |- 391 | const float max_distance = id(clack_saltlevel_height_max).state; // heigt in cm to lowest level 392 | const float min_distance = id(clack_saltlevel_height_min).state; // height in cm to highest level 393 | return int((1-((id(clack_distance).state - min_distance)/max_distance))*100); 394 | - sensor.template.publish: 395 | id: clack_height 396 | state: !lambda |- 397 | const float max_distance = id(clack_saltlevel_height_max).state; // height in cm to lowest level 398 | return max_distance-id(clack_distance).state; 399 | ## 400 | # Set alarm level 401 | - platform: template 402 | id: clack_saltlevel_height_fill 403 | name: ${name} ${clack_saltlevel_height_fill} 404 | icon: mdi:hydraulic-oil-temperature 405 | optimistic: true 406 | mode: slider 407 | step: 0.1 408 | entity_category: config 409 | min_value: 0 410 | max_value: 10 411 | initial_value: 1.5 412 | restore_value: yes 413 | unit_of_measurement: cm 414 | update_interval: 600s 415 | on_value: 416 | then: 417 | - text_sensor.template.publish: 418 | id: clack_fill_salt 419 | state: !lambda |- 420 | if (id(clack_height).state < id(clack_saltlevel_height_fill).state) { 421 | return {"${clack_yes}"}; 422 | } else { 423 | return {"${clack_no}"}; 424 | } 425 | ## 426 | # Set capacity liters 427 | - platform: template 428 | id: clack_capacity_liters 429 | name: ${name} ${clack_capacity_liters} 430 | icon: mdi:water-opacity 431 | optimistic: true 432 | mode: slider 433 | step: 50 434 | entity_category: config 435 | min_value: 0 436 | max_value: 12000 437 | initial_value: 3200 438 | restore_value: yes 439 | unit_of_measurement: L 440 | on_value: 441 | then: 442 | - sensor.template.publish: 443 | id: clack_watermeter 444 | state: !lambda |- 445 | return id(totalWaterUsage); 446 | - sensor.template.publish: 447 | id: clack_m3_left 448 | state: !lambda |- 449 | return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; 450 | - sensor.template.publish: 451 | id: clack_l_left 452 | state: !lambda |- 453 | return int(id(clack_capacity_liters).state - id(clack_watermeter).state); 454 | ## 455 | # Set capacity days 456 | - platform: template 457 | id: clack_capacity_days 458 | name: ${name} ${clack_capacity_days} 459 | icon: mdi:calendar-clock 460 | optimistic: true 461 | mode: slider 462 | step: 1 463 | entity_category: config 464 | min_value: 0 465 | max_value: 21 466 | initial_value: 10 467 | restore_value: yes 468 | unit_of_measurement: ${days} 469 | ## 470 | # Set chlorinator relay off-delay 471 | - platform: template 472 | id: clack_chlorinator_delay 473 | name: ${name} ${clack_chlorinator_delay} 474 | icon: mdi:toggle-switch-variant 475 | optimistic: true 476 | mode: slider 477 | step: 1 478 | entity_category: config 479 | min_value: 0 480 | max_value: 35 481 | initial_value: 10 482 | restore_value: yes 483 | unit_of_measurement: "min" 484 | on_value: 485 | then: 486 | - globals.set: 487 | id: duration 488 | value: !lambda 'return int(x);' 489 | -------------------------------------------------------------------------------- /esphome/.clack-labels-en.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | clack_select_chl_or_dpsw: Function mode 3 | clack_distance: Salt level distance 4 | clack_procent: Salt level percent 5 | clack_animation: Salt level for dashboard 6 | clack_height: Salt level height 7 | clack_watermeter_total: Water meter 8 | clack_m3_left: Water softener m3 left 9 | clack_l_left: Water softener ltr left 10 | clack_version: Version 11 | clack_regeneration_last: Regenerated on 12 | clack_fill_salt: Fill salt 13 | clack_saltlevel_height_min: Min salt distance 14 | clack_saltlevel_height_max: Max salt distance 15 | clack_saltlevel_height_fill: Fill salt distance 16 | clack_capacity_liters: Capacity in liters 17 | clack_capacity_days: Capacity in days 18 | clack_chlorinator_delay: Chlorinator active time 19 | clack_watermeter_pulse: Watermeter pulse 20 | clack_regeneration_pulse: Regeneration pulse 21 | clack_ip: Water softener IP 22 | clack_wifi_signal_db: WiFi Signal dB 23 | clack_wifi_signal_db_percent: WiFi Signal 24 | clack_uptime: Uptime 25 | clack_chlorinator: Chlorinator 26 | clack_select_salt_measurement: Salt measurement 27 | clack_measure_always: Always 28 | clack_measure_during_brine: Only during brine 29 | clack_salt_measurent_in_brine_delay: Delay measure salt brine 30 | hours: hours 31 | days: days 32 | clack_yes: "yes" 33 | clack_no: "no" 34 | clack_on: "On" 35 | clack_off: "Off" 36 | clack_power: Power 37 | clack_current: Current 38 | clack_voltage: Voltage 39 | clack_shunt_voltage: Voltage 40 | clack_restart: ESP Restart 41 | 42 | text_sensor: 43 | # Expose last regeneration information as sensor / already in English 44 | - platform: template 45 | name: ${name} ${clack_regeneration_last} 46 | id: clack_regeneration_last 47 | icon: mdi:clock-start 48 | update_interval: never 49 | lambda: |- 50 | return id(regeneration_last); 51 | -------------------------------------------------------------------------------- /esphome/.clack-labels-nl.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | clack_select_chl_or_dpsw: Functie mode 3 | clack_distance: Zoutniveau afstand 4 | clack_procent: Zoutniveau procent 5 | clack_animation: Zoutniveau voor dashboard 6 | clack_height: Zoutniveau hoogte 7 | clack_watermeter_total: Watermeter 8 | clack_m3_left: Waterontharder m3 over 9 | clack_l_left: Waterontharder ltr over 10 | clack_version: Versie 11 | clack_regeneration_last: Geregenereerd op 12 | clack_fill_salt: Zout bijvullen 13 | clack_saltlevel_height_min: Min afstand zout 14 | clack_saltlevel_height_max: Max afstand zout 15 | clack_saltlevel_height_fill: Zout bijvullen afstand 16 | clack_capacity_liters: Capaciteit in liters 17 | clack_capacity_days: Capaciteit in dagen 18 | clack_chlorinator_delay: Chlorinator aktief tijd 19 | clack_watermeter_pulse: Watermeter pulse 20 | clack_regeneration_pulse: Regeneratie pulse 21 | clack_ip: Waterontharder IP 22 | clack_wifi_signal_db: WiFi Signaal dB 23 | clack_wifi_signal_db_percent: WiFi Signaal 24 | clack_uptime: Uptime 25 | clack_chlorinator: Chlorinator 26 | clack_select_salt_measurement: Zout niveau meting 27 | clack_measure_always: Altijd 28 | clack_measure_during_brine: Alleen na bezouting 29 | hours: uur 30 | days: dagen 31 | clack_yes: ja 32 | clack_no: nee 33 | clack_on: Aan 34 | clack_off: Uit 35 | clack_power: Vermogen 36 | clack_current: Stroom 37 | clack_voltage: Spanning 38 | clack_shunt_voltage: Shunt spanning 39 | clack_restart: ESP Herstart 40 | 41 | text_sensor: 42 | # Expose last regeneration information as sensor 43 | - platform: template 44 | name: ${name} ${clack_regeneration_last} 45 | id: clack_regeneration_last 46 | icon: mdi:clock-start 47 | update_interval: never 48 | lambda: |- 49 | return id(regeneration_last); 50 | filters: 51 | - substitute: 52 | - "Jan -> jan" 53 | - "Feb -> feb" 54 | - "Mar -> mar" 55 | - "Apr -> apr" 56 | - "May -> mei" 57 | - "Jun -> jun" 58 | - "Jul -> jul" 59 | - "Aug -> aug" 60 | - "Sep -> sep" 61 | - "Okt -> okt" 62 | - "Nov -> nov" 63 | - "Dec -> dec" 64 | - "Mon -> maa" 65 | - "Tue -> din" 66 | - "Wed -> woe" 67 | - "Thu -> don" 68 | - "Fri -> vri" 69 | - "Sat -> zat" 70 | - "Sun -> zon" 71 | -------------------------------------------------------------------------------- /esphome/.clack-optional.yaml: -------------------------------------------------------------------------------- 1 | #----------- 2 | # SENSORS 3 | #----------- 4 | sensor: 5 | ## 6 | # Diagnostics wifi and uptime 7 | - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB 8 | id: clack_wifi_signal_db 9 | name: ${name} WiFi Signal dB 10 | update_interval: 60s 11 | device_class: signal_strength 12 | entity_category: diagnostic 13 | 14 | - platform: copy # Reports the WiFi signal strength in % 15 | source_id: clack_wifi_signal_db 16 | id: clack_wifi_signal_db_percent 17 | name: ${name} WiFi Signal 18 | filters: 19 | - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); 20 | unit_of_measurement: "%" 21 | entity_category: diagnostic 22 | 23 | - platform: uptime 24 | id: clack_uptime 25 | name: ${name} ${clack_uptime} 26 | unit_of_measurement: ${days} 27 | update_interval: 3600s 28 | accuracy_decimals: 1 29 | filters: 30 | - multiply: 0.000011574 -------------------------------------------------------------------------------- /esphome/board-esp32-wemos-s3.yaml: -------------------------------------------------------------------------------- 1 | ### ESP32S3 used is a wemos s3 mini 2 | 3 | esp32: 4 | board: lolin_s3 5 | variant: esp32s3 6 | framework: 7 | type: arduino 8 | # version: latest 9 | flash_size: 4MB 10 | 11 | # the m5stack TOF sensor vl53l0x is I2C 12 | i2c: 13 | - id: bus_a 14 | sda: 35 #21 ##35 of #2 op lolin s3? 15 | scl: 36 #22 ##36 of #4 op lolin s3? 16 | scan: true 17 | 18 | # get rid of CDC error 19 | esphome: 20 | platformio_options: 21 | board_build.arduino.memory_type: qio_qspi 22 | board_upload.ram_size: 327680 23 | board_upload_maximum_size: 4193404 24 | board_upload_speed: 460800 25 | build_flags: [ 26 | "-DBOARD_HAS_PSRAM", 27 | "-DARDUINO_LOLIN_S3_MINI", 28 | "-DARDUINO_USB_MODE=1"] 29 | # board_build.extra_flags: 30 | # - "-DARDUINO_USB_CDC_ON_BOOT=0" # Override, defaults to '-DARDUINO_USB_CDC_ON_BOOT=1' 31 | 32 | # Enable/Disable logging 33 | logger: 34 | logs: 35 | esp32.preferences: WARN 36 | sensor: WARN 37 | text_sensor: WARN 38 | switch: WARN 39 | button: WARN 40 | number: WARN 41 | # baud_rate: 0 # <--- super important! for ESP8266 42 | 43 | wifi: 44 | ap: 45 | ssid: "${name}" 46 | password: "configesp" 47 | 48 | # enable IMPROV wifi, connection hotspot via bluetooth. see https://www.improv-wifi.com/ 49 | esp32_improv: 50 | authorizer: None 51 | 52 | captive_portal: 53 | 54 | # Enable Web server. 55 | web_server: 56 | port: 80 57 | 58 | ## watermeter pulse / relay 1 59 | binary_sensor: 60 | - platform: gpio 61 | pin: 62 | number: 16 # wemos s3 mini: 16, lilygo ESP32S3 T7-S3: 12-1, mh-et-live: 16, wemos d1 mini -D4 63 | inverted: true 64 | mode: 65 | input: true 66 | pullup: true 67 | id: clack_watermeter_pulse 68 | name: ${name} ${clack_watermeter_pulse} 69 | # icon: mdi:toggle-switch-variant 70 | filters: 71 | - delayed_on_off: 50ms 72 | on_press: 73 | then: 74 | - sensor.template.publish: 75 | id: clack_watermeter 76 | state: !lambda |- 77 | return id(totalWaterUsage) += float(${pulse_liters}); 78 | - sensor.template.publish: 79 | id: clack_m3_left 80 | state: !lambda |- 81 | return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; 82 | - sensor.template.publish: 83 | id: clack_l_left 84 | state: !lambda |- 85 | return int(id(clack_capacity_liters).state - id(clack_watermeter).state); 86 | 87 | ## regeneration pulse / relay 2 88 | - platform: gpio 89 | pin: 90 | number: 12 # wemos s3 mini: 12, lilygo ESP32S3 T7-S3: 18, mh-et-live: 18, wemos d1 mini -D5 91 | inverted: true 92 | mode: 93 | input: true 94 | pullup: true 95 | id: clack_regeneration_pulse 96 | name: ${name} ${clack_regeneration_pulse} 97 | # icon: mdi:toggle-switch-variant 98 | filters: 99 | - delayed_on_off: 800ms 100 | on_press: 101 | then: 102 | - globals.set: 103 | id: totalWaterUsage 104 | value: '00' 105 | - text_sensor.template.publish: 106 | id: clack_regeneration_last 107 | state: !lambda |- 108 | char str[32]; 109 | time_t currTime = id(clack_sntp_time).now().timestamp; 110 | strftime(str, sizeof(str), "%a %d %b %H:%M", localtime(&currTime)); 111 | id(regeneration_last) = str; 112 | return { str }; 113 | - sensor.template.publish: 114 | id: clack_watermeter 115 | state: !lambda |- 116 | return id(totalWaterUsage); 117 | - sensor.template.publish: 118 | id: clack_m3_left 119 | state: !lambda |- 120 | return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; 121 | - sensor.template.publish: 122 | id: clack_l_left 123 | state: !lambda |- 124 | return int(id(clack_capacity_liters).state - id(clack_watermeter).state); 125 | - if: 126 | condition: 127 | - lambda: 'return id(clack_select_chl_or_dpsw).state == "Chlorinator";' 128 | then: 129 | - script.execute: chlorinator_start 130 | 131 | button: 132 | ## temporary test button for testing water meter pulse 133 | - id: clack_use_test_button 134 | name: ${name} Test button use pulse 135 | platform: template 136 | on_press: 137 | then: 138 | - sensor.template.publish: 139 | id: clack_watermeter 140 | state: !lambda |- 141 | return id(totalWaterUsage) += float(${pulse_liters}); 142 | - sensor.template.publish: 143 | id: clack_m3_left 144 | state: !lambda |- 145 | return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; 146 | - sensor.template.publish: 147 | id: clack_l_left 148 | state: !lambda |- 149 | return int(id(clack_capacity_liters).state - id(clack_watermeter).state); 150 | - lambda: |- 151 | ESP_LOGI("UseTest", "Use button pressed"); 152 | 153 | ## temporary test button for testing regeneration pulse 154 | - id: clack_reg_test_button 155 | name: ${name} Test button regen pulse 156 | platform: template 157 | on_press: 158 | then: 159 | - globals.set: 160 | id: totalWaterUsage 161 | value: '00' 162 | - text_sensor.template.publish: 163 | id: clack_regeneration_last 164 | state: !lambda |- 165 | char str[32]; 166 | time_t currTime = id(clack_sntp_time).now().timestamp; 167 | strftime(str, sizeof(str), "%a %d %b %H:%M", localtime(&currTime)); 168 | id(regeneration_last) = str; 169 | return { str }; 170 | - sensor.template.publish: 171 | id: clack_watermeter 172 | state: !lambda |- 173 | return id(totalWaterUsage); 174 | - sensor.template.publish: 175 | id: clack_m3_left 176 | state: !lambda |- 177 | return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; 178 | - sensor.template.publish: 179 | id: clack_l_left 180 | state: !lambda |- 181 | return int(id(clack_capacity_liters).state - id(clack_watermeter).state); 182 | - lambda: |- 183 | ESP_LOGI("RegTest", "Regeneration button pressed"); 184 | - if: 185 | condition: 186 | - lambda: 'return id(clack_select_chl_or_dpsw).state == "Chlorinator";' 187 | then: 188 | - script.execute: chlorinator_start 189 | -------------------------------------------------------------------------------- /esphome/clack.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | # General substitutions: 3 | name: clack 4 | device_description: "Esphome component for Clack WS1 softener with TOF sensor saltlevel detection" 5 | timezone: "Europe/Amsterdam" 6 | # Interval substitutions: 7 | salt_level_update_interval: 30s 8 | watermeter_update_interval: 600s # 10 minutes 9 | tank_percentage_update_interval: 600s 10 | clack_height_update_interval: 600s 11 | pulse_liters: "2.18" 12 | 13 | # In order to use other language fix clack-label filename below: 14 | # Currently supported languages are en (english), nl (dutch). 15 | # ESP32-wemos-s3 is a wemos lolin S3 mini 16 | packages: 17 | remote_package: 18 | url: https://github.com/fonske/clack-reader-v3 19 | ref: main 20 | refresh: 0s 21 | files: [ 22 | esphome/.clack-base.yaml, 23 | esphome/.clack-optional.yaml, 24 | esphome/.clack-labels-en.yaml, 25 | esphome/board-esp32-wemos-s3.yaml 26 | ] 27 | 28 | ## for developing/testing, uncomment local includes and comment out above remote_package packages part. 29 | #packages: 30 | # substitutions: !include .clack-labels-en.yaml 31 | # substitutions: !include .clack-labels-nl.yaml 32 | # device_base1: !include board-esp32-wemos-s3.yaml 33 | 34 | time: 35 | - platform: sntp 36 | id: clack_sntp_time 37 | timezone: ${timezone} 38 | # Enable this with your own NTP server if your device is on a no internet IOT lan. 39 | #servers: 192.168.X.X 40 | 41 | wifi: 42 | ssid: !secret wifi_ssid 43 | password: !secret wifi_password 44 | fast_connect: true 45 | # Enable fallback hotspot (captive portal) in case wifi connection fails 46 | ap: 47 | ssid: "${name}" 48 | password: "configesp" 49 | ap_timeout: 15s 50 | -------------------------------------------------------------------------------- /esphome/secrets.yaml: -------------------------------------------------------------------------------- 1 | # Your Wi-Fi SSID and password 2 | wifi_ssid: "TestWifi" 3 | wifi_password: "TestWifiSecret" 4 | -------------------------------------------------------------------------------- /home_assistant/clack_en.yaml: -------------------------------------------------------------------------------- 1 | #------------ 2 | #INPUT SELECT 3 | #------------ 4 | # Remark: The step second backwash, between Brine and Rinse is removed 5 | # Removing this step reduces the amount of wastewater en is probably not necessary for the performance of the softener 6 | # This can be setup in the clack menus. See manual. 7 | input_select: 8 | clack_water_softener_status: 9 | name: Water softener status 10 | options: 11 | - Backwash 12 | - Brine 13 | - Rinse 14 | - Fill 15 | - Idle 16 | initial: Idle 17 | 18 | #----------- 19 | #TIMERS 20 | #----------- 21 | # Remark: change the timer settings, upon your own timing (measure time with stopwatch on the complet regen. cycle) 22 | timer: 23 | timer_ws_backwash: 24 | name: Backwash 25 | # duration: '0:00:57' 26 | duration: '0:00:10' 27 | 28 | timer_ws_brine: 29 | name: Brine 30 | # duration: '0:01:07' 31 | duration: '0:00:10' 32 | 33 | timer_ws_rinse: 34 | name: Rinse 35 | # duration: '0:01:14' 36 | duration: '0:00:10' 37 | 38 | timer_ws_fill: 39 | name: Fill 40 | # duration: '0:01:10' 41 | duration: '0:00:10' 42 | 43 | timer_ws_total: #sum of all above values 44 | name: Total 45 | # duration: '0:05:44' 46 | duration: '0:00:40' 47 | 48 | #----------- 49 | #SENSORS 50 | #----------- 51 | template: 52 | sensor: 53 | - name: "time_to_regeneration" # custom sensor that calculates the expected number of days till the next regeneration 54 | state: > 55 | {%- set time = (states('number.clack_capacity_in_days') | int * 86400) - (as_timestamp(now()) - as_timestamp((strptime(states('sensor.clack_regenerated_on')[4:15], '%d %b %H:%M').replace(year=now().year)))) | int %} 56 | {%- set hours = ((time % 86400) // 3600) %} 57 | {%- set hours = '{}h '.format(hours) if hours > 0 else '' %} 58 | {%- set days = (time // 86400) %} 59 | {%- set days = '{}d '.format(days) if days > 0 else '' %} 60 | {{days + hours}} 61 | unique_id: "time_to_regeneration" 62 | icon: mdi:calendar-clock 63 | 64 | #----------- 65 | #UTILITY METER 66 | #----------- 67 | utility_meter: 68 | clack_waterusage_this_quarter: 69 | source: sensor.clack_water_meter 70 | cycle: quarter-hourly 71 | clack_waterusage_this_hour: 72 | source: sensor.clack_water_meter 73 | cycle: hourly 74 | clack_waterusage_today: 75 | source: sensor.clack_water_meter 76 | cycle: daily 77 | clack_waterusage_this_month: 78 | source: sensor.clack_water_meter 79 | cycle: monthly 80 | clack_waterusage_this_year: 81 | source: sensor.clack_water_meter 82 | cycle: yearly 83 | 84 | automation: 85 | #################################################### 86 | - id: set_water_softener_start_backwash 87 | alias: Set water softener start Backwash 88 | trigger: 89 | - platform: state 90 | entity_id: 91 | - binary_sensor.clack_regeneration_pulse 92 | to: 'on' 93 | - platform: state 94 | entity_id: button.clack_test_button_regen_pulse 95 | condition: 96 | - condition: and 97 | conditions: 98 | - condition: state 99 | entity_id: input_select.clack_water_softener_status 100 | state: Idle 101 | action: 102 | - service: input_select.select_option 103 | data: 104 | entity_id: input_select.clack_water_softener_status 105 | option: Backwash 106 | - service: timer.start 107 | entity_id: timer.timer_ws_backwash 108 | - service: timer.start 109 | entity_id: timer.timer_ws_total 110 | initial_state: true 111 | #################################################### 112 | - id: set_water_softener_start_brine 113 | alias: Set water softener start Brine 114 | trigger: 115 | - platform: event 116 | event_type: timer.finished 117 | event_data: 118 | entity_id: timer.timer_ws_backwash 119 | condition: 120 | - condition: and 121 | conditions: 122 | - condition: state 123 | entity_id: input_select.clack_water_softener_status 124 | state: Backwash 125 | action: 126 | - service: input_select.select_option 127 | data: 128 | entity_id: input_select.clack_water_softener_status 129 | option: Brine 130 | - service: timer.start 131 | entity_id: timer.timer_ws_brine 132 | initial_state: true 133 | #################################################### 134 | - id: set_water_softener_start_rinse 135 | alias: Set water softener start Rinse 136 | trigger: 137 | - platform: event 138 | event_type: timer.finished 139 | event_data: 140 | entity_id: timer.timer_ws_brine 141 | condition: 142 | - condition: and 143 | conditions: 144 | - condition: state 145 | entity_id: input_select.clack_water_softener_status 146 | state: Brine 147 | action: 148 | - service: input_select.select_option 149 | data: 150 | entity_id: input_select.clack_water_softener_status 151 | option: Rinse 152 | - service: timer.start 153 | entity_id: timer.timer_ws_rinse 154 | initial_state: true 155 | #################################################### 156 | - id: set_water_softener_start_fill 157 | alias: Set water softener start Fill 158 | trigger: 159 | - platform: event 160 | event_type: timer.finished 161 | event_data: 162 | entity_id: timer.timer_ws_rinse 163 | condition: 164 | - condition: and 165 | conditions: 166 | - condition: state 167 | entity_id: input_select.clack_water_softener_status 168 | state: Rinse 169 | action: 170 | - service: input_select.select_option 171 | data: 172 | entity_id: input_select.clack_water_softener_status 173 | option: Fill 174 | - service: timer.start 175 | entity_id: timer.timer_ws_fill 176 | initial_state: true 177 | #################################################### 178 | - id: set_water_softener_idle 179 | alias: Set water softener Idle 180 | trigger: 181 | - platform: event 182 | event_type: timer.finished 183 | event_data: 184 | entity_id: timer.timer_ws_fill 185 | condition: 186 | - condition: and 187 | conditions: 188 | - condition: state 189 | entity_id: input_select.clack_water_softener_status 190 | state: Fill 191 | action: 192 | - service: input_select.select_option 193 | data: 194 | entity_id: input_select.clack_water_softener_status 195 | option: Idle 196 | - service: esphome.clack_meterstand_clack 197 | data: 198 | meter_value: 0 199 | - service: input_number.set_value 200 | data_template: 201 | entity_id: input_number.clack_water_softener_meter_liters 202 | value: 0 203 | initial_state: true 204 | #------------------------------------------------------------------ 205 | # Extra options: Salt level alarm and hardness measurement alarm. 206 | # Fill in your own mobile_app_iphone_van_xxx in. (as an example) 207 | #------------------------------------------------------------------ 208 | - id: salt_level_alarm_notify 209 | alias: Salt level alarm notify 210 | description: '' 211 | trigger: 212 | - platform: state 213 | entity_id: sensor.clack_fill_salt 214 | to: "yes" 215 | condition: 216 | - condition: time 217 | after: 07:30:00 218 | before: '22:00:00' 219 | action: 220 | - service: notify.mobile_app_iphone_van_a_c_a 221 | data: 222 | title: Be aware! 223 | message: Salt level watersoftener is low! Fill salt today! 224 | data: 225 | push: 226 | sound: 227 | name: default 228 | critical: 1 229 | volume: 1 230 | - delay: 231 | minutes: 30 232 | initial_state: 'true' 233 | mode: single 234 | #################################################### 235 | - id: measure_hardness_notify 236 | alias: Measure Hardness 237 | description: '' 238 | trigger: 239 | - platform: numeric_state 240 | entity_id: 241 | - sensor.clack_watermeter 242 | above: 3000 243 | condition: 244 | - condition: time 245 | after: 07:30:00 246 | before: '22:00:00' 247 | action: 248 | - service: notify.mobile_app_iphone_van_a_c_a 249 | data: 250 | title: Be aware! 251 | message: 'Measure hardness softener: used 3000 ltr' 252 | data: 253 | push: 254 | sound: 255 | name: default 256 | critical: 1 257 | volume: 1 258 | - delay: 259 | minutes: 30 260 | mode: single 261 | initial_state: 'true' 262 | -------------------------------------------------------------------------------- /home_assistant/clack_en_1_rly_extra_code.yaml: -------------------------------------------------------------------------------- 1 | #----------- 2 | # EXTRA CODE FOR CLACK VERSION WITH ONLY 1 RELAY TERMINAL FOR (10?) LITER PULSE 3 | # USE THIS TIMER AND AUTOMATION ONLY ON A CLACK WITHOUT RLY2 FOR REPLACEMENT OF THE REGENERATION PULSE!!! 4 | # IT IS BASED ON THE POWER CONSUMPTION OF THE CAM MOTOR RUNNING. > 1.5 WATT POWER CONSUMPTION = REGENERATION 5 | #----------- 6 | timer: 7 | timer_alt_regeneration_pulse: 8 | name: Delay 9 | 10 | automation: 11 | #----------- 12 | #USE THIS AUTOMATION ONLY ON A CLACK WITHOUT RLY2 FOR REGENERATION PULSE!!! 13 | #----------- 14 | - id: set_reg_pulse_by_cammotor 15 | alias: Regenerationpulse based on cammotor power detection 16 | description: Regenerationpulse based on cammotor power detection 17 | trigger: 18 | - platform: numeric_state 19 | entity_id: 20 | - sensor.clack_power 21 | above: 1.5 22 | condition: 23 | - condition: and 24 | conditions: [] 25 | - condition: state 26 | entity_id: timer.timer_alt_regeneration_pulse 27 | state: idle 28 | action: 29 | - service: button.press 30 | metadata: {} 31 | data: {} 32 | target: 33 | entity_id: button.clack_test_button_regen_pulse 34 | - service: timer.start 35 | data: 36 | duration: 0:59:00 37 | target: 38 | entity_id: timer.timer_alt_regeneration_pulse 39 | initial_state: true 40 | mode: single -------------------------------------------------------------------------------- /home_assistant/clack_en_backwash2.yaml: -------------------------------------------------------------------------------- 1 | #------------ 2 | #INPUT SELECT 3 | #------------ 4 | # 5 | # 6 | # 7 | input_select: 8 | clack_water_softener_status: 9 | name: Water softener status 10 | options: 11 | - Backwash 12 | - Brine 13 | - Backwash2 14 | - Rinse 15 | - Fill 16 | - Idle 17 | initial: Idle 18 | 19 | #----------- 20 | #TIMERS 21 | #----------- 22 | # Remark: change the timer settings, upon your own timing (measure time with stopwatch on the complet regen. cycle) 23 | timer: 24 | timer_ws_backwash: 25 | name: Backwash 26 | # duration: '0:00:57' 27 | duration: '0:00:10' 28 | 29 | timer_ws_brine: 30 | name: Brine 31 | # duration: '0:01:07' 32 | duration: '0:00:10' 33 | 34 | timer_ws_backwash2: 35 | name: Backwash2 36 | # duration: '0:00:57' 37 | duration: '0:00:10' 38 | 39 | timer_ws_rinse: 40 | name: Rinse 41 | # duration: '0:01:14' 42 | duration: '0:00:10' 43 | 44 | timer_ws_fill: 45 | name: Fill 46 | # duration: '0:01:10' 47 | duration: '0:00:10' 48 | 49 | timer_ws_total: #sum of all above values 50 | name: Total 51 | # duration: '0:05:44' 52 | duration: '0:00:50' 53 | 54 | #----------- 55 | #SENSORS 56 | #----------- 57 | template: 58 | sensor: 59 | - name: "time_to_regeneration" # custom sensor that calculates the expected number of days till the next regeneration 60 | state: > 61 | {%- set time = (states('number.clack_capacity_in_days') | int * 86400) - (as_timestamp(now()) - as_timestamp((strptime(states('sensor.clack_regenerated_on')[4:15], '%d %b %H:%M').replace(year=now().year)))) | int %} 62 | {%- set hours = ((time % 86400) // 3600) %} 63 | {%- set hours = '{}h '.format(hours) if hours > 0 else '' %} 64 | {%- set days = (time // 86400) %} 65 | {%- set days = '{}d '.format(days) if days > 0 else '' %} 66 | {{days + hours}} 67 | unique_id: "time_to_regeneration" 68 | icon: mdi:calendar-clock 69 | 70 | #----------- 71 | #UTILITY METER 72 | #----------- 73 | utility_meter: 74 | clack_waterusage_this_quarter: 75 | source: sensor.clack_water_meter 76 | cycle: quarter-hourly 77 | clack_waterusage_this_hour: 78 | source: sensor.clack_water_meter 79 | cycle: hourly 80 | clack_waterusage_today: 81 | source: sensor.clack_water_meter 82 | cycle: daily 83 | clack_waterusage_this_month: 84 | source: sensor.clack_water_meter 85 | cycle: monthly 86 | clack_waterusage_this_year: 87 | source: sensor.clack_water_meter 88 | cycle: yearly 89 | 90 | automation: 91 | #################################################### 92 | - id: set_water_softener_start_backwash 93 | alias: Set water softener start Backwash 94 | trigger: 95 | - platform: state 96 | entity_id: 97 | - binary_sensor.clack_regeneration_pulse 98 | to: 'on' 99 | - platform: state 100 | entity_id: button.clack_test_button_regen_pulse 101 | condition: 102 | - condition: and 103 | conditions: 104 | - condition: state 105 | entity_id: input_select.clack_water_softener_status 106 | state: Idle 107 | action: 108 | - service: input_select.select_option 109 | data: 110 | entity_id: input_select.clack_water_softener_status 111 | option: Backwash 112 | - service: timer.start 113 | entity_id: timer.timer_ws_backwash 114 | - service: timer.start 115 | entity_id: timer.timer_ws_total 116 | initial_state: true 117 | #################################################### 118 | - id: set_water_softener_start_brine 119 | alias: Set water softener start Brine 120 | trigger: 121 | - platform: event 122 | event_type: timer.finished 123 | event_data: 124 | entity_id: timer.timer_ws_backwash 125 | condition: 126 | - condition: and 127 | conditions: 128 | - condition: state 129 | entity_id: input_select.clack_water_softener_status 130 | state: Backwash 131 | action: 132 | - service: input_select.select_option 133 | data: 134 | entity_id: input_select.clack_water_softener_status 135 | option: Brine 136 | - service: timer.start 137 | entity_id: timer.timer_ws_brine 138 | initial_state: true 139 | #################################################### 140 | - id: set_water_softener_start_backwash2 141 | alias: Set water softener start Backwash2 142 | trigger: 143 | - platform: event 144 | event_type: timer.finished 145 | event_data: 146 | entity_id: timer.timer_ws_brine 147 | condition: 148 | - condition: and 149 | conditions: 150 | - condition: state 151 | entity_id: input_select.clack_water_softener_status 152 | state: Brine 153 | action: 154 | - service: input_select.select_option 155 | data: 156 | entity_id: input_select.clack_water_softener_status 157 | option: Backwash2 158 | - service: timer.start 159 | entity_id: timer.timer_ws_backwash2 160 | initial_state: true 161 | #################################################### 162 | - id: set_water_softener_start_rinse 163 | alias: Set water softener start Rinse 164 | trigger: 165 | - platform: event 166 | event_type: timer.finished 167 | event_data: 168 | entity_id: timer.timer_ws_backwash2 169 | condition: 170 | - condition: and 171 | conditions: 172 | - condition: state 173 | entity_id: input_select.clack_water_softener_status 174 | state: Backwash2 175 | action: 176 | - service: input_select.select_option 177 | data: 178 | entity_id: input_select.clack_water_softener_status 179 | option: Rinse 180 | - service: timer.start 181 | entity_id: timer.timer_ws_rinse 182 | initial_state: true 183 | #################################################### 184 | - id: set_water_softener_start_fill 185 | alias: Set water softener start Fill 186 | trigger: 187 | - platform: event 188 | event_type: timer.finished 189 | event_data: 190 | entity_id: timer.timer_ws_rinse 191 | condition: 192 | - condition: and 193 | conditions: 194 | - condition: state 195 | entity_id: input_select.clack_water_softener_status 196 | state: Rinse 197 | action: 198 | - service: input_select.select_option 199 | data: 200 | entity_id: input_select.clack_water_softener_status 201 | option: Fill 202 | - service: timer.start 203 | entity_id: timer.timer_ws_fill 204 | initial_state: true 205 | #################################################### 206 | - id: set_water_softener_idle 207 | alias: Set water softener Idle 208 | trigger: 209 | - platform: event 210 | event_type: timer.finished 211 | event_data: 212 | entity_id: timer.timer_ws_fill 213 | condition: 214 | - condition: and 215 | conditions: 216 | - condition: state 217 | entity_id: input_select.clack_water_softener_status 218 | state: Fill 219 | action: 220 | - service: input_select.select_option 221 | data: 222 | entity_id: input_select.clack_water_softener_status 223 | option: Idle 224 | - service: esphome.clack_meterstand_clack 225 | data: 226 | meter_value: 0 227 | - service: input_number.set_value 228 | data_template: 229 | entity_id: input_number.clack_water_softener_meter_liters 230 | value: 0 231 | initial_state: true 232 | #------------------------------------------------------------------ 233 | # Extra options: Salt level alarm and hardness measurement alarm. 234 | # Fill in your own mobile_app_iphone_van_xxx in. (as an example) 235 | #------------------------------------------------------------------ 236 | - id: salt_level_alarm_notify 237 | alias: Salt level alarm notify 238 | description: '' 239 | trigger: 240 | - platform: state 241 | entity_id: sensor.clack_fill_salt 242 | to: "yes" 243 | condition: 244 | - condition: time 245 | after: 07:30:00 246 | before: '22:00:00' 247 | action: 248 | - service: notify.mobile_app_iphone_van_a_c_a 249 | data: 250 | title: Be aware! 251 | message: Salt level watersoftener is low! Fill salt today! 252 | data: 253 | push: 254 | sound: 255 | name: default 256 | critical: 1 257 | volume: 1 258 | - delay: 259 | minutes: 30 260 | initial_state: 'true' 261 | mode: single 262 | #################################################### 263 | - id: measure_hardness_notify 264 | alias: Measure Hardness 265 | description: '' 266 | trigger: 267 | - platform: numeric_state 268 | entity_id: 269 | - sensor.clack_watermeter 270 | above: 3000 271 | condition: 272 | - condition: time 273 | after: 07:30:00 274 | before: '22:00:00' 275 | action: 276 | - service: notify.mobile_app_iphone_van_a_c_a 277 | data: 278 | title: Be aware! 279 | message: 'Measure hardness softener: used 3000 ltr' 280 | data: 281 | push: 282 | sound: 283 | name: default 284 | critical: 1 285 | volume: 1 286 | - delay: 287 | minutes: 30 288 | mode: single 289 | initial_state: 'true' 290 | -------------------------------------------------------------------------------- /home_assistant/clack_nl.yaml: -------------------------------------------------------------------------------- 1 | #------------ 2 | #INPUT SELECT 3 | #------------ 4 | # Opm: de stap 2e terugspoeling (backwash) is eruit gehaald, tussen zoutspoeling en snelspoeling. 5 | # Deze stap weghalen bespaart water en is mogelijk niet persee nodig. Dit kan ingesteld worden in de Clack 6 | input_select: 7 | clack_water_softener_status: 8 | name: Water softener status 9 | options: 10 | - terugspoeling 11 | - zoutspoeling 12 | - snelspoeling 13 | - vullen 14 | - standby 15 | initial: standby 16 | 17 | #----------- 18 | #TIMERS 19 | #----------- 20 | # Opm: verander deze naar de eigen tijdsduur van de waterontharder (stopwatch) 21 | timer: 22 | timer_ws_backwash: 23 | name: terugspoeling 24 | # duration: '0:00:57' 25 | duration: '0:00:10' 26 | 27 | timer_ws_brine: 28 | name: zoutspoeling 29 | # duration: '0:01:07' 30 | duration: '0:00:10' 31 | 32 | timer_ws_rinse: 33 | name: snelspoeling 34 | # duration: '0:01:14' 35 | duration: '0:00:10' 36 | 37 | timer_ws_fill: 38 | name: vullen 39 | # duration: '0:01:10' 40 | duration: '0:00:10' 41 | 42 | timer_ws_total: #sum of all above values 43 | name: total 44 | # duration: '0:05:44' 45 | duration: '0:00:40' 46 | 47 | #----------- 48 | #SENSORS 49 | #----------- 50 | template: 51 | sensor: 52 | - name: "tijd_tot_regeneratie" # custom sensor die het aantal dagen berekend totdat opnieuw een regeneratie van de waterontharder moet plaatsvinden 53 | state: > 54 | {%- set time = (states('number.clack_capaciteit_in_dagen') | int * 86400) - (as_timestamp(now()) - as_timestamp((strptime(states('sensor.clack_geregenereerd_op')[4:15], '%d %b %H:%M').replace(year=now().year)))) | int %} 55 | {%- set hours = ((time % 86400) // 3600) %} 56 | {%- set hours = '{}h '.format(hours) if hours > 0 else '' %} 57 | {%- set days = (time // 86400) %} 58 | {%- set days = '{}d '.format(days) if days > 0 else '' %} 59 | {{days + hours}} 60 | unique_id: "tijd_tot_regeneratie" 61 | icon: mdi:calendar-clock 62 | 63 | #----------- 64 | #UTILITY METER 65 | #----------- 66 | utility_meter: 67 | clack_waterverbruik_dit_kwartier: 68 | source: sensor.clack_watermeter 69 | cycle: quarter-hourly 70 | clack_waterverbruik_dit_uur: 71 | source: sensor.clack_watermeter 72 | cycle: hourly 73 | clack_waterverbruik_vandaag: 74 | source: sensor.clack_watermeter 75 | cycle: daily 76 | clack_waterverbruik_maand: 77 | source: sensor.clack_watermeter 78 | cycle: monthly 79 | clack_waterverbruik_jaar: 80 | source: sensor.clack_watermeter 81 | cycle: yearly 82 | 83 | #----------- 84 | #AUTOMATIONS 85 | #----------- 86 | automation: 87 | #################################################### 88 | - id: set_water_softener_start_backwash 89 | alias: Set water softener start backwash 90 | trigger: 91 | - platform: state 92 | entity_id: 93 | - binary_sensor.clack_regeneratie_pulse 94 | to: 'on' 95 | - platform: state 96 | entity_id: button.clack_test_button_regen_pulse 97 | condition: 98 | - condition: and 99 | conditions: 100 | - condition: state 101 | entity_id: input_select.clack_water_softener_status 102 | state: standby 103 | action: 104 | - service: input_select.select_option 105 | data: 106 | entity_id: input_select.clack_water_softener_status 107 | option: terugspoeling 108 | - service: timer.start 109 | entity_id: timer.timer_ws_backwash 110 | - service: timer.start 111 | entity_id: timer.timer_ws_total 112 | initial_state: true 113 | #################################################### 114 | - id: set_water_softener_start_brine 115 | alias: Set water softener start brine 116 | trigger: 117 | - platform: event 118 | event_type: timer.finished 119 | event_data: 120 | entity_id: timer.timer_ws_backwash 121 | condition: 122 | - condition: and 123 | conditions: 124 | - condition: state 125 | entity_id: input_select.clack_water_softener_status 126 | state: terugspoeling 127 | action: 128 | - service: input_select.select_option 129 | data: 130 | entity_id: input_select.clack_water_softener_status 131 | option: zoutspoeling 132 | - service: timer.start 133 | entity_id: timer.timer_ws_brine 134 | initial_state: true 135 | #################################################### 136 | - id: set_water_softener_start_rinse 137 | alias: Set water softener start rinse 138 | trigger: 139 | - platform: event 140 | event_type: timer.finished 141 | event_data: 142 | entity_id: timer.timer_ws_brine 143 | condition: 144 | - condition: and 145 | conditions: 146 | - condition: state 147 | entity_id: input_select.clack_water_softener_status 148 | state: zoutspoeling 149 | action: 150 | - service: input_select.select_option 151 | data: 152 | entity_id: input_select.clack_water_softener_status 153 | option: snelspoeling 154 | - service: timer.start 155 | entity_id: timer.timer_ws_rinse 156 | initial_state: true 157 | #################################################### 158 | - id: set_water_softener_start_fill 159 | alias: Set water softener start fill 160 | trigger: 161 | - platform: event 162 | event_type: timer.finished 163 | event_data: 164 | entity_id: timer.timer_ws_rinse 165 | condition: 166 | - condition: and 167 | conditions: 168 | - condition: state 169 | entity_id: input_select.clack_water_softener_status 170 | state: snelspoeling 171 | action: 172 | - service: input_select.select_option 173 | data: 174 | entity_id: input_select.clack_water_softener_status 175 | option: vullen 176 | - service: timer.start 177 | entity_id: timer.timer_ws_fill 178 | initial_state: true 179 | #################################################### 180 | - id: set_water_softener_idle 181 | alias: Set water softener Idle 182 | trigger: 183 | - platform: event 184 | event_type: timer.finished 185 | event_data: 186 | entity_id: timer.timer_ws_fill 187 | condition: 188 | - condition: and 189 | conditions: 190 | - condition: state 191 | entity_id: input_select.clack_water_softener_status 192 | state: vullen 193 | action: 194 | - service: input_select.select_option 195 | data: 196 | entity_id: input_select.clack_water_softener_status 197 | option: standby 198 | - service: esphome.clack_meterstand_clack 199 | data: 200 | meter_value: 0 201 | - service: input_number.set_value 202 | data_template: 203 | entity_id: input_number.clack_water_softener_meter_liters 204 | value: 0 205 | initial_state: true 206 | #------------------------------------------------------------------ 207 | # Automatisering opties: alarm zoutmelding en alarm hardheid meten. 208 | # vul je eigen mobile_app_iphone_van_xxx in. (als voorbeeld) 209 | #------------------------------------------------------------------ 210 | - id: salt_level_alarm_notify 211 | alias: Zoutniveau alarm melding 212 | description: '' 213 | trigger: 214 | - platform: state 215 | entity_id: sensor.clack_zout_bijvullen 216 | to: ja 217 | condition: 218 | - condition: time 219 | after: 07:30:00 220 | before: '22:00:00' 221 | action: 222 | - service: notify.mobile_app_iphone_van_a_c_a 223 | data: 224 | title: Let op! 225 | message: Zout niveau van ontharder is laag! Vandaag gaan bijvullen! 226 | data: 227 | push: 228 | sound: 229 | name: default 230 | critical: 1 231 | volume: 1 232 | - delay: 233 | minutes: 30 234 | initial_state: 'true' 235 | mode: single 236 | ################################################## 237 | - id: measure_hardness_notify 238 | alias: Hardheid meten 239 | description: '' 240 | trigger: 241 | - platform: numeric_state 242 | entity_id: 243 | - sensor.clack_watermeter 244 | above: 3000 245 | condition: 246 | - condition: time 247 | after: 07:30:00 248 | before: '22:00:00' 249 | action: 250 | - service: notify.mobile_app_iphone_van_a_c_a 251 | data: 252 | title: Let op! 253 | data: 254 | push: 255 | sound: 256 | name: default 257 | critical: 1 258 | volume: 1 259 | message: 'Ontharder hardheid meten: nu 3000 ltr' 260 | - delay: 261 | minutes: 30 262 | mode: single 263 | initial_state: 'true' -------------------------------------------------------------------------------- /home_assistant/lovelace_menu_en.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Watersoftener 3 | path: watersoftener 4 | badges: [] 5 | cards: 6 | - type: vertical-stack 7 | cards: 8 | - cards: 9 | - type: entities 10 | entities: 11 | - entity: sensor.clack_water_meter 12 | type: custom:multiple-entity-row 13 | icon: mdi:cup-water 14 | name: Water softener 15 | secondary_info: 16 | entity: input_select.clack_water_softener_status 17 | name: 'cycle: ' 18 | state_header: used 19 | entities: 20 | - entity: sensor.time_to_regeneration 21 | name: time left 22 | - entity: sensor.clack_water_softener_m3_left 23 | name: m3 left 24 | style: | 25 | ha-card { 26 | border-radius: 20px 27 | } 28 | .card-header { 29 | font-size: 18px; 30 | padding: 5px 25px; 31 | font-weight: bold; 32 | } 33 | title: Water softener 34 | - entities: 35 | - entity: sensor.clack_water_softener_ltr_left 36 | max: 3200 37 | min: 0 38 | name: L used 39 | height: 8px 40 | decimal: false 41 | positions: 42 | icon: 'off' 43 | indicator: 'off' 44 | tap_action: info 45 | name: 'off' 46 | value: 'off' 47 | style: | 48 | ha-card { 49 | border-radius: 20px 50 | } 51 | .card-content { 52 | padding: 0px 10px 10px 10px; 53 | } 54 | type: custom:bar-card 55 | mode: vertical 56 | type: custom:stack-in-card 57 | - type: conditional 58 | conditions: 59 | - entity: timer.timer_ws_total 60 | state_not: idle 61 | card: 62 | type: entities 63 | style: | 64 | 65 | .card-content { 66 | padding: 8px; 67 | } 68 | .card-content > div { 69 | margin: 0 !important; 70 | } 71 | .card-header { 72 | font-size: 18px; 73 | padding: 5px 25px; 74 | font-weight: bold; 75 | } 76 | .card-header { 77 | font-size: 18px; 78 | padding: 5px 25px; 79 | font-weight: bold; 80 | } 81 | title: Regen. started 82 | entities: 83 | - conditions: 84 | - entity: timer.timer_ws_backwash 85 | state_not: idle 86 | row: 87 | entity: timer.timer_ws_backwash 88 | icon: mdi:numeric-1-circle 89 | name: 'Cycle: Backwash' 90 | type: conditional 91 | - conditions: 92 | - entity: timer.timer_ws_brine 93 | state_not: idle 94 | row: 95 | entity: timer.timer_ws_brine 96 | icon: mdi:numeric-2-circle 97 | name: 'Cycle: Brine' 98 | type: conditional 99 | - conditions: 100 | - entity: timer.timer_ws_rinse 101 | state_not: idle 102 | row: 103 | entity: timer.timer_ws_rinse 104 | icon: mdi:numeric-3-circle 105 | name: 'Cycle: Rinse' 106 | type: conditional 107 | - conditions: 108 | - entity: timer.timer_ws_fill 109 | state_not: idle 110 | row: 111 | entity: timer.timer_ws_fill 112 | icon: mdi:numeric-4-circle 113 | name: 'Cycle: Fill' 114 | type: conditional 115 | - type: section 116 | - entity: timer.timer_ws_total 117 | icon: mdi:timer-sand 118 | name: Total time left (4 cycles) 119 | - type: entities 120 | entities: 121 | - entity: sensor.clack_water_meter 122 | name: Water meter 123 | - entity: sensor.clack_water_softener_ltr_left 124 | name: Water softener liters left 125 | - entity: sensor.clack_water_softener_m3_left 126 | name: Water softener m3 left 127 | - entity: sensor.clack_salt_level_distance 128 | name: Distance 129 | - entity: sensor.clack_salt_level_height 130 | name: Height 131 | - entity: sensor.clack_salt_level_percent 132 | name: Procent 133 | - entity: sensor.clack_fill_salt 134 | name: Fill salt 135 | - entity: sensor.clack_regenerated_on 136 | name: Regenerated on 137 | - entity: binary_sensor.clack_watermeter_pulse 138 | name: Watermeter pulse 139 | - entity: binary_sensor.clack_regeneration_pulse 140 | name: Regeneration pulse 141 | - entity: button.clack_test_button_use_pulse 142 | name: Test button use pulse 143 | - entity: button.clack_test_button_regen_pulse 144 | name: Test button regeneration pulse 145 | - entity: sensor.clack_power 146 | name: Power 147 | - entity: sensor.clack_voltage 148 | name: Voltage 149 | - entity: sensor.clack_current 150 | name: Current 151 | - entity: switch.clack_chlorinator 152 | name: Chlorinator 153 | 154 | - elements: 155 | - entity: sensor.clack_salt_level_for_dashboard 156 | image: local/images/softener.png 157 | state_image: 158 | '0': local/images/softener0.png 159 | '10': local/images/softener10.png 160 | '20': local/images/softener20.png 161 | '40': local/images/softener40.png 162 | '60': local/images/softener60.png 163 | '80': local/images/softener80.png 164 | '100': local/images/softener100.png 165 | style: 166 | left: 0% 167 | top: 0% 168 | transform: scale(1,1) 169 | tap_action: 170 | action: none 171 | type: image 172 | image: local/images/softener.png 173 | panel: true 174 | type: picture-elements 175 | - type: entities 176 | entities: 177 | - entity: sensor.clack_waterusage_this_quarter 178 | name: Waterusage last quarter 179 | - entity: sensor.clack_waterusage_this_hour 180 | name: Waterusage last hour 181 | - entity: sensor.clack_waterusage_today 182 | name: Waterusage today 183 | - entity: sensor.clack_waterusage_this_month 184 | name: Waterusage this month 185 | - entity: sensor.clack_waterusage_this_year 186 | name: Waterusage this year 187 | - type: custom:apexcharts-card 188 | graph_span: 7d 189 | update_interval: 5m 190 | cache: true 191 | span: 192 | end: day 193 | offset: '-1sec' 194 | header: 195 | show: true 196 | title: Water per day 197 | apex_config: 198 | xaxis: 199 | labels: 200 | format: dd-MM 201 | show: true 202 | showAlways: true 203 | yaxis: 204 | forceNiceScale: true 205 | decimalsInFloat: 0 206 | min: 0 207 | chart: 208 | type: area 209 | height: 300 210 | stroke: 211 | show: true 212 | width: 1 213 | legend: 214 | show: true 215 | dataLabels: 216 | enabled: false 217 | distributed: true 218 | fill: 219 | type: gradient 220 | gradient: 221 | shadeIntensity: 0.1 222 | opacityFrom: 0.25 223 | opacityTo: 1 224 | inverseColors: true 225 | stops: 226 | - 0 227 | - 90 228 | - 100 229 | series: 230 | - entity: sensor.clack_waterusage_today 231 | name: Usage 232 | type: column 233 | float_precision: 2 234 | group_by: 235 | func: max 236 | duration: 23h59m59s 237 | - type: entities 238 | entities: 239 | - entity: select.clack_function_mode 240 | name: Function mode 241 | - entity: number.clack_chlorinator_active_time 242 | name: Chlorinator active time 243 | - entity: number.clack_min_salt_distance 244 | name: Min. salt distance 245 | - entity: number.clack_max_salt_distance 246 | name: Max. salt distance 247 | - entity: number.clack_fill_salt_distance 248 | name: Fill salt distance 249 | - entity: number.clack_capacity_in_days 250 | name: Capacity in days 251 | - entity: number.clack_capacity_in_liters 252 | name: Capacity in liters 253 | - entity: sensor.clack_version 254 | name: Version 255 | - entity: sensor.clack_water_softener_ip 256 | name: IP address 257 | - entity: sensor.clack_wifi_signal 258 | name: Wifi signal 259 | - entity: sensor.clack_wifi_signal_db 260 | name: Wifi signal dB 261 | - entity: light.clack_led 262 | name: Led 263 | - entity: sensor.clack_uptime 264 | name: Uptime 265 | title: Settings 266 | -------------------------------------------------------------------------------- /home_assistant/lovelace_menu_en_backwash2.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Watersoftener 3 | path: watersoftener 4 | badges: [] 5 | cards: 6 | - type: vertical-stack 7 | cards: 8 | - cards: 9 | - type: entities 10 | entities: 11 | - entity: sensor.clack_water_meter 12 | type: custom:multiple-entity-row 13 | icon: mdi:cup-water 14 | name: Water softener 15 | secondary_info: 16 | entity: input_select.clack_water_softener_status 17 | name: 'cycle: ' 18 | state_header: used 19 | entities: 20 | - entity: sensor.time_to_regeneration 21 | name: time left 22 | - entity: sensor.clack_water_softener_m3_left 23 | name: m3 left 24 | style: | 25 | ha-card { 26 | border-radius: 20px 27 | } 28 | .card-header { 29 | font-size: 18px; 30 | padding: 5px 25px; 31 | font-weight: bold; 32 | } 33 | title: Water softener 34 | - entities: 35 | - entity: sensor.clack_water_softener_ltr_left 36 | max: 3200 37 | min: 0 38 | name: L used 39 | height: 8px 40 | decimal: false 41 | positions: 42 | icon: 'off' 43 | indicator: 'off' 44 | tap_action: info 45 | name: 'off' 46 | value: 'off' 47 | style: | 48 | ha-card { 49 | border-radius: 20px 50 | } 51 | .card-content { 52 | padding: 0px 10px 10px 10px; 53 | } 54 | type: custom:bar-card 55 | mode: vertical 56 | type: custom:stack-in-card 57 | - type: conditional 58 | conditions: 59 | - entity: timer.timer_ws_total 60 | state_not: idle 61 | card: 62 | type: entities 63 | style: | 64 | 65 | .card-content { 66 | padding: 8px; 67 | } 68 | .card-content > div { 69 | margin: 0 !important; 70 | } 71 | .card-header { 72 | font-size: 18px; 73 | padding: 5px 25px; 74 | font-weight: bold; 75 | } 76 | .card-header { 77 | font-size: 18px; 78 | padding: 5px 25px; 79 | font-weight: bold; 80 | } 81 | title: Regen. started 82 | entities: 83 | - conditions: 84 | - entity: timer.timer_ws_backwash 85 | state_not: idle 86 | row: 87 | entity: timer.timer_ws_backwash 88 | icon: mdi:numeric-1-circle 89 | name: 'Cycle: Backwash' 90 | type: conditional 91 | - conditions: 92 | - entity: timer.timer_ws_brine 93 | state_not: idle 94 | row: 95 | entity: timer.timer_ws_brine 96 | icon: mdi:numeric-2-circle 97 | name: 'Cycle: Brine' 98 | type: conditional 99 | - conditions: 100 | - entity: timer.timer_ws_backwash2 101 | state_not: idle 102 | row: 103 | entity: timer.timer_ws_backwash2 104 | icon: mdi:numeric-3-circle 105 | name: 'Cycle: Backwash2' 106 | type: conditional 107 | - conditions: 108 | - entity: timer.timer_ws_rinse 109 | state_not: idle 110 | row: 111 | entity: timer.timer_ws_rinse 112 | icon: mdi:numeric-4-circle 113 | name: 'Cycle: Rinse' 114 | type: conditional 115 | - conditions: 116 | - entity: timer.timer_ws_fill 117 | state_not: idle 118 | row: 119 | entity: timer.timer_ws_fill 120 | icon: mdi:numeric-5-circle 121 | name: 'Cycle: Fill' 122 | type: conditional 123 | - type: section 124 | - entity: timer.timer_ws_total 125 | icon: mdi:timer-sand 126 | name: Total time left (5 cycles) 127 | - type: entities 128 | entities: 129 | - entity: sensor.clack_water_meter 130 | name: Water meter 131 | - entity: sensor.clack_water_softener_ltr_left 132 | name: Water softener liters left 133 | - entity: sensor.clack_water_softener_m3_left 134 | name: Water softener m3 left 135 | - entity: sensor.clack_salt_level_distance 136 | name: Distance 137 | - entity: sensor.clack_salt_level_height 138 | name: Height 139 | - entity: sensor.clack_salt_level_percent 140 | name: Procent 141 | - entity: sensor.clack_fill_salt 142 | name: Fill salt 143 | - entity: sensor.clack_regenerated_on 144 | name: Regenerated on 145 | - entity: binary_sensor.clack_watermeter_pulse 146 | name: Watermeter pulse 147 | - entity: binary_sensor.clack_regeneration_pulse 148 | name: Regeneration pulse 149 | - entity: button.clack_test_button_use_pulse 150 | name: Test button use pulse 151 | - entity: button.clack_test_button_regen_pulse 152 | name: Test button regeneration pulse 153 | - entity: sensor.clack_power 154 | name: Power 155 | - entity: sensor.clack_voltage 156 | name: Voltage 157 | - entity: sensor.clack_current 158 | name: Current 159 | - entity: switch.clack_chlorinator 160 | name: Chlorinator 161 | 162 | - elements: 163 | - entity: sensor.clack_salt_level_for_dashboard 164 | image: local/images/softener.png 165 | state_image: 166 | '0': local/images/softener0.png 167 | '10': local/images/softener10.png 168 | '20': local/images/softener20.png 169 | '40': local/images/softener40.png 170 | '60': local/images/softener60.png 171 | '80': local/images/softener80.png 172 | '100': local/images/softener100.png 173 | style: 174 | left: 0% 175 | top: 0% 176 | transform: scale(1,1) 177 | tap_action: 178 | action: none 179 | type: image 180 | image: local/images/softener.png 181 | panel: true 182 | type: picture-elements 183 | - type: entities 184 | entities: 185 | - entity: sensor.clack_waterusage_this_quarter 186 | name: Waterusage last quarter 187 | - entity: sensor.clack_waterusage_this_hour 188 | name: Waterusage last hour 189 | - entity: sensor.clack_waterusage_today 190 | name: Waterusage today 191 | - entity: sensor.clack_waterusage_this_month 192 | name: Waterusage this month 193 | - entity: sensor.clack_waterusage_this_year 194 | name: Waterusage this year 195 | - type: custom:apexcharts-card 196 | graph_span: 7d 197 | update_interval: 5m 198 | cache: true 199 | span: 200 | end: day 201 | offset: '-1sec' 202 | header: 203 | show: true 204 | title: Water per day 205 | apex_config: 206 | xaxis: 207 | labels: 208 | format: dd-MM 209 | show: true 210 | showAlways: true 211 | yaxis: 212 | forceNiceScale: true 213 | decimalsInFloat: 0 214 | min: 0 215 | chart: 216 | type: area 217 | height: 300 218 | stroke: 219 | show: true 220 | width: 1 221 | legend: 222 | show: true 223 | dataLabels: 224 | enabled: false 225 | distributed: true 226 | fill: 227 | type: gradient 228 | gradient: 229 | shadeIntensity: 0.1 230 | opacityFrom: 0.25 231 | opacityTo: 1 232 | inverseColors: true 233 | stops: 234 | - 0 235 | - 90 236 | - 100 237 | series: 238 | - entity: sensor.clack_waterusage_today 239 | name: Usage 240 | type: column 241 | float_precision: 2 242 | group_by: 243 | func: max 244 | duration: 23h59m59s 245 | - type: entities 246 | entities: 247 | - entity: select.clack_function_mode 248 | name: Function mode 249 | - entity: number.clack_chlorinator_active_time 250 | name: Chlorinator active time 251 | - entity: number.clack_min_salt_distance 252 | name: Min. salt distance 253 | - entity: number.clack_max_salt_distance 254 | name: Max. salt distance 255 | - entity: number.clack_fill_salt_distance 256 | name: Fill salt distance 257 | - entity: number.clack_capacity_in_days 258 | name: Capacity in days 259 | - entity: number.clack_capacity_in_liters 260 | name: Capacity in liters 261 | - entity: sensor.clack_version 262 | name: Version 263 | - entity: sensor.clack_water_softener_ip 264 | name: IP address 265 | - entity: sensor.clack_wifi_signal 266 | name: Wifi signal 267 | - entity: sensor.clack_wifi_signal_db 268 | name: Wifi signal dB 269 | - entity: light.clack_led 270 | name: Led 271 | - entity: sensor.clack_uptime 272 | name: Uptime 273 | title: Settings 274 | -------------------------------------------------------------------------------- /home_assistant/lovelace_menu_nl.yaml: -------------------------------------------------------------------------------- 1 | views: 2 | - title: Ontharder 3 | path: ontharder 4 | badges: [] 5 | cards: 6 | - type: vertical-stack 7 | cards: 8 | - cards: 9 | - type: entities 10 | entities: 11 | - entity: sensor.clack_watermeter 12 | type: custom:multiple-entity-row 13 | icon: mdi:cup-water 14 | name: Water ontharder 15 | secondary_info: 16 | entity: input_select.clack_water_softener_status 17 | name: 'cyclus: ' 18 | state_header: verbr. 19 | entities: 20 | - entity: sensor.tijd_tot_regeneratie 21 | name: nog dag 22 | - entity: sensor.clack_waterontharder_m3_over 23 | name: nog m3 24 | style: | 25 | ha-card { 26 | border-radius: 20px 27 | } 28 | .card-header { 29 | font-size: 18px; 30 | padding: 5px 25px; 31 | font-weight: bold; 32 | } 33 | title: Water ontharder 34 | - entities: 35 | - entity: sensor.clack_waterontharder_ltr_over 36 | max: 3200 37 | min: 0 38 | name: Ltr gebruikt 39 | height: 8px 40 | decimal: false 41 | positions: 42 | icon: 'off' 43 | indicator: 'off' 44 | tap_action: info 45 | name: 'off' 46 | value: 'off' 47 | style: | 48 | ha-card { 49 | border-radius: 20px 50 | } 51 | .card-content { 52 | padding: 0px 10px 10px 10px; 53 | } 54 | type: custom:bar-card 55 | mode: vertical 56 | type: custom:stack-in-card 57 | - type: conditional 58 | conditions: 59 | - entity: timer.timer_ws_total 60 | state_not: idle 61 | card: 62 | type: entities 63 | style: | 64 | 65 | .card-content { 66 | padding: 8px; 67 | } 68 | .card-content > div { 69 | margin: 0 !important; 70 | } 71 | .card-header { 72 | font-size: 18px; 73 | padding: 5px 25px; 74 | font-weight: bold; 75 | } 76 | .card-header { 77 | font-size: 18px; 78 | padding: 5px 25px; 79 | font-weight: bold; 80 | } 81 | title: Regen. gestart 82 | entities: 83 | - conditions: 84 | - entity: timer.timer_ws_backwash 85 | state_not: idle 86 | row: 87 | entity: timer.timer_ws_backwash 88 | icon: mdi:numeric-1-circle 89 | name: 'Cyclus: terugspoelen' 90 | type: conditional 91 | - conditions: 92 | - entity: timer.timer_ws_brine 93 | state_not: idle 94 | row: 95 | entity: timer.timer_ws_brine 96 | icon: mdi:numeric-2-circle 97 | name: 'Cyclus: zoutspoeling' 98 | type: conditional 99 | - conditions: 100 | - entity: timer.timer_ws_rinse 101 | state_not: idle 102 | row: 103 | entity: timer.timer_ws_rinse 104 | icon: mdi:numeric-4-circle 105 | name: 'Cyclus: snelspoeling' 106 | type: conditional 107 | - conditions: 108 | - entity: timer.timer_ws_fill 109 | state_not: idle 110 | row: 111 | entity: timer.timer_ws_fill 112 | icon: mdi:numeric-5-circle 113 | name: 'Cyclus: vullen' 114 | type: conditional 115 | - type: section 116 | - entity: timer.timer_ws_total 117 | icon: mdi:timer-sand 118 | name: Totale tijd over (4 cycles) 119 | - type: entities 120 | entities: 121 | - entity: sensor.clack_watermeter 122 | name: Watermeter 123 | - entity: sensor.clack_waterontharder_ltr_over 124 | name: Waterontharder ltr over 125 | - entity: sensor.clack_waterontharder_m3_over 126 | name: Waterontharder m3 over 127 | - entity: sensor.clack_zoutniveau_afstand 128 | name: Afstand 129 | - entity: sensor.clack_zoutniveau_hoogte 130 | name: Hoogte 131 | - entity: sensor.clack_zoutniveau_procent 132 | name: Procent 133 | - entity: sensor.clack_zout_bijvullen 134 | name: Zout bijvullen 135 | - entity: sensor.clack_geregenereerd_op 136 | name: Geregenereerd op 137 | - entity: binary_sensor.clack_watermeter_pulse 138 | name: Watermeter pulse 139 | - entity: binary_sensor.clack_regeneratie_pulse 140 | name: Regeneratie pulse 141 | - entity: button.clack_test_button_use_pulse 142 | name: Test button verbruik pulse 143 | - entity: button.clack_test_button_regen_pulse 144 | name: Test button regeneratie pulse 145 | - entity: sensor.clack_power 146 | name: Power 147 | - entity: sensor.clack_voltage 148 | name: Spanning 149 | - entity: sensor.clack_current 150 | name: Stroom 151 | - elements: 152 | - entity: sensor.clack_zoutniveau_voor_dashboard 153 | image: local/images/softener.png 154 | state_image: 155 | '0': local/images/softener0.png 156 | '10': local/images/softener10.png 157 | '20': local/images/softener20.png 158 | '40': local/images/softener40.png 159 | '60': local/images/softener60.png 160 | '80': local/images/softener80.png 161 | '100': local/images/softener100.png 162 | style: 163 | left: 0% 164 | top: 0% 165 | transform: scale(1,1) 166 | tap_action: 167 | action: none 168 | type: image 169 | image: local/images/softener.png 170 | panel: true 171 | type: picture-elements 172 | - type: entities 173 | entities: 174 | - entity: sensor.clack_waterverbruik_dit_kwartier 175 | - entity: sensor.clack_waterverbruik_dit_uur 176 | - entity: sensor.clack_waterverbruik_vandaag 177 | - entity: sensor.clack_waterverbruik_maand 178 | - entity: sensor.clack_waterverbruik_jaar 179 | - type: custom:apexcharts-card 180 | graph_span: 7d 181 | update_interval: 5m 182 | cache: true 183 | span: 184 | end: day 185 | offset: '-1sec' 186 | header: 187 | show: true 188 | title: Water per dag 189 | apex_config: 190 | xaxis: 191 | labels: 192 | format: dd-MM 193 | show: true 194 | showAlways: true 195 | yaxis: 196 | forceNiceScale: true 197 | decimalsInFloat: 0 198 | min: 0 199 | chart: 200 | type: area 201 | height: 300 202 | stroke: 203 | show: true 204 | width: 1 205 | legend: 206 | show: true 207 | dataLabels: 208 | enabled: false 209 | distributed: true 210 | fill: 211 | type: gradient 212 | gradient: 213 | shadeIntensity: 0.1 214 | opacityFrom: 0.25 215 | opacityTo: 1 216 | inverseColors: true 217 | stops: 218 | - 0 219 | - 90 220 | - 100 221 | series: 222 | - entity: sensor.clack_waterverbruik_vandaag 223 | name: Verbruik 224 | type: column 225 | float_precision: 2 226 | group_by: 227 | func: max 228 | duration: 23h59m59s 229 | - type: entities 230 | entities: 231 | - entity: select.clack_functie_mode 232 | name: Functie mode 233 | - entity: number.clack_chlorinator_aktief_tijd 234 | name: Chlorinator aktief tijd 235 | - entity: number.clack_min_afstand_zout 236 | name: Min. afstand zout 237 | - entity: number.clack_max_afstand_zout 238 | name: Max. afstand zout 239 | - entity: number.clack_zout_bijvullen_afstand 240 | name: Bijvullen afstand zout 241 | - entity: number.clack_capaciteit_in_dagen 242 | name: Capaciteit in dagen 243 | - entity: number.clack_capaciteit_in_liters 244 | name: Capaciteit in liters 245 | - entity: sensor.clack_versie 246 | name: Versie 247 | - entity: sensor.clack_waterontharder_ip 248 | name: IP adres 249 | - entity: sensor.clack_wifi_signal 250 | name: Wifi signaal 251 | - entity: sensor.clack_wifi_signal_db 252 | name: Wifi signaal db 253 | - entity: light.clack_led 254 | name: Led 255 | - entity: sensor.clack_uptime 256 | name: Uptime 257 | title: Instellingen -------------------------------------------------------------------------------- /readme/Chlorinator_V3_1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/Chlorinator_V3_1.jpeg -------------------------------------------------------------------------------- /readme/Chlorinator_V3_2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/Chlorinator_V3_2.jpeg -------------------------------------------------------------------------------- /readme/Clack INSTLKRT_V3_NL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/Clack INSTLKRT_V3_NL.pdf -------------------------------------------------------------------------------- /readme/Clack_V3_2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/Clack_V3_2.jpeg -------------------------------------------------------------------------------- /readme/backside print.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/backside print.jpeg -------------------------------------------------------------------------------- /readme/clack_V3_1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/clack_V3_1.jpeg -------------------------------------------------------------------------------- /readme/clorinator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/clorinator.png -------------------------------------------------------------------------------- /readme/min_max_NL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/readme/min_max_NL.jpg -------------------------------------------------------------------------------- /www/images/softener.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener.png -------------------------------------------------------------------------------- /www/images/softener0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener0.png -------------------------------------------------------------------------------- /www/images/softener10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener10.png -------------------------------------------------------------------------------- /www/images/softener100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener100.png -------------------------------------------------------------------------------- /www/images/softener20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener20.png -------------------------------------------------------------------------------- /www/images/softener40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener40.png -------------------------------------------------------------------------------- /www/images/softener60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener60.png -------------------------------------------------------------------------------- /www/images/softener80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fonske/clack-reader-v3/08ad714d6c6e35d1155ea57b67b49ef06e80c595/www/images/softener80.png --------------------------------------------------------------------------------