Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# Welcome to GravityMon’s documentation!

Note

This documentation reflects v0.8. Last updated 2022-03-05

GravityMon is used to measure gravity and temperature during fermentation of beer and report the progress. The graph below is an example on how the fermentation process can be tracked. This is from my last brew that was over on a few days. The graph is rendered using Fermentrack.

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 orginal iSpindle project but has been rejected for various reasons. Here is a list of Main features:.

I started GravityMon because I like to create software and wanted to do some low level 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. The github repository can be found here; GravityMon on Github

Note

I dont take responsibility for any errors or issues caused by the software. The software is provided as-is. I will however try my best to fix issues that might occur.

I have tested this software over the last year on 20+ brews with good results.

## Main features:

- Operates in two modes gravity monitoring and configuration mode (simplify calibration). Gravity mode is comparable to how the iSpindle works.

- Modern web based UI when in configuration mode. No need to start the access point changing settings.

- REST API to enable scripted configuration

- Send data to multiple endpoints and services at once

- Setup guides for how to send data to many popular services. Currently 8+ are documented.

- Automatic temperature adjustment of gravity reading

- OTA support from webserver

- Built in function to create gravity formulas, no need for additional software, just enter tilt/gravity and let GravityMon create the formula.

- Visual graph showing how formula will be interpreted based on entered values

- Using the temperature sensor in gyro instead of DS18B20 (faster)

- SSL support in standard HTTP and MQTT connections.

- Option to customize data posted to endpoints using template from the UI.

- Built in performance measurements (used to optimise code)

For a complete breakdown see the Functionallity

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.

## Credits to

Ideas to some of these functions have been picked up from disucssions in the iSpindle forums. This software uses the following libraries and without these this would have been much more difficult to acheive:

- https://github.com/jrowberg/i2cdevlib

  This library contains the basic code to interact with the gyro + many more chips.

- https://github.com/codeplea/tinyexpr

  Proccess 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_DoubleResetDetector

  Can detect if the reset button is pressed twice, is used to enter WIFI config mode.

- 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 implemenentation.

- https://graphjs.com/

  Render the graphs in the UI.

- https://getbootstrap.com/

  CSS templates for the web page.

Contents:

- Licence
- Functionallity
  - The main features
  - Battery life
  - Performance
- Getting started
  - Step 1 - Flash the device
  - Step 2 - Setup WIFI
  - Step 3 - Configuration
  - Step 4 - Completed
- Installation
  - Brewflasher
  - Esptool
  - Serial Monitoring
  - Configuring WIFI
- Releases
  - v0.8.0
  - v0.7.1
  - v0.7.0
  - v0.6.0
  - v0.5.0
  - v0.4.0
- Configuration
  - Status
  - Device
  - Configuration
- Create formula
- Service Integration
  - Brewfather
  - Fermentrack
  - UBIdots
  - Home Assistant
  - Brewer’s Friend
  - Brewspy
  - Thingspeak
- Advanced Configuration
  - Format editor
- REST API
  - GET: /api/config
  - GET: /api/device
  - GET: /api/status
  - GET: /api/config/formula
  - GET: /api/factory
  - 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
  - iSpindle format
  - Brewfather format
  - Influx DB v2
  - MQTT
  - version.json
- Compiling the software
  - Tools
  - Code Formatting
  - Targets
  - Source structure
  - Options
- Contributing
- Troubleshooting
  - Log errors
- Q & A
  - My device is no going in to sleep after fully charged
  - My device reports a temperature of -273C or -491F

### Indices and tables

- Index

- Module Index

- Search Page