Skip to content

S0 & watermeter mesure tool from huizebruin.nl and s0tool.nl . Be sure to ๐ŸŒŸ this repository for updates! Its a hobby project . Flash it go to the link below.

License

Notifications You must be signed in to change notification settings

huizebruin/s0tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

S0tool

S0tool Logo

Monitor your water and energy consumption with Home Assistant and ESPHome

last commit time GitHub Activity License Forks Stargazers Issues Contributors GitHub release Discord Twitter Follow

Made for ESPHome

Made for ESPHome

Website โ€ข Documentation โ€ข Shop โ€ข Discord


๐Ÿ“– Table of Contents


๐ŸŒŸ Overview

The S0tool is an ESPHome-based device that transforms regular water and energy meters into smart meters. Seamlessly integrate with Home Assistant to monitor real-time consumption and optimize your usage.

S0tool Device Home Assistant Dashboard
S0tool Device Dashboard

๐Ÿ“ฐ Latest Updates

๐ŸŽ‰ New Website Available! (June 24, 2024) Visit https://s0tool.nl for complete documentation and guides.

๐Ÿ‡ณ๐Ÿ‡ฑ Dutch Version Voor de Nederlandse versie, bezoek Huizebruin.nl


โœจ Features

  • ๐Ÿ’ง Water Meter Monitoring - Track water consumption in real-time
  • โšก Energy Meter Support - Monitor kWh usage from S0 pulse outputs
  • ๐Ÿ  Home Assistant Integration - Native ESPHome integration with auto-discovery
  • ๐Ÿ“Š Energy Dashboard Compatible - Display data in HA Energy Dashboard (v2022.11+)
  • ๐Ÿ”„ OTA Updates - Update firmware wirelessly through ESPHome
  • ๐ŸŒ Easy Web Installation - Flash firmware directly from your browser
  • ๐Ÿ“ฑ Real-time Monitoring - Instant updates on consumption
  • ๐ŸŽฏ Multiple Meter Support - Connect both water and energy meters simultaneously

๐Ÿš€ Quick Start

Requirements

Software Minimum Version
Home Assistant v2025.1.0+
ESPHome v2024.12.0+

Specifications:

  • Wi-Fi: IEEE 802.11 b/g/n 2.4GHz
  • Compatible with: Wemos D1 Mini V1 or V3.0 ESP8266
  • Power: USB 5V, 1A minimum

Installation Methods

๐ŸŒ Browser Installation (Recommended)

  1. Visit https://s0tool.nl/installation.html
  2. Connect your S0tool via USB
  3. Click "Install" and follow the wizard
  4. Compatible with Chrome, Edge, and Opera browsers

๐Ÿ  Home Assistant Auto-Discovery

After connecting to Wi-Fi, the S0tool will automatically appear in Home Assistant under Settings โ†’ Devices & Services.


๐Ÿ›  Hardware Requirements

Option 1: Purchase Pre-Built

Order from Huizebruin Shop ๐Ÿšš Currently shipping to: multiple countries so check it out on our shop

Option 2: DIY Build

Components Needed:

Component Where to Buy
Wemos D1 Mini ESP8266 AliExpress โ€ข Amazon โ€ข Opencircuit
NPN Sensor (5V) AliExpress โ€ข Amazon โ€ข Opencircuit
10K Resistor AliExpress โ€ข Amazon โ€ข Opencircuit
USB Cable & 5V Power Adapter Bol.com โ€ข Opencircuit

๐Ÿ”ง DIY Build

Wiring Diagram

DIY Wiring

Connection Steps

  1. Connect 10K resistor between 5V and D2 pins
  2. Connect D2 to NPN sensor signal wire
  3. Connect NPN sensor GND to Wemos GND
  4. Connect NPN sensor 5V to Wemos 5V

โš ๏ธ Important: Use NPN sensors rated for 5V only (not higher than 6V) Recommended Sensor: LJ18A3-8-Z/BX-5V

Sensor Connection Examples

Standard NPN Sensor Connection:

NPN Connection

Cyble Sensor V2 Connection:

Cyble Connection Note: Requires 10K resistor between GND and D2

Meter Compatibility

๐Ÿ’ง Check if your water meter is compatible: View Compatibility List


๐Ÿ“ฅ Installation

Step 1: Install USB Drivers

First, install the CH340 drivers for communication: Download CH340 Drivers

Step 2: Flash Firmware

Browser Method (Easiest):

  1. Visit https://s0tool.nl/installation.html
  2. Connect S0tool to your PC via USB
  3. Select configuration type
  4. Click "Install" and follow prompts

Manual Method:

  1. Install Home Assistant & ESPHome
  2. Connect Wemos D1 Mini via USB
  3. Access Wi-Fi: S0tool
  4. Navigate to: 192.168.4.1
  5. Enter your Wi-Fi credentials
  6. Wait for device to connect
  7. Add device in Home Assistant

Step 3: Add to Home Assistant

The S0tool will automatically appear in: Settings โ†’ Devices & Services โ†’ ESPHome

Click "Configure" to complete setup.


โš™๏ธ Configuration

Home Assistant Utility Meters

1. Create utility meter configuration:

Create folder: config/utility_meter/

Create file: utility.yaml

utility_meter:
  # Water meter tracking
  waterverbruik_kwartier:
    source: sensor.watermeter_totaal
    cycle: quarter-hourly
  waterverbruik_per_uur:
    source: sensor.watermeter_totaal
    cycle: hourly
  waterverbruik_dag:
    source: sensor.watermeter_totaal
    cycle: daily
  waterverbruik_week:
    source: sensor.watermeter_totaal
    cycle: weekly
  waterverbruik_maand:
    source: sensor.watermeter_totaal
    cycle: monthly

2. Include in configuration.yaml:

utility_meter: !include utility_meter/utility.yaml

๐Ÿ“ View Complete Utility Meter Config

Update Notifications

Enable automatic update checks:

homeassistant:
  packages: !include_dir_merge_named packages/

Create packages/s0tool.yaml:

sensor:
  - platform: rest
    resource: https://api.github.com/repos/huizebruin/s0tool/releases/latest
    name: s0tool_version_github
    unique_id: s0tool_github_version
    value_template: '{{ value_json.tag_name }}'
    scan_interval: 3600

template:
  - binary_sensor:
      - name: "S0Tool update online"
        unique_id: s0tool_up_to_date
        state: >
          {% set a = states('sensor.s0tool_versie_github') %}
          {% set b = states('sensor.s0tool_versie') %}
          {{ version(a) > version(b) }}
        device_class: update

Dashboard Update Card:

type: conditional
conditions:
  - entity: sensor.s0tool_up_to_date
    state_not: 'True'
card:
  type: markdown
  content: The S0tool is not up to date with the GitHub version.

Automation Blueprint

Import Blueprint

Get notified when new versions are available!


๐Ÿ’ง Energy Dashboard Integration

From Home Assistant v2022.11.X, water meters can be added to the Energy Dashboard!

Energy Dashboard S0tool Dashboard
Water Energy Dashboard S0tool Dashboard

Adding to Energy Dashboard

Open Energy Dashboard

  1. Go to Settings โ†’ Dashboards โ†’ Energy
  2. Add water meter: Look for watermeter stand
  3. Add S0 port: Look for Totaal opgebracht

โšก Energy Meter Support

Compatible kWh Meters

Perfect for monitoring:

  • ๐ŸŒž Solar panels
  • ๐Ÿ”ฅ Heat pumps
  • โšก Energy consumption
  • ๐Ÿญ Any device with S0 pulse output

S0 Pulse Meters

Rating Pulse Rate Sources
45A kWh Meter 1000 imp/kWh Bol.com
40A kWh Meter 2000 imp/kWh Bol.com
32A kWh Meter 2000 imp/kWh Amazon
40A kWh Meter 1000 imp/kWh Amazon

Understanding Pulse Rates:

  • 2000 imp/kWh = 0.0005 kWh per pulse (more accurate)
  • 1000 imp/kWh = 0.001 kWh per pulse

S0 Connection Diagrams

S0 Connection

S0 Wiring

S0 Setup


๐Ÿ“‹ Compatible Devices

Water Meters

Check compatibility: GitHub Discussion #57

Confirmed Compatible:

Brand Model Location
Elster V200 NL
Itron Aquadis+ NL
Sensus 620 NL
Maddalena CD SD Plus BE
Actaris Single-Jet NL
Zenner MNK-RP-N DE
Kamstrup Multical 21 EU
Diehl Hydrus EU

Power Meters (S0 Output)

Check compatibility: GitHub Discussion #250


๐Ÿ”ง Adjusting Meter Readings

Water Meter

Adjust Water Meter

kWh Meter

Adjust kWh Meter

All Meters

Calibrate All Meters


๐Ÿ”„ Updates

Via ESPHome Dashboard

  1. Open ESPHome in Home Assistant
  2. Find your S0tool device
  3. Click the three dots (โ‹ฎ)
  4. Select "Validate" โ†’ "Install"

Latest releases: GitHub Releases


๐Ÿ› Troubleshooting

USB Serial Drivers

If the serial port doesn't appear, install the appropriate driver:

Chip Driver
CP2102 (square chip) Download
CH341 Download
CH340 Download

Common Issues

Device not connecting to Wi-Fi:

  • Ensure you're using 2.4GHz Wi-Fi (5GHz not supported)
  • Check SSID and password are correct
  • Try holding the boot button during flash

Meter readings not updating:

  • Verify sensor is properly aligned with meter
  • Check wiring connections
  • Ensure 10K resistor is installed correctly

More Help:


๐Ÿค Contributing

We welcome contributions of all kinds! Please see CONTRIBUTING.md for guidelines.

Ways to Contribute

  • ๐Ÿ› Report bugs via Issues
  • ๐Ÿ’ก Suggest features or improvements
  • ๐Ÿ”ง Submit Pull Requests
  • ๐Ÿ“ Improve documentation
  • ๐ŸŒŸ Star this repository!

Contributors

GitHub contributors

This project is made possible by our amazing contributors!


๐Ÿ’– Support

Enjoying the S0tool? Consider supporting development:

PayPal ko-fi

Other ways to support:

  • ๐ŸŒŸ Star this repository
  • ๐Ÿ“ข Share with others
  • ๐Ÿ’ฌ Join our Dutch Discord

๐Ÿ“„ License

MIT License

Copyright (c) 2021 - 2025 Huizebruin.nl / S0tool.nl

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


๐Ÿ™ Credits

Created by: Wobbe From: Huizebruin.nl & S0tool.nl

Powered by: ESPHome & ESP Web Tools


Website โ€ข Documentation โ€ข Shop โ€ข Discord

Made with โค๏ธ for the Home Assistant community

About

S0 & watermeter mesure tool from huizebruin.nl and s0tool.nl . Be sure to ๐ŸŒŸ this repository for updates! Its a hobby project . Flash it go to the link below.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 14