Pre update of docs for v1.0

This commit is contained in:
Magnus Persson 2022-04-29 20:08:02 +02:00
parent a40c3528d4
commit 3a4cfb1ca5
17 changed files with 95 additions and 50 deletions

View File

@ -19,6 +19,10 @@ To reduce the need for adding custom endpoints for various services there is an
You enter the format data in the text field and the test button will show an example on what the output would look like. If the data cannot be formatted in json it will just be displayed as a long string. You enter the format data in the text field and the test button will show an example on what the output would look like. If the data cannot be formatted in json it will just be displayed as a long string.
The save button will save the current formla and reload the data from the device. The save button will save the current formla and reload the data from the device.
You can also select a template from the list and copy that to the current endpoint.
Saving an empty formula will reset it to the default value.
.. tip:: .. tip::
If you save a blank string the default template will be loaded. If you save a blank string the default template will be loaded.

View File

@ -58,23 +58,9 @@ Other parameters are the same as in the configuration guide.
}, },
"formula-calculation-data": { "formula-calculation-data": {
"a1":25, "a1":25,
"a2":30, "a10":0,
"a3":35,
"a4":40,
"a5":45,
"a5":0,
"a6":0,
"a7":0,
"a8":0,
"g1":1, "g1":1,
"g2":1.01, "g10":1
"g3":1.02,
"g4":1.03,
"g4":1.04,
"g5":1,
"g6":1,
"g7":1,
"g8":1
}, },
"angle": 90.93, "angle": 90.93,
"gravity": 1.105, "gravity": 1.105,
@ -109,6 +95,7 @@ Other parameters are the same as in the configuration guide.
"temp-c": 0, "temp-c": 0,
"temp-f": 32, "temp-f": 32,
"battery": 0, "battery": 0,
"wifi-ssid": "connected SSID",
"temp-format": "C", "temp-format": "C",
"sleep-mode": false, "sleep-mode": false,
"token": "token", "token": "token",
@ -127,8 +114,8 @@ GET: /api/config/formula
Retrive the data used for formula calculation data via an HTTP GET command. Payload is in JSON format. Retrive the data used for formula calculation data via an HTTP GET command. Payload is in JSON format.
* ``a1``-``a8`` are the angles/tilt readings (up to 8 are currently supported) * ``a1``-``a10`` are the angles/tilt readings (up to 10 are currently supported)
* ``g1``-``g8`` are the corresponding gravity reaadings in SG or Plato depending on the device-format. * ``g1``-``g10`` are the corresponding gravity reaadings in SG or Plato depending on the device-format.
.. code-block:: json .. code-block:: json
@ -142,6 +129,8 @@ Retrive the data used for formula calculation data via an HTTP GET command. Payl
"a6": 0, "a6": 0,
"a7": 0, "a7": 0,
"a8": 0, "a8": 0,
"a9": 0,
"a10": 0,
"g1": 1.000, "g1": 1.000,
"g2": 1.053, "g2": 1.053,
"g3": 1.062, "g3": 1.062,
@ -150,6 +139,8 @@ Retrive the data used for formula calculation data via an HTTP GET command. Payl
"g6": 1, "g6": 1,
"g7": 1, "g7": 1,
"g8": 1, "g8": 1,
"g9": 1,
"g10": 1,
"error": "Potential error message", "error": "Potential error message",
"gravity-format": "G", "gravity-format": "G",
"gravity-formula": "0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436" "gravity-formula": "0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436"
@ -165,10 +156,11 @@ Used for adjusting some internal constants and other advanced settings. Should b
{ {
"gyro-read-count": 50, "gyro-read-count": 50,
"gyro-read-delay": 3150, "tempsensor-resolution": 9,
"gyro-moving-threashold": 500, "gyro-moving-threashold": 500,
"formula-max-deviation": 1.6, "formula-max-deviation": 1.6,
"wifi-portaltimeout": 120, "wifi-portal-timeout": 120,
"wifi-connect-timeout": 20,
"formula-calibration-temp": 20, "formula-calibration-temp": 20,
"int-http1": 0, "int-http1": 0,
"int-http2": 0, "int-http2": 0,
@ -324,8 +316,8 @@ POST: /api/config/formula
Used to update formula calculation data via an HTTP POST command. Payload is in JSON format. Used to update formula calculation data via an HTTP POST command. Payload is in JSON format.
* ``a1``-``a8`` are the angles/tilt readings (up to 5 are currently supported) * ``a1``-``a10`` are the angles/tilt readings (up to 10 are currently supported)
* ``g1``-``g8`` are the corresponding gravity reaadings (in SG) * ``g1``-``g10`` are the corresponding gravity reaadings (in SG)
Payload should be in standard format used for posting a form. Such as as: `id=value&mdns=value` etc. Key value pairs are shown below. Payload should be in standard format used for posting a form. Such as as: `id=value&mdns=value` etc. Key value pairs are shown below.
@ -340,6 +332,8 @@ Payload should be in standard format used for posting a form. Such as as: `id=va
a6=0 a6=0
a7=0 a7=0
a8=0 a8=0
a9=0
a19=0
g1=1.000 g1=1.000
g2=1.053 g2=1.053
g3=1.062 g3=1.062
@ -348,6 +342,8 @@ Payload should be in standard format used for posting a form. Such as as: `id=va
g6=1 g6=1
g7=1 g7=1
g8=1 g8=1
g9=1
g10=1
Calling the API's from Python Calling the API's from Python
@ -433,6 +429,8 @@ The requests package converts the json to standard form post format.
"a6": 0, "a6": 0,
"a7": 0, "a7": 0,
"a8": 0, "a8": 0,
"a9": 0,
"a10": 0,
"g1": 1.000, "g1": 1.000,
"g2": 1.053, "g2": 1.053,
"g3": 1.062, "g3": 1.062,
@ -440,6 +438,8 @@ The requests package converts the json to standard form post format.
"g5": 1, "g5": 1,
"g6": 1, "g6": 1,
"g7": 1, "g7": 1,
"g8": 1 "g8": 1,
"g9": 1,
"g10": 1
} }
set_config( url, json ) set_config( url, json )

View File

@ -29,8 +29,9 @@ 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. * gravity32-release: Version for ESP32.
* gravity32-perf: Version for ESP32 but contains code for measuring performance.
.. note:: .. 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, 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,
@ -68,8 +69,6 @@ Source structure
- Source code for software - Source code for software
* - /src_docs * - /src_docs
- Source code for documentation - Source code for documentation
* - /stl
- 3d models
* - /test * - /test
- Test data for developing html files - Test data for developing html files

View File

@ -282,7 +282,41 @@ Advanded Settings
:width: 800 :width: 800
:alt: Advanced Settings :alt: Advanced Settings
* **Header:** .. warning::
To be described Changeing these parameters with caution. The wrong values might cause the device to become unresponsive.
* **Gyro reads:**
This defines how many gyro reads will be done before an angle is calculated. More reads will give better accuracy and also allow detection of
movement. Too many reads will take time and affecte batterylife. 50 takes about 800 ms to execute.
* **Gyro moving threashold:**
This is the max amount of deviation allowed for a stable reading.
* **Formula deviation:**
This is the maximum devation on the formlula allowed for it to be accepted. Once the formula has been derived it will be validated against the supplied
data and of the deviation on any point is bigger the formula will be rejected.
* **DS18B20 Resolution:**
Define the resolution used on the temp sensor. 9 bits is default and will give an accuracy of 0.5C, 12 bits will give an accuracy of 0.0625C but will also
take longer time to measure..
* **Wifi connect timeout:**
This is the amount of time allowed for a wifi connect.
* **Wifi portal timeout:**
If the wifi portal is triggered (can be triggerd by reset) then this is the amount of time allowed before it exists again.
* **Skip Interval (...):**
These options allow the user to have variable push intervals for the diffrent endpoints. 0 means that every wakeup will send data to that endpoint. If you enter another number then that defines how many sleep cycles will be skipped.
If the sleep interval is 300s and MQTT is set to 0 and HTTP1 is set to 2 then MQTT will be sent every 300s while HTTP1 would be sent 900s. This is great if you want to send data to a local mqtt server often but brewfather will only
accept data every 15 min.

View File

@ -7,7 +7,7 @@ Create formula
:width: 800 :width: 800
:alt: Formula data :alt: Formula data
Here you can enter up to 5 values (angles + gravity) that is then used to create the formula. Angles equal to zero will be regarded as empty even if there is a gravity reading. Here you can enter up to 10 values (angles + gravity) that is then used to create the formula. Angles equal to zero will be regarded as empty even if there is a gravity reading.
.. image:: images/formula2.png .. image:: images/formula2.png
:width: 800 :width: 800

View File

@ -33,10 +33,10 @@ The main features
Currently the device supports the following endpoints. Currently the device supports the following endpoints.
* http or https * http (ssl optional)
* influxdb v2 * influxdb v2 (ssl optional)
* MQTT (ssl optional)
* Brewfather * Brewfather
* MQTT
* Home Assistant * Home Assistant
* Brew Spy * Brew Spy
* Brewers Friend * Brewers Friend
@ -65,11 +65,9 @@ The main features
Another big difference is that this software can create the gravity formula in the device, just enter the Another big difference is that this software can create the gravity formula in the device, just enter the
angle/gravity data that you have collected. You will also see a graph simulating how the formula would work. angle/gravity data that you have collected. You will also see a graph simulating how the formula would work.
Currently the device can handle 5 data points which should be enough to get a accurate formula. At least 3 data points Currently the device can handle 10 data points which should be enough to get a accurate formula. At least 3 data points
is needed to get an accurate formula. is needed to get an accurate formula.
If there is a need for more data points, raise a comment on github.
* **Customize the data format beeing sent to push targets** * **Customize the data format beeing sent to push targets**
In order to make it easier to support more targets there is a built in format editor that can be used to In order to make it easier to support more targets there is a built in format editor that can be used to
@ -86,7 +84,8 @@ The main features
* **OTA support from webserver** * **OTA support from webserver**
When starting up in configuration mode the device will check for a software update from a webserver. This is an easily When starting up in configuration mode the device will check for a software update from a webserver. This is an easily
way to keep the software up to date. In the future I might add a hosted endpoint for providing updates. way to keep the software up to date. In the future I might add a hosted endpoint for providing updates. OTA can also be
done over a SSL connection.
* **DS18B20 temperature adjustments** * **DS18B20 temperature adjustments**
@ -95,13 +94,14 @@ The main features
* **Gyro Movement** * **Gyro Movement**
The software will detect if the gyro is moving and if this is the case it will go back to sleep for 60seconds. The software will detect if the gyro is moving and if this is the case it will go back to sleep for 60 seconds.
This way we should avoid faulty measurements and peaks in the graphs. This way we should avoid faulty measurements and peaks in the graphs.
* **WIFI connection issues** * **WIFI connection issues**
The software will not wait indefiently for a wifi connection. If it takes longer than 20 seconds to connect then The software will not wait indefiently for a wifi connection. If it takes longer than 20 seconds to connect then
the device will go into deep sleep for 60 seoncds and then retry later. This to conserve batter as much as possible. the device will try the seconday wifi configuration, and that also failes it will go into deep sleep for 60 seconds and then
retry later. This to conserve batter as much as possible.
* **Use gyro temperature sensor** * **Use gyro temperature sensor**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -13,7 +13,8 @@ Brewflasher
=========== ===========
The prefered option for flashing GravityMon is using BrewFlasher, its a tools that support many brewing related firmwares for ESP8266 and ESP32. This works The prefered option for flashing GravityMon is using BrewFlasher, its a tools that support many brewing related firmwares for ESP8266 and ESP32. This works
on both Windows and Mac. You can download the latest version from here: `Brewflasher <https://www.brewflasher.com/>`_ on both Windows and Mac. You can download the latest version from here: `Brewflasher <https://www.brewflasher.com/>`_ there is also a web based version
available here `Brewflasher WEB <https://web.brewflasher.com/>`_.
.. image:: images/brewflasher.png .. image:: images/brewflasher.png
:width: 600 :width: 600
@ -34,7 +35,8 @@ In the /bin directory you will find 3 different firmware builds;
* **firmware32.bin** * **firmware32.bin**
This is the standard release build for an ESP32 variant This is the standard release build for an ESP32 variant. When flashing an ESP32 you also need the **partition32.bin** file that outlines the flash memory structure. Due to
the size of the firmware we are using a custom partition setup.
In these versions all the html files are embedded in the binaries. The file system is currently only used for storing In these versions all the html files are embedded in the binaries. The file system is currently only used for storing
the configuration file. the configuration file.
@ -90,7 +92,6 @@ browser and select the firmware.bin file that corresponds to the version you wan
``http://<device_name>/firmware.htm`` ``http://<device_name>/firmware.htm``
.. _serial_monitoring: .. _serial_monitoring:
Serial Monitoring Serial Monitoring
@ -120,6 +121,9 @@ in the browser: **http://192.168.4.1**
Before pressing save on the network infomration, make a note of the devicename that is shown on the screen, this will be the name that is used Before pressing save on the network infomration, make a note of the devicename that is shown on the screen, this will be the name that is used
in the next step to access the configuration pages. The link would look like this: **http://gravitymon56EA34.local** in the next step to access the configuration pages. The link would look like this: **http://gravitymon56EA34.local**
Under wifi settings you can define a primary and seconday wifi SSID. The seconday will be used in case the primary fails. If the seconday is
successful then it will be used as primary.
.. image:: images/wifi.png .. image:: images/wifi.png
:width: 200 :width: 200
:alt: Wifi page :alt: Wifi page

View File

@ -120,7 +120,7 @@ format template that can be used. For information on customizing the format see
"gravity": ${gravity}, "gravity": ${gravity},
"angle": ${angle}, "angle": ${angle},
"battery": ${battery}, "battery": ${battery},
"rssi": ${rssi} "RSSI": ${rssi}
} }
@ -146,7 +146,10 @@ device is named `gravmon2`
state_topic: "gravmon/gravmon2/battery" state_topic: "gravmon/gravmon2/battery"
- platform: mqtt - platform: mqtt
name: "gravmon2_rssi" name: "gravmon2_rssi"
state_topic: "gravmon/gravmon2/rssi" state_topic: "gravmon/gravmon2/RSSI"
- platform: mqtt
name: "gravmon2_temp"
state_topic: "gravmon/gravmon2/temp"
Enter the name of the MQTT server in Home Assistant in the URL. You might need to install that option Enter the name of the MQTT server in Home Assistant in the URL. You might need to install that option
@ -155,9 +158,10 @@ many sensors / topics as you want.
:: ::
gravmon/${mdns}/tilt:${angle}| gravmon/${mdns}/gravity:${gravity}|
gravmon/${mdns}/temperature:${temp}| gravmon/${mdns}/battery:${battery}|
gravmon/${mdns}/temp_units:${temp-unit}| gravmon/${mdns}/RSSI:${rssi}|
gravmon/${mdns}/temp:${temp}|
Brewer's Friend Brewer's Friend
@ -194,7 +198,7 @@ format for the endpoint. Just add you API key after token.
"gravity": ${gravity}, "gravity": ${gravity},
"angle": ${angle}, "angle": ${angle},
"battery": ${battery}, "battery": ${battery},
"rssi": ${rssi} "RSSI": ${rssi}
} }
@ -260,4 +264,3 @@ starting with a ``?``. This string will be added to the URL above when doing the
.. code-block:: .. code-block::
?token=${token2}&v1=${temp}&v2=${gravity}&v3=${angle} ?token=${token2}&v1=${temp}&v2=${gravity}&v3=${angle}

View File

@ -53,6 +53,7 @@ Log errors
* -9 - Error encoding * -9 - Error encoding
* -10 - Error writing to stream * -10 - Error writing to stream
* -11 - Read timeout * -11 - Read timeout
* -100 - Endpoint skipped since its SSL and the device is in gravity mode
* MQTT push on <topic> failed error * MQTT push on <topic> failed error