8000 GitHub - dominikandreas/Gasleser at v2 · GitHub
[go: up one dir, main page]

Skip to content
dominikandreasPublic

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instructions

1. Preparation (Edit the file)

Copy the code above. Change the following values in the substitutions section at the very top:

  • wifi_ssid & wifi_password: Your WiFi credentials.
  • api_key: Generate a key (e.g. here) and paste it. This is important for encryption with Home Assistant.
  • web_password: A password of your choice for accessing the device via a browser.

2. Enable MQTT (Optional)

If you are not using Home Assistant and want to send data via MQTT to a broker (ioBroker, NodeRED, etc.):

  • Enter your broker IP in mqtt_broker.
  • Remove the hashtags # before the mqtt: block (lines 47-52) to uncomment it.

3. Installation (Flashing)

Connect the ESP32-C6 to your computer. Important: Hold down the SW101 button (Boot button) while plugging in the USB cable and keep holding it for 2-3 seconds to ensure the chip enters flash mode.

Choose one of the following methods:

  • Option A: Via Browser (Easiest)
  1. Go to web.esphome.io.
  2. Click Connect and select the COM port of your ESP.
  3. Select Install and upload the firmware downloaded from the releases page.
  • Option B: Via Home Assistant
  1. Install the official ESPHome Add-on from the Home Assistant Add-on Store if you haven't already.
  2. Go to the Add-on dashboard -> + New Device.
  3. Select "Open ESPHome Web" (if connected via USB to the server) or prepare the config and select "Install" -> "Plug into this computer" (if on your PC).
  • Option C: Fallback (If Web Installer/Reset fails) If the browser does not recognize the chip or the upload hangs, use the command line tool esptool:
  1. Compile the firmware in ESPHome and select Download -> Modern Format (.bin) (factory format).
  2. Install esptool on your PC (usually via Python: pip install esptool).
  3. Flash the file manually via command line (replace COMX with your actual port):
esptool.py -p COMX write_flash 0x0 gas-meter-factory.bin

4. Setup via Web Interface

Once flashed and connected to WiFi, you don't need to re-program the device to set the counter. You can do this directly in your browser:

  1. Open your browser and go to http://gas-meter.local (or the IP address of the ESP).
  2. Log in (Username: admin, Password: The one you set in web_password above).
  3. You will see the sensor values and two input fields:
  • Gas Meter Factor: Enter how many m³ equal one pulse here (usually 0.01 or 0.1). This value is saved permanently.
  • Set Gas Meter Total: Go to your basement, check the physical meter (e.g. 12345.67), and type exactly that number into the field. Press Enter/Set.

The device will immediately adopt this value as the starting point for Gas Total and count up from there. Thanks to restore_value: true, this value is preserved even after a power outage.

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

0