Skip to content

grafalex82/WaterMeter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Water Meter Description

Water Meter device is intended to count pulses on 2 water flow meters (hot and cold water) and then publish counted value to consumers via MQTT protocol. Additionally device displays current values on a SSD1306 based display.

The device is based on ESP8266 module (ESP-07 or ESP-12).

This github space contains firmware for the device. Additionally you may refer to

Building the firmware

The firmware is written in micropython. Since ESP8266 module has a very limited amount of RAM some trick are required to reduce RAM consumption.

  • Some classes have to be pre-compiled so that ESP8266 does not require to compile them (executes bytecode)
  • Library classes have to be burned into the firmware so that so that ESP8266 executes bytecode directly from the flash (refer to 'frozen bytecode' in micropython documentation)

So the here is the building algorithm:

  • Build the micropython firmware
  • Upload files in 'Src' directory to module internal filesystem
    • Rename config.txt.template to config.txt and fill your configuration parameters inside
    • Pre-compile all .py files in 'Src' directory with mpy-cross (except for main.py)
    • Upload config.txt, all .mpy files and main.py to the device (e.g. with ampy.py)

Credits

For build convenience some libraries were copied into this repository. Here is the list of libraries used with the links to origin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages