Updates for ESP32

This commit is contained in:
Magnus Persson 2022-01-22 09:53:08 +01:00
parent 767988a7c5
commit 7b4e95b5ad
5 changed files with 42 additions and 9 deletions

View File

@ -1,5 +1,32 @@
![download](https://img.shields.io/github/downloads/mp-se/gravitymon/total)
![release](https://img.shields.io/github/v/release/mp-se/gravitymon?label=latest%20release)
![issues](https://img.shields.io/github/issues/mp-se/gravitymon)
![pr](https://img.shields.io/github/issues-pr/mp-se/gravitymon)
![dev_build](https://img.shields.io/github/workflow/status/mp-se/gravitymon/PlatformIO%20CI/dev?label=dev%20build)
![doc_build](https://img.shields.io/github/workflow/status/mp-se/gravitymon/Sphinx%20Build/dev?label=doc%20build)
# Gravity Monitor for Beer Brewing # Gravity Monitor for Beer Brewing
This software can be used with iSpindle hardware and utilizes the same hardware configuration. No code has been reused from the iSpindle project. GravityMon is a replacement firmware for the iSpindle firmware. It's 100% compatible with the iSpindle hardware design so it does not require any hardware changes.
The documenation is now moved to https://mp-se.github.io/gravitymon/index.html Installation can be made using https://www.brewflasher.com
The main differences:
---------------------
* Operates in two modes gravity monitoring and configuration mode (simplify calibration)
* Modern web based UI for configuration (in config mode)
* REST API
* Send data to multiple endpoints when pushing data (2xhttp, brewfather, influxdb v2, mqtt supported)
* Automatic temperature adjustment of gravity reading
* OTA support from local webserver
* Built in function to create gravity formulas, no need for additional software, just enter tilt/gravity.
* Visual graph showing how formula will be interpreted
* Using the temperature sensor in gyro instead of DS18B20 (faster)
* Built in performance measurements (used to optimise code)
* SSL support in standard HTTP and MQTT connections.
No code has been reused from the iSpindle project.
The documenation can be found here: https://mp-se.github.io/gravitymon/index.html

View File

@ -124,11 +124,13 @@ build_type = release
board_build.filesystem = littlefs board_build.filesystem = littlefs
[env:gravity32-perf] [env:gravity32-perf]
framework = arduino
# platformio only supports v1.0.6 of the esp32 libs. # platformio only supports v1.0.6 of the esp32 libs.
platform = espressif32
# tasmota port of v2.0.2
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.1/platform-tasmota-espressif32-2.0.2.1.zip
upload_speed = ${common_env_data.upload_speed} upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed} monitor_speed = ${common_env_data.monitor_speed}
framework = arduino
platform = espressif32
extra_scripts = extra_scripts =
script/copy_html.py script/copy_html.py
script/copy_firmware.py script/copy_firmware.py

View File

@ -198,7 +198,6 @@ bool WifiConnection::waitForConnection(int maxTime) {
return false; // Return to main that we have failed to connect. return false; // Return to main that we have failed to connect.
} }
} }
Serial.print(CR); Serial.print(CR);
Log.notice(F("WIFI: Connected to wifi ip=%s." CR), getIPAddress().c_str()); Log.notice(F("WIFI: Connected to wifi ip=%s." CR), getIPAddress().c_str());
Log.notice(F("WIFI: Using mDNS name %s." CR), myConfig.getMDNS()); Log.notice(F("WIFI: Using mDNS name %s." CR), myConfig.getMDNS());

View File

@ -30,12 +30,16 @@ In the platformio config there are 3 targets defined
* gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled. * gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled.
* gravity-release; Standard release * gravity-release; Standard release
* gravity-perf; Standard release but contains code for measuring performance * gravity-perf; Standard release but contains code for measuring performance
* gravity32-perf: Experimental version for ESP32.
.. note::
There is an experimental ESP32 target but since platformio only supports SDK 1.0.6 and the WIFI connection is really slow compared to ESP8266,
so the recommendation is to wait for support on 2.0.x branch. With the tested version an wifi connection takes 3-8s on a ESP32 compared
to 0.5s on an ESP8266. There is also a bug in OneWire connected to ESP32 that has not been fixed in the main repository yet.
.. warning:: .. warning::
The debug target can be unsable and crash the device under certain circumstanses. The debug target can be unstable and crash the device under certain circumstanses. Excessive logging to the serial port can cause corruption and crashes.
Excessive logging to the serial port can cause corruption and crashes. I'm still So only enable enough debugging to troubleshoot your changes.
trying to figure out what causes these issues in the debug target. Other targets are
stable and works fine.
Source structure Source structure

View File

@ -16,6 +16,7 @@ Development version (dev branch)
enabled this function using F you will need to go into enabled this function using F you will need to go into
the configuration and update the factor again. the configuration and update the factor again.
* Added error handling for calibration page. * Added error handling for calibration page.
* Added experimental target ESP32 (using an ESP32 D1 Mini which is pin compatible with ESP8266)
TODO: TODO:
Update docs, MQTT ssl is enabled using :8883 at end, http targets enables using prefix https:// Update docs, MQTT ssl is enabled using :8883 at end, http targets enables using prefix https://