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

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Repository Status ESPHome S0tool discord Community
last commit time GitHub Activity Discord Twitter Follow Made for ESPHome
License Forks Stargazers Issues Contributors GitHub release
S0tool.nl
S0tool-logo
Made for ESPHome program
ESPHome
S0tool Dashboard
S0tool-print dashboard

New website for the S0tool. (24-06-2024)

For more information, check also https://s0tool.nl

Dutch version

For the Dutch version, look on my website



How to order the S0tool ?

https://www.huizebruin.nl/shop
At this moment we only ship to : The Netherlands and BelgiΓ«

If u cannot buy it u can make it on your own.

You need a couple of thinks
and place a resistor between the D2 and 5V.

Wemos D1 mini ep8266 Aliexpres or Amazon or dutch webshop Opencircuit

Npn Sensor Aliexpres or Amazon or dutch webshop Opencircuit

10K resistor Aliexpres or Amazon or dutch webshop Opencircuit

And a usb cable and minimal a usb power adapter with 5v and 1A

S0tool-diy

Will it work with my meter check it out here. #57


Before update of the S0tool u should use, and above
Program version
Home Assistant v 2024.6.0
ESPHome v 2024.6.0

Information:

Wi-fi : IEEE 802.11 b/g/n 2.4GHz




Software update information at releases here on Github.


Hardware

Put the sensors ad your πŸ›’ Look what you need te have te use it.

5V Power and cable

Or a 5v 2.5A with cable Opencircuit.nl or at Bol.com.

For the water counter

NPN sensor to the S0tool
watermeteraansluiting

Cyble sensor V2 to the S0tool
watermeteraansluiting
Here u must add a 10K Ohm resistor between the GND and D2

Soon also a sensor for Elster V100 kogelvorm meter for the S0tool at my shop.

For More information about the S0tool look at my Website.

Watermeter to energy dashboard.

From Home Assistant version 2022.11.X it is possible to add the water meter to the energy dashboard with the S0tool from version v22.10.20.

Enegry dashboard Dashboard
S0tool-water-energy-dashboard dashboard

For keeping track of solar panels or heat pump etc.

  • 45A kWh meter with 1000 pulses at kWh Bol.com
  • 40A kWh meter with 2000 pulses at kWh Bol.com
  • 32A kWh meter with 2000 pulses at kWh Amazon
  • 40A kWh meter with 1000 pulses at kWh Amazon

2000 pulses per kWh are given. This means that each plus has a value of 1/2000 = 0.0005 kWh 1000 pulses per kWh are given. This means that each plus has a value of 1/1000 = 0.001 kWh

2000 imp/kWh : gives 2,000 impulses per kWh. is therefore more accurate to do a measurement than the 1000 imp/KWh The more energy you consume or supply back, the faster it will switch.

afbeelding

The s0 connection

afbeelding
How to put it to your setup
afbeelding



Installation:

First you must have installed the CH340 drivers for the wemos d1 to communicate to your pc / laptop .

Go to this link to install the drivers ch340. https://sparks.gogo.co.nz/ch340.html

06/05/2022:
Now also possible to flash the s0tool directly via the browser.
Only possible with a chrome or edge and opera browser.
Connect the s0tool to your PC/laptop with a USB cable and start the procedure. https://s0tool.nl

  1. Install Home Assistant & Esphome .
  2. Connect the wemos d1 mini to a USB charger.
  3. Go to ssid: S0tool
  4. Go to 192.168.4.1.
  5. Put the correct SSID and Password in the fields
  6. Wait until it is ready, and then it will indicate the address where it can be found (put it in your router)
  7. Go to your Home Assistant installation, it will report that a new device has been connected. And add this.
  8. If all goes well, the print will connect to Github to download the latest version, and thereby also add it to Esphome
  9. Create a folder in your config folder via explorer and name it utility_meter and put another text file in it and rename it to utility.yaml, and add the code below. And save it (or download it from this repro) and put it in that folder. (Code that is under 10)
  10. Add the following code to your configuration.yaml
    utility_meter: !include utility_meter/utility.yaml
#utility_meter:
### watermeter  S0 meter
  waterverbruik_kwartier:
    source: sensor.watermeter_totaal
    cycle: quarter-hourly
  waterverbruik_per_uur:
    source: sensor.watermeter_totaal
    cycle: hourly
enz...

Those in the file are in the folder utility_meter/utility.yaml

  1. Optionally to see if there are new updates, you can create the following Line in your configuration.yaml:
homeassistant:
  packages: !include_dir_merge_named packages/

And make a folder in youre comfig map on Home Asstant packages and make there a file like s0tool.yaml and ad there the code from the file from the package map on the s0tool github (or you copy the package dutch or English file from the package folder and put it all in your own configuration).

#sensor: # get away if this is your first 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
  1. Restart Home Assistant one more time to add everything to your Lovelace screen.

  2. Add this card to automatically get an update on your dashboard, so you know if you are using the latest version.

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.

Blueprint for update notifications.

With this you can create an automation that will notify you when a new version is online on Github. You must have added all the above sensors.
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.


Adjusting the meter reading

Open your Home Assistant instance and show your service developer tools with a specific service selected. To adjust the water meter position.
Open your Home Assistant instance and show your service developer tools with a specific service selected. To adjust your kWh meter reading
Or this option and then search for the right meter and then adjust,
Open your Home Assistant instance and show your service developer tools with a specific service selected. here you can update all meter readings


Update function

This can be done by the ESPHome dashboard by now.


Have fun with this tool.
Any additions / improvements
may be made via Pull requests be supplemented.
Or via issues requested or added.


Wobbe
From Huizebruin.nl & S0tool.nl

Do you like my work ?
ko-fi

For more information and connection diagrams, etc., take a look at the website.


To cooperate.

This is an active open source project.
We are always open to people who want to use or contribute to the code.

Who else is working on this project :
GitHub contributors


Troubleshooting

USB Serial Drivers

If the serial port is not showing up, your computer might be missing the drivers for the USB serial chip used in your ESP device. These drivers work for most ESP devices:


License

MIT License

Copyright (c) 2021 / 2024 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.


Make money with your site. Start now, sign up here.