Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
433502e7a0 | ||
|
cd1ada6744 | ||
|
22a4f40f41 | ||
|
59b95cd68b | ||
|
88c396398d | ||
|
5477ab4683 | ||
|
a8773a7ba1 | ||
|
71e67ca3f1 | ||
|
b76c7a55b4 |
@ -3,8 +3,8 @@
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# Gravity Monitor for Beer Brewing
|
||||
|
||||
|
BIN
bin/firmware.bin
BIN
bin/firmware.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
{ "project":"gravmon", "version":"1.2.0", "html": [ ] }
|
||||
{ "project":"gravmon", "version":"1.2.1", "html": [ ] }
|
@ -39,21 +39,21 @@ build_flags =
|
||||
-DUSE_LITTLEFS=true
|
||||
-DUSER_SSID=\""\"" # =\""myssid\""
|
||||
-DUSER_SSID_PWD=\""\"" # =\""mypwd\""
|
||||
-DCFG_APPVER="\"1.2.0\""
|
||||
-DCFG_APPVER="\"1.2.1\""
|
||||
#-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,8 +102,10 @@ 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}
|
||||
@ -120,9 +122,10 @@ lib_deps =
|
||||
https://github.com/bxparks/AUnit#v1.6.1
|
||||
${common_env_data.lib_deps}
|
||||
board = ${common_env_data.board}
|
||||
build_type = release
|
||||
build_type = debug
|
||||
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}
|
||||
|
@ -194,4 +194,17 @@ 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
|
||||
|
@ -160,7 +160,8 @@ class TemplatingEngine {
|
||||
}
|
||||
}
|
||||
}
|
||||
strncat(_output, format + k, size - k);
|
||||
// strncat(_output, format + k, size - k);
|
||||
strncat(_output, format + k, strlen(format + k));
|
||||
Log.notice(F("TPL : Transformed template %d chars to %d chars" CR),
|
||||
strlen(format), strlen(_output));
|
||||
|
||||
@ -202,6 +203,7 @@ 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_
|
||||
|
@ -10,7 +10,7 @@ To reduce the need for adding custom endpoints for various services there is an
|
||||
|
||||
.. warning::
|
||||
|
||||
Since the format templates can be big this function can be quite slow on a small device such as the esp8266.
|
||||
If format templates are large this feature can be slow on a small device such as the esp8266.
|
||||
|
||||
.. image:: images/format.png
|
||||
:width: 800
|
||||
|
@ -18,11 +18,11 @@
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'GravityMon'
|
||||
copyright = '2021-2022, Magnus Persson'
|
||||
copyright = '2021-2023, Magnus Persson'
|
||||
author = 'Magnus Persson'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '1.2.0'
|
||||
release = '1.2.1'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
@ -165,7 +165,7 @@ Name of organisation in Influx.
|
||||
|
||||
* **Influx DB v2 Bucket:**
|
||||
|
||||
Identifier for bucket.
|
||||
Token for bucket. Don't use the bucket name.
|
||||
|
||||
* **Influx DB v2 Token:**
|
||||
|
||||
|
@ -7,7 +7,7 @@ Welcome to GravityMon
|
||||
#####################
|
||||
|
||||
.. note::
|
||||
This documentation reflects **v1.2.0**. Last updated 2022-12-06
|
||||
This documentation reflects **v1.2.1**. Last updated 2023-02-03
|
||||
|
||||
What is GravityMon?
|
||||
--------------------
|
||||
|
@ -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://mp-se.github.io/gravitymon/release/``
|
||||
``https://gravitymon.com/firmware/``
|
||||
|
||||
Manual update
|
||||
*************
|
||||
|
@ -1,6 +1,22 @@
|
||||
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
|
||||
@ -11,7 +27,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 soldering.
|
||||
- Check the orientation of the sensor and the soldering.
|
||||
|
||||
Calibration error (unable to find a valid formula)
|
||||
--------------------------------------------------
|
||||
@ -30,18 +46,26 @@ 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.
|
||||
|
||||
User interface does not render correctly
|
||||
----------------------------------------
|
||||
How can I filter data on influxdb without needing to know the time range
|
||||
------------------------------------------------------------------------
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
Data is not populated in the fields
|
||||
------------------------------------
|
||||
When you switch brews you need to go in and change the token to identify the brewing session.
|
||||
|
||||
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
|
||||
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}
|
||||
|
||||
Also ensure that any security tools does not block the execution of these features.
|
||||
|
@ -3,6 +3,22 @@
|
||||
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
|
||||
======
|
||||
|
||||
|
@ -125,4 +125,26 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user