Compare commits

..

No commits in common. "master" and "v1.2.0" have entirely different histories.

19 changed files with 29 additions and 109 deletions

View File

@ -3,8 +3,8 @@
![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/actions/workflow/status/mp-se/gravitymon/pio-build.yaml?branch=dev)
![doc_build](https://img.shields.io/github/actions/workflow/status/mp-se/gravitymon/doc-build.yaml?branch=master)
![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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
{ "project":"gravmon", "version":"1.2.1", "html": [ ] }
{ "project":"gravmon", "version":"1.2.0", "html": [ ] }

View File

@ -39,21 +39,21 @@ build_flags =
-DUSE_LITTLEFS=true
-DUSER_SSID=\""\"" # =\""myssid\""
-DUSER_SSID_PWD=\""\"" # =\""mypwd\""
-DCFG_APPVER="\"1.2.1\""
-DCFG_APPVER="\"1.2.0\""
#-DCFG_GITREV=\""beta-3\""
!python script/git_rev.py
lib_deps =
# Using local copy of these libraries
# https://github.com/mp-se/i2cdevlib.git#<document>
# https://github.com/mp-se/i2cdevlib.git#<document>
# https://github.com/mp-se/OneWire
# https://github.com/mp-se/Arduino-Temperature-Control-Library
# https://github.com/khoih-prog/ESP_WiFiManager
# https://github.com/khoih-prog/ESP_DoubleResetDetector
https://github.com/mp-se/tinyexpr # https://github.com/codeplea/tinyexpr
https://github.com/mp-se/tinyexpr # https://github.com/codeplea/tinyexpr
https://github.com/mp-se/Arduino-Log#1.1.1 # https://github.com/thijse/Arduino-Log
https://github.com/mp-se/ArduinoJson#v6.18.5 # https://github.com/bblanchon/ArduinoJson
https://github.com/mp-se/arduinoCurveFitting#v1.0.6 # https://github.com/Rotario/arduinoCurveFitting
https://github.com/mp-se/arduino-mqtt#v2.5.0 # https://github.com/256dpi/arduino-mqtt
https://github.com/mp-se/ArduinoJson#v6.18.5 # https://github.com/bblanchon/ArduinoJson
https://github.com/mp-se/arduinoCurveFitting#v1.0.6 # https://github.com/Rotario/arduinoCurveFitting
https://github.com/mp-se/arduino-mqtt#v2.5.0 # https://github.com/256dpi/arduino-mqtt
lib_deps32 =
https://github.com/mp-se/NimBLE-Arduino#1.3.8 # https://github.com/h2zero/NimBLE-Arduino
extra_scripts =
@ -102,10 +102,8 @@ lib_deps =
${common_env_data.lib_deps}
board = ${common_env_data.board}
build_type = release
#build_type = debug
board_build.filesystem = littlefs
build_src_filter = +<*> -<../test/tests*.cpp>
monitor_filters = esp8266_exception_decoder
[env:gravity-unit]
upload_speed = ${common_env_data.upload_speed}
@ -122,10 +120,9 @@ lib_deps =
https://github.com/bxparks/AUnit#v1.6.1
${common_env_data.lib_deps}
board = ${common_env_data.board}
build_type = debug
build_type = release
board_build.filesystem = littlefs
build_src_filter = +<*> -<main.cpp> +<../test/tests*.cpp>
monitor_filters = esp8266_exception_decoder
[env:gravity32-release]
framework = ${common_env_data.framework}

View File

@ -194,17 +194,4 @@ const char* TemplatingEngine::create(TemplatingEngine::Templates idx,
return "";
}
// added to support more unit test scenarios.
const char* TemplatingEngine::create(const char* formatTemplate) {
_baseTemplate = String(formatTemplate);
// Insert data into template.
transform();
_baseTemplate.clear();
if (_output) return _output;
return "";
}
// EOF

View File

@ -160,8 +160,7 @@ class TemplatingEngine {
}
}
}
// strncat(_output, format + k, size - k);
strncat(_output, format + k, strlen(format + k));
strncat(_output, format + k, size - k);
Log.notice(F("TPL : Transformed template %d chars to %d chars" CR),
strlen(format), strlen(_output));
@ -203,7 +202,6 @@ class TemplatingEngine {
float tempC, float runTime);
const char *create(TemplatingEngine::Templates idx,
bool useDefaultTemplate = false);
const char *create(const char *formatTemplate);
};
#endif // SRC_TEMPLATING_HPP_

View File

@ -10,7 +10,7 @@ To reduce the need for adding custom endpoints for various services there is an
.. warning::
If format templates are large this feature can be slow on a small device such as the esp8266.
Since the format templates can be big this function can be quite slow on a small device such as the esp8266.
.. image:: images/format.png
:width: 800

View File

@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------
project = 'GravityMon'
copyright = '2021-2023, Magnus Persson'
copyright = '2021-2022, Magnus Persson'
author = 'Magnus Persson'
# The full version, including alpha/beta/rc tags
release = '1.2.1'
release = '1.2.0'
# -- General configuration ---------------------------------------------------

View File

@ -165,7 +165,7 @@ Name of organisation in Influx.
* **Influx DB v2 Bucket:**
Token for bucket. Don't use the bucket name.
Identifier for bucket.
* **Influx DB v2 Token:**

View File

@ -7,7 +7,7 @@ Welcome to GravityMon
#####################
.. note::
This documentation reflects **v1.2.1**. Last updated 2023-02-03
This documentation reflects **v1.2.0**. Last updated 2022-12-06
What is GravityMon?
--------------------

View File

@ -97,7 +97,7 @@ OTA Option
You can use the OTA option by adding this URL to your configuration and when the device starts up in configuration mode it
will check for a new version and if it finds a newer version it will do an update.
``https://gravitymon.com/firmware/``
``https://mp-se.github.io/gravitymon/release/``
Manual update
*************

View File

@ -1,22 +1,6 @@
Q & A
#####
User interface does not render correctly
----------------------------------------
Since the user interface is built using bootstrap v5 the device requires access to the internet
to download required javascript and css files. Due to size it would not be possible to store these
on the device. Make sure the device can access: https://cdn.jsdelivr.net/npm/bootstrap
Data is not populated in the fields
------------------------------------
The user interface uses JQuery to fetch data from the device. This javascript library needs to be downloaded
from the internet. Due to size it would not be possible to store these on the device. Make sure the
device can access: https://code.jquery.com
Also ensure that any security tools does not block the execution of these features.
My device is no going in to sleep after fully charged
-----------------------------------------------------
- Calibrate the device in the web interface
@ -27,7 +11,7 @@ My device is no going in to sleep after fully charged
My device reports a temperature of -273C or -491F
-------------------------------------------------
- The DS18B20 temperature sensor cannot be found and this is the default value reported in this case.
- Check the orientation of the sensor and the soldering.
- Check the orientation of the sensor and soldering.
Calibration error (unable to find a valid formula)
--------------------------------------------------
@ -46,26 +30,18 @@ To fix these this you can;
In the case above this parameter was changed from 1.6 SG to 4 SG and the formula was accepted. The deviation on this point was just above 3 SG.
How can I filter data on influxdb without needing to know the time range
------------------------------------------------------------------------
User interface does not render correctly
----------------------------------------
You can use any of the available fields to enter your custom data. An option is to use the token fields to
add some custom information to identify your brew. This can then be used to filter your data in influxdb.
Since the user interface is built using bootstrap v5 the device requires access to the internet
to download required javascript and css files. Due to size it would not be possible to store these
on the device. Make sure the device can access: https://cdn.jsdelivr.net/npm/bootstrap
When you switch brews you need to go in and change the token to identify the brewing session.
Data is not populated in the fields
------------------------------------
Change the format template for the influx target to include the token field. Now you will have an
field called event that you can filter on in influx.
.. code-block::
gravity-format=${gravity-unit} gravity=${gravity},corr-gravity=${corr-gravity},
angle=${angle},temp=${temp},battery=${battery},rssi=${rssi}
to
.. code-block::
gravity-format=${gravity-unit} gravity=${gravity},corr-gravity=${corr-gravity},
angle=${angle},temp=${temp},battery=${battery},rssi=${rssi},event=${token}
The user interface uses JQuery to fetch data from the device. This javascript library needs to be downloaded
from the internet. Due to size it would not be possible to store these on the device. Make sure the
device can access: https://code.jquery.com
Also ensure that any security tools does not block the execution of these features.

View File

@ -3,22 +3,6 @@
Releases
########
v1.2.1
======
Issues adressed
++++++++++++++++
* BUG: Under some circumstances the last part of the format template was omitted.
Other
+++++
* Update tinyexpr library to latest baseline. For forumula evaluation.
Documentation
+++++++++++++
* Minor updates and corrections to the documetation.
* Updated Q&A section
v1.2.0
======

View File

@ -125,26 +125,4 @@ test(template_applyTemplate5) {
assertEqual(s, v);
}
test(template_applyTemplate6) {
TemplatingEngine e;
char buffer[20];
myConfig.setMDNS("gravitymon");
const char* tpl =
"<prtg><result><channel>Densite</channel><float>1</float><value>${gravity}</value></result>"
"<result><channel>Batterie</channel><float>1</float><value>${battery}</value></result>"
"<result><channel>Temperature</channel><float>1</float><value>${temp}</value></result></prtg>";
e.initialize(45.0, 1.123, 1.223, 21.2, 2.98);
String s = e.create(tpl);
String batt =
convertFloatToString(myBatteryVoltage.getVoltage(), &buffer[0], 2);
batt.trim();
String v = "<prtg><result><channel>Densite</channel><float>1</float><value>1.1230</value></result>"
"<result><channel>Batterie</channel><float>1</float><value>" + batt + "</value></result>"
"<result><channel>Temperature</channel><float>1</float><value>21.2</value></result></prtg>";
assertEqual(s, v);
}
// EOF