Welcome to GravityMon¶
Note
This documentation reflects v1.4.0. Last updated 2024-02-17
What is GravityMon?¶
GravityMon is a electronic hydrometer software that can be used to measure gravity and temperature during fermentation of beer and report the progress to a number of external services. Is uses a gyro to measure the gravity since there is a correlation between gravity an the density of the fluid. Based on the density the hydrometer will float at a different angle. The graph below is an example on how the fermentation process can be tracked. The graph has been rendered using Fermentrack.
![Example fermentation](_images/fermentation.png)
GravityMon is a replacement firmware for the iSpindle and uses the same hardware configuration and is 100% compatible. It implements a lot of the features that has been requested in the original iSpindle project but never implemented for various reasons.
The firmware also supports a iSpindle built using an ESP32 which is pin compatible with esp8266, currently there are 3 options that are supported ESP32-D1 mini, ESP32-C3 mini, ESP32-S2 mini, ESP32-S3 mini, ESP32 lite (floaty). See Hardware. The more modern hardware will allow better support for SSL and other memory intensive functions.
I started GravityMon because I like to create software and wanted to do some microcontroller programming. I had done a few projects based on esp8266 and also started to brew beer so this combination was quite natural.
The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation. For more information on this topic and function please visit iSpindel Homepage .
My approach to this software is a little different from that the original iSpindle firmware as can be seen in the list of features.
The github repository can be found here; GravityMon on Github
Note
I don’t take responsibility for any errors or issues caused by the software or hardware. The software is provided as-is. I will however try my best to fix issues that might occur.
I have tested this software on 40+ brews with good results.
User interface overview¶
This animation shows how the features of the user interface. It’s for an older version but the main features are the same.
![User Inteface Walkthrough](_images/gravitymon.gif)
Other resouces¶
Software architecture¶
This is a simple overview of the different components that the software contains. The green ones are only active during configuration mode in order to save battery.
![Software design](_images/software_design.png)
Credits to¶
Ideas to some of these functions have been picked up from discussions in the iSpindle forums. This software uses the following libraries and without these this would have been much more difficult to achieve:
https://github.com/jrowberg/i2cdevlib
This library contains the basic code to interact with the gyro + many more chips.
https://github.com/codeplea/tinyexpr
Process the gravity formula and calculate the gravity and various corrections.
https://github.com/graphitemaster/incbin
Include binary files into the code, used to service html files.
https://github.com/khoih-prog/ESP_WiFiManager
Configure wifi settings.
https://github.com/thijse/Arduino-Log
Logging library for handling different loglevels and configure what sent over the serial.
https://github.com/bblanchon/ArduinoJson
Json parser/creator used in configuration files and API’s
https://github.com/PaulStoffregen/OneWire
Communication library used for interacting with temperature sensor.
https://github.com/milesburton/Arduino-Temperature-Control-Library
Interaction with the DS18B20 sensor
https://github.com/Rotario/arduinoCurveFitting
Create the gravity formula.
https://github.com/256dpi/arduino-mqtt
Library for sending data to mqtt based on lightweight mqtt implementation.
-
Render the graphs in the UI.
-
CSS templates for the web page.
https://github.com/lorol/LITTLEFS
LittleFS library for ESP32 framework 1.x
https://github.com/h2zero/NimBLE-Arduino
Bluetooth library for ESP32 framework 1.x
https://github.com/spouliot/tilt-sim
Excellent project for simulating a tilt device.
Contents:
- Functionality
- Releases
- Getting started
- Software Installation
- Configuration
- Hardware
- Create formula
- Service Integration
- Advanced Configuration
- REST API
- GET: /api/config
- GET: /api/device
- GET: /api/status
- GET: /api/config/formula
- GET: /api/config/advanced
- POST: /api/config/advanced
- GET: /api/clearwifi
- GET: /api/factory
- GET: /api/test/push
- POST: /api/config/device
- POST: /api/config/push
- POST: /api/config/gravity
- POST: /api/config/hardware
- POST: /api/config/formula
- Calling the API’s from Python
- Data Formats
- Compiling the software
- Contributing
- Licence
- Q & A
- User interface does not render correctly
- Data is not populated in the fields
- My device is no going in to sleep after fully charged
- What does the flashing led mean?
- My device reports a temperature of -273C or -491F
- Calibration error (unable to find a valid formula)
- How can I filter data on influxdb without needing to know the time range
- Device only reporting data once
- What does the messages in the error log mean
- HTTP error codes
- MQTT error codes
- WIFI error codes