For the last few months I’ve been busy creating a device to monitor when it is time to refill the salt blocks in my water softerner (Aquacell). I was tired of regularly checking whether I had to put new blocks of salt in it, and often forgot to do it on time.
I used a VL53L0X time of flight sensor to measure the distance from the top of the water softener to the salt blocks and a ESP8266 that connects to my wifi to send the measured distance and percentage to home assistant via MQTT:
Looks like I missed the boat on this. Any plans to create more? I’m using a Pentair salt monitor but it keeps resetting and has no integration with Home assistant.
I have ordered a new batch of 50 pieces, but due to component shortages, it is taking quite a bit longer than expected. It’s probably going to take another month before I have them.
My Salt Sentry just arrived. Immediately I added it to ESPHome with your above code. I did a few things like:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "0142casdfasdcca51"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Add a default domain name
domain: .temp.nl
# Enable Web server.
web_server:
port: 80
# Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
But for some reason the sensors present ‘unknown’.
If I check the logs I’m seeing the following:
[D][api.connection:917]: Home Assistant 2022.10.5 (192.168.21.92): Connected successfully
[D][time:041]: Synchronized time: 2022-10-26 16:28:14
[D][sensor:126]: 'distance': Sending state nan cm with 1 decimals of accuracy
[D][sensor:126]: 'percentage': Sending state -nan % with 1 decimals of accuracy
[D][sensor:126]: 'distance': Sending state nan cm with 1 decimals of accuracy