Updated docs for v0.5
This commit is contained in:
parent
298ea1de61
commit
5573e06155
@ -1,5 +1,5 @@
|
|||||||
Backlog of changes
|
Backlog of changes
|
||||||
######################################
|
##################
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
@ -9,8 +9,8 @@ One of the following conditions will place the device in `configuration mode`:
|
|||||||
- Placed in horizontal mode 85-90 degrees
|
- Placed in horizontal mode 85-90 degrees
|
||||||
- Charger connected >4.15V
|
- Charger connected >4.15V
|
||||||
|
|
||||||
Main index
|
Status
|
||||||
==========
|
======
|
||||||
|
|
||||||
URL: (http://gravmon.local)
|
URL: (http://gravmon.local)
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ Gravity Settings
|
|||||||
|
|
||||||
This is the formula used for temperature calibration (temp is in F). Cal = 20C.
|
This is the formula used for temperature calibration (temp is in F). Cal = 20C.
|
||||||
|
|
||||||
::
|
.. code-block::
|
||||||
|
|
||||||
gravity*((1.00130346-0.000134722124*temp+0.00000204052596*temp^2-0.00000000232820948*temp^3)/(1.00130346-0.000134722124*cal+0.00000204052596*cal^2-0.00000000232820948*cal^3))
|
gravity*((1.00130346-0.000134722124*temp+0.00000204052596*temp^2-0.00000000232820948*temp^3)/(1.00130346-0.000134722124*cal+0.00000204052596*cal^2-0.00000000232820948*cal^3))
|
||||||
|
|
||||||
@ -169,19 +169,11 @@ Hardware Settings
|
|||||||
|
|
||||||
Example; OTA URL (don't forget trailing dash), the name of the file should be firmware.bin
|
Example; OTA URL (don't forget trailing dash), the name of the file should be firmware.bin
|
||||||
|
|
||||||
::
|
.. code-block::
|
||||||
|
|
||||||
http://192.168.1.1/firmware/gravmon/
|
http://192.168.1.1/firmware/gravmon/
|
||||||
|
|
||||||
|
|
||||||
Contents version.json. The version is used by the device to check if the this version is newer. The html files will also be downloaded if the are present on the server. This way it's easy to
|
|
||||||
upgrade to a version that serve the html files from the file system. If they dont exist nothing will happen, the OTA flashing will still work. If the html files are missing from the file system
|
|
||||||
they can be uploaded manually afterwards.
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
{ "project":"gravmon", "version":"0.4.10", "html": [ "index.min.htm", "device.min.htm", "config.min.htm", "calibration.min.htm", "about.min.htm" ] }
|
|
||||||
|
|
||||||
|
|
||||||
Create formula
|
Create formula
|
||||||
=============================
|
=============================
|
||||||
@ -202,12 +194,19 @@ Once the formula is created a graph over the entered values and a simulation of
|
|||||||
REST API
|
REST API
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
|
All the API's use a key called ``ID`` which is the unique device id (chip id). This is used as an API key when sending requests to the device.
|
||||||
|
|
||||||
GET: /api/config
|
GET: /api/config
|
||||||
****************
|
****************
|
||||||
|
|
||||||
Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.
|
Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``temp-format`` can be either ``C`` or ``F``
|
||||||
|
* ``gravity-format`` is always ``G`` (plato is not yet supported)
|
||||||
|
|
||||||
|
Other parameters are the same as in the configuration guide.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"mdns": "gravmon",
|
"mdns": "gravmon",
|
||||||
@ -246,7 +245,7 @@ GET: /api/device
|
|||||||
|
|
||||||
Retrive the current device settings via an HTTP GET command. Payload is in JSON format.
|
Retrive the current device settings via an HTTP GET command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"app-name": "GravityMon ",
|
"app-name": "GravityMon ",
|
||||||
@ -261,7 +260,11 @@ GET: /api/status
|
|||||||
|
|
||||||
Retrive the current device status via an HTTP GET command. Payload is in JSON format.
|
Retrive the current device status via an HTTP GET command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``temp-format`` can be either ``C`` or ``F``
|
||||||
|
|
||||||
|
Other parameters are the same as in the configuration guide.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc",
|
"id": "ee1bfc",
|
||||||
@ -282,16 +285,19 @@ 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``-``a4`` are the angles/tilt readings (up to 5 are currently supported)
|
||||||
|
* ``g1``-``g4`` are the corresponding gravity reaadings (in SG)
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"a1": 22.4, // Angles 1-5
|
"a1": 22.4,
|
||||||
"a2": 54.4,
|
"a2": 54.4,
|
||||||
"a3": 58,
|
"a3": 58,
|
||||||
"a4": 0,
|
"a4": 0,
|
||||||
"a5": 0,
|
"a5": 0,
|
||||||
"g1": 1.000, // Gravity 1-5
|
"g1": 1.000,
|
||||||
"g2": 1.053,
|
"g2": 1.053,
|
||||||
"g3": 1.062,
|
"g3": 1.062,
|
||||||
"g4": 1,
|
"g4": 1,
|
||||||
@ -305,13 +311,15 @@ POST: /api/config/device
|
|||||||
|
|
||||||
Used to update device settings via an HTTP POST command. Payload is in JSON format.
|
Used to update device settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``temp-format`` can be either ``C`` or ``F``
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"mdns": "gravmon", // Network name / Device name
|
"mdns": "gravmon",
|
||||||
"temp-format": "C", // Can be either C or F
|
"temp-format": "C",
|
||||||
"sleep-interval": 30 // Time in seconds.
|
"sleep-interval": 30
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -320,10 +328,10 @@ POST: /api/config/push
|
|||||||
|
|
||||||
Used to update push settings via an HTTP POST command. Payload is in JSON format.
|
Used to update push settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"http-push": "http://192.168.1.50/ispindel",
|
"http-push": "http://192.168.1.50/ispindel",
|
||||||
"http-push2": "",
|
"http-push2": "",
|
||||||
"brewfather-push": "",
|
"brewfather-push": "",
|
||||||
@ -339,12 +347,14 @@ POST: /api/config/gravity
|
|||||||
|
|
||||||
Used to update gravity settings via an HTTP POST command. Payload is in JSON format.
|
Used to update gravity settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``gravity-formula`` keywords ``temp`` and ``tilt`` are supported.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"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",
|
||||||
"gravity-temp-adjustment": "off" // Can be on or off
|
"gravity-temp-adjustment": "off"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -353,10 +363,10 @@ POST: /api/config/gravity
|
|||||||
|
|
||||||
Used to update hardware settings via an HTTP POST command. Payload is in JSON format.
|
Used to update hardware settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"voltage-factor": 1.59,
|
"voltage-factor": 1.59,
|
||||||
"temp-adjustment": 0,
|
"temp-adjustment": 0,
|
||||||
"ota-url": "http://192.168.1.50/firmware/gravmon/"
|
"ota-url": "http://192.168.1.50/firmware/gravmon/"
|
||||||
@ -368,16 +378,19 @@ 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``-``a4`` are the angles/tilt readings (up to 5 are currently supported)
|
||||||
|
* ``g1``-``g4`` are the corresponding gravity reaadings (in SG)
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"a1": 22.4, // Angles 1-5
|
"a1": 22.4,
|
||||||
"a2": 54.4,
|
"a2": 54.4,
|
||||||
"a3": 58,
|
"a3": 58,
|
||||||
"a4": 0,
|
"a4": 0,
|
||||||
"a5": 0,
|
"a5": 0,
|
||||||
"g1": 1.000, // Gravity 1-5
|
"g1": 1.000,
|
||||||
"g2": 1.053,
|
"g2": 1.053,
|
||||||
"g3": 1.062,
|
"g3": 1.062,
|
||||||
"g4": 1,
|
"g4": 1,
|
||||||
@ -393,23 +406,24 @@ iSpindle format
|
|||||||
|
|
||||||
This is the format used for standard http posts.
|
This is the format used for standard http posts.
|
||||||
|
|
||||||
::
|
* ``corr-gravity`` is an extended parameter containing a temperature corrected gravity reading.
|
||||||
|
* ``run-time`` is an extended parameter containing the number of seconds the execution took.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name" : "gravmon", // mDNS name
|
"name" : "gravmon",
|
||||||
"ID": "2E6753", // esp device id
|
"ID": "2E6753",
|
||||||
"token" : "gravmon",
|
"token" : "gravmon",
|
||||||
"interval": 900,
|
"interval": 900,
|
||||||
"temperature": 20.5, // C or F based on setting, adjusted value.
|
"temperature": 20.5,
|
||||||
"temp-units": "C", // C or F based on setting
|
"temp-units": "C",
|
||||||
"gravity": 1.0050, // Raw or temperature corrected gravity (based on setting)
|
"gravity": 1.0050,
|
||||||
"corr-gravity": 1.0050, // Temperature corrected gravity
|
"corr-gravity": 1.0050,
|
||||||
"angle": 45.34,
|
"angle": 45.34,
|
||||||
"battery": 3.67,
|
"battery": 3.67,
|
||||||
"rssi": -12,
|
"rssi": -12,
|
||||||
|
"run-time": 6
|
||||||
// Extension fields
|
|
||||||
"run-time": 230, // ms, Runtime for this reading, this is an additional field not part of the standard format
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -419,15 +433,15 @@ Brewfather format
|
|||||||
This is the format for Brewfather
|
This is the format for Brewfather
|
||||||
|
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name" : "gravmon", // mDNS name
|
"name" : "gravmon",
|
||||||
"temp": 20.5,
|
"temp": 20.5,
|
||||||
"temp-unit": "C",
|
"temp-unit": "C",
|
||||||
"battery": 3.67,
|
"battery": 3.67,
|
||||||
"gravity": 1.0050,
|
"gravity": 1.0050,
|
||||||
"gravity_unit": "G", // G = SG, Plato is not yet supported
|
"gravity_unit": "G",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -436,8 +450,28 @@ Influx DB v2
|
|||||||
|
|
||||||
This is the format for InfluxDB v2
|
This is the format for InfluxDB v2
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
::
|
|
||||||
|
|
||||||
measurement,host=<mdns>,device=<id>,temp-format=<C|F>,gravity-format=SG,gravity=1.0004,corr-gravity=1.0004,angle=45.45,temp=20.1,battery=3.96,rssi=-18
|
measurement,host=<mdns>,device=<id>,temp-format=<C|F>,gravity-format=SG,gravity=1.0004,corr-gravity=1.0004,angle=45.45,temp=20.1,battery=3.96,rssi=-18
|
||||||
|
|
||||||
|
|
||||||
|
version.json
|
||||||
|
************
|
||||||
|
|
||||||
|
Contents version.json. The version is used by the device to check if the this version is newer. The html files will also be downloaded if the are present on the server. This way it's easy to
|
||||||
|
upgrade to a version that serve the html files from the file system. If they dont exist nothing will happen, the OTA flashing will still work. If the html files are missing from the file system
|
||||||
|
they can be uploaded manually afterwards.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"project":"gravmon",
|
||||||
|
"version":"0.4.10",
|
||||||
|
"html": [
|
||||||
|
"index.min.htm",
|
||||||
|
"device.min.htm",
|
||||||
|
"config.min.htm",
|
||||||
|
"calibration.min.htm",
|
||||||
|
"about.min.htm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
@ -8,7 +8,7 @@ Welcome to GravityMon's documentation!
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Preliminary documentation. This is work in progress.
|
Preliminary documentation. This is work in progress. This documentation reflects **v0.5**
|
||||||
|
|
||||||
|
|
||||||
GravityMon is a replacement firmare for the iSpindle hardware. It's used to measure gravity in beer and show the progress
|
GravityMon is a replacement firmare for the iSpindle hardware. It's used to measure gravity in beer and show the progress
|
||||||
|
@ -1,7 +1,20 @@
|
|||||||
Releases
|
Releases
|
||||||
------------
|
========
|
||||||
|
|
||||||
There is not yet any releases publised.
|
v0.5.0 (beta)
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Latest next target version is: **v0.5.0**. This is hosted in the **dev branch**.
|
||||||
|
|
||||||
|
* Added feature to calcuate formula on device
|
||||||
|
* Total rewrite of documentation
|
||||||
|
* WIFI settings are now stored in config file
|
||||||
|
* Defined version numbers for all dependant libraries to avoid updates breaking build.
|
||||||
|
* Cleanup of code
|
||||||
|
* Refactor code from C to C++
|
||||||
|
|
||||||
|
v0.4.0
|
||||||
|
------
|
||||||
|
|
||||||
Latest stable development version is: **v0.4.0**
|
Latest stable development version is: **v0.4.0**
|
||||||
|
|
||||||
|
58
docs/_sources/styling.rst.txt
Normal file
58
docs/_sources/styling.rst.txt
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
Testing formatting
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Header 1
|
||||||
|
########
|
||||||
|
|
||||||
|
Header 2
|
||||||
|
--------
|
||||||
|
|
||||||
|
Header 3
|
||||||
|
********
|
||||||
|
|
||||||
|
**BOLD**
|
||||||
|
|
||||||
|
*ITALIC*
|
||||||
|
|
||||||
|
``CODE SAMPLE``
|
||||||
|
|
||||||
|
1. List
|
||||||
|
2. List
|
||||||
|
|
||||||
|
* List
|
||||||
|
* List
|
||||||
|
|
||||||
|
.. list-table:: Table
|
||||||
|
:widths: 40 60
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - table
|
||||||
|
- table
|
||||||
|
* - content
|
||||||
|
- content
|
||||||
|
|
||||||
|
.. image:: images/formula1.png
|
||||||
|
:width: 400
|
||||||
|
:alt: image
|
||||||
|
|
||||||
|
.. code-block:: objdump
|
||||||
|
|
||||||
|
measurement,host=<mdns>,device=<id>,temp-format=<C|F>,gravity-format=SG,gravity=1.0004,corr-gravity=1.0004,angle=45.45,temp=20.1,battery=3.96,rssi=-18
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"project":"gravmon",
|
||||||
|
"version":"0.4.10",
|
||||||
|
"html": [
|
||||||
|
"index.min.htm",
|
||||||
|
"device.min.htm",
|
||||||
|
"config.min.htm",
|
||||||
|
"calibration.min.htm",
|
||||||
|
"about.min.htm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Note...
|
@ -43,7 +43,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
||||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration</a><ul>
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration</a><ul>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="#main-index">Main index</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="#status">Status</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="#device">Device</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="#device">Device</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="#id1">Configuration</a><ul>
|
<li class="toctree-l2"><a class="reference internal" href="#id1">Configuration</a><ul>
|
||||||
<li class="toctree-l3"><a class="reference internal" href="#device-setting">Device Setting</a></li>
|
<li class="toctree-l3"><a class="reference internal" href="#device-setting">Device Setting</a></li>
|
||||||
@ -69,6 +69,7 @@
|
|||||||
<li class="toctree-l3"><a class="reference internal" href="#ispindle-format">iSpindle format</a></li>
|
<li class="toctree-l3"><a class="reference internal" href="#ispindle-format">iSpindle format</a></li>
|
||||||
<li class="toctree-l3"><a class="reference internal" href="#brewfather-format">Brewfather format</a></li>
|
<li class="toctree-l3"><a class="reference internal" href="#brewfather-format">Brewfather format</a></li>
|
||||||
<li class="toctree-l3"><a class="reference internal" href="#influx-db-v2">Influx DB v2</a></li>
|
<li class="toctree-l3"><a class="reference internal" href="#influx-db-v2">Influx DB v2</a></li>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#version-json">version.json</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -76,6 +77,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="backlog.html#header-1">Header 1</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -112,8 +114,8 @@
|
|||||||
<li><p>Placed in horizontal mode 85-90 degrees</p></li>
|
<li><p>Placed in horizontal mode 85-90 degrees</p></li>
|
||||||
<li><p>Charger connected >4.15V</p></li>
|
<li><p>Charger connected >4.15V</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<section id="main-index">
|
<section id="status">
|
||||||
<h2>Main index<a class="headerlink" href="#main-index" title="Permalink to this headline"></a></h2>
|
<h2>Status<a class="headerlink" href="#status" title="Permalink to this headline"></a></h2>
|
||||||
<p>URL: (<a class="reference external" href="http://gravmon.local">http://gravmon.local</a>)</p>
|
<p>URL: (<a class="reference external" href="http://gravmon.local">http://gravmon.local</a>)</p>
|
||||||
<a class="reference internal image-reference" href="_images/index.png"><img alt="Index page" src="_images/index.png" style="width: 800px;" /></a>
|
<a class="reference internal image-reference" href="_images/index.png"><img alt="Index page" src="_images/index.png" style="width: 800px;" /></a>
|
||||||
<p>Configuration is accessed by entering the URL for the device, this will be the mDNS name <em>device.local</em> or the IP adress. The following chapter assumes the device name is <em>gravmon</em>.</p>
|
<p>Configuration is accessed by entering the URL for the device, this will be the mDNS name <em>device.local</em> or the IP adress. The following chapter assumes the device name is <em>gravmon</em>.</p>
|
||||||
@ -270,14 +272,6 @@ code the update will be done during startup.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="mf">192.168.1.1</span><span class="o">/</span><span class="n">firmware</span><span class="o">/</span><span class="n">gravmon</span><span class="o">/</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="mf">192.168.1.1</span><span class="o">/</span><span class="n">firmware</span><span class="o">/</span><span class="n">gravmon</span><span class="o">/</span>
|
||||||
|
|
||||||
|
|
||||||
<span class="n">Contents</span> <span class="n">version</span><span class="o">.</span><span class="n">json</span><span class="o">.</span> <span class="n">The</span> <span class="n">version</span> <span class="ow">is</span> <span class="n">used</span> <span class="n">by</span> <span class="n">the</span> <span class="n">device</span> <span class="n">to</span> <span class="n">check</span> <span class="k">if</span> <span class="n">the</span> <span class="n">this</span> <span class="n">version</span> <span class="ow">is</span> <span class="n">newer</span><span class="o">.</span> <span class="n">The</span> <span class="n">html</span> <span class="n">files</span> <span class="n">will</span> <span class="n">also</span> <span class="n">be</span> <span class="n">downloaded</span> <span class="k">if</span> <span class="n">the</span> <span class="n">are</span> <span class="n">present</span> <span class="n">on</span> <span class="n">the</span> <span class="n">server</span><span class="o">.</span> <span class="n">This</span> <span class="n">way</span> <span class="n">it</span><span class="s1">'s easy to</span>
|
|
||||||
<span class="n">upgrade</span> <span class="n">to</span> <span class="n">a</span> <span class="n">version</span> <span class="n">that</span> <span class="n">serve</span> <span class="n">the</span> <span class="n">html</span> <span class="n">files</span> <span class="kn">from</span> <span class="nn">the</span> <span class="n">file</span> <span class="n">system</span><span class="o">.</span> <span class="n">If</span> <span class="n">they</span> <span class="n">dont</span> <span class="n">exist</span> <span class="n">nothing</span> <span class="n">will</span> <span class="n">happen</span><span class="p">,</span> <span class="n">the</span> <span class="n">OTA</span> <span class="n">flashing</span> <span class="n">will</span> <span class="n">still</span> <span class="n">work</span><span class="o">.</span> <span class="n">If</span> <span class="n">the</span> <span class="n">html</span> <span class="n">files</span> <span class="n">are</span> <span class="n">missing</span> <span class="kn">from</span> <span class="nn">the</span> <span class="n">file</span> <span class="n">system</span>
|
|
||||||
<span class="n">they</span> <span class="n">can</span> <span class="n">be</span> <span class="n">uploaded</span> <span class="n">manually</span> <span class="n">afterwards</span><span class="o">.</span>
|
|
||||||
</pre></div>
|
|
||||||
</div>
|
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="s2">"project"</span><span class="p">:</span><span class="s2">"gravmon"</span><span class="p">,</span> <span class="s2">"version"</span><span class="p">:</span><span class="s2">"0.4.10"</span><span class="p">,</span> <span class="s2">"html"</span><span class="p">:</span> <span class="p">[</span> <span class="s2">"index.min.htm"</span><span class="p">,</span> <span class="s2">"device.min.htm"</span><span class="p">,</span> <span class="s2">"config.min.htm"</span><span class="p">,</span> <span class="s2">"calibration.min.htm"</span><span class="p">,</span> <span class="s2">"about.min.htm"</span> <span class="p">]</span> <span class="p">}</span>
|
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -291,159 +285,183 @@ code the update will be done during startup.</p>
|
|||||||
</section>
|
</section>
|
||||||
<section id="rest-api">
|
<section id="rest-api">
|
||||||
<h2>REST API<a class="headerlink" href="#rest-api" title="Permalink to this headline"></a></h2>
|
<h2>REST API<a class="headerlink" href="#rest-api" title="Permalink to this headline"></a></h2>
|
||||||
|
<p>All the API’s use a key called <code class="docutils literal notranslate"><span class="pre">ID</span></code> which is the unique device id (chip id). This is used as an API key when sending requests to the device.</p>
|
||||||
<section id="get-api-config">
|
<section id="get-api-config">
|
||||||
<h3>GET: /api/config<a class="headerlink" href="#get-api-config" title="Permalink to this headline"></a></h3>
|
<h3>GET: /api/config<a class="headerlink" href="#get-api-config" title="Permalink to this headline"></a></h3>
|
||||||
<p>Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.</p>
|
<p>Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<ul class="simple">
|
||||||
<span class="s2">"mdns"</span><span class="p">:</span> <span class="s2">"gravmon"</span><span class="p">,</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">temp-format</span></code> can be either <code class="docutils literal notranslate"><span class="pre">C</span></code> or <code class="docutils literal notranslate"><span class="pre">F</span></code></p></li>
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">gravity-format</span></code> is always <code class="docutils literal notranslate"><span class="pre">G</span></code> (plato is not yet supported)</p></li>
|
||||||
<span class="s2">"ota-url"</span><span class="p">:</span> <span class="s2">"http://192.168.1.50:80/firmware/gravmon/"</span><span class="p">,</span>
|
</ul>
|
||||||
<span class="s2">"temp-format"</span><span class="p">:</span> <span class="s2">"C"</span><span class="p">,</span>
|
<p>Other parameters are the same as in the configuration guide.</p>
|
||||||
<span class="s2">"brewfather-push"</span><span class="p">:</span> <span class="s2">"http://log.brewfather.net/stream?id=Qwerty"</span><span class="p">,</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"http-push"</span><span class="p">:</span> <span class="s2">"http://192.168.1.50:9090/api/v1/Qwerty/telemetry"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"mdns"</span><span class="p">:</span><span class="w"> </span><span class="s2">"gravmon"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"http-push2"</span><span class="p">:</span> <span class="s2">"http://192.168.1.50/ispindel"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-push"</span><span class="p">:</span> <span class="s2">"http://192.168.1.50:8086"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"ota-url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://192.168.1.50:80/firmware/gravmon/"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-org"</span><span class="p">:</span> <span class="s2">"Qwerty"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temp-format"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-bucket"</span><span class="p">:</span> <span class="s2">"Qwerty"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"brewfather-push"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://log.brewfather.net/stream?id=Qwerty"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-auth"</span><span class="p">:</span> <span class="s2">"Qwerty"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"http-push"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://192.168.1.50:9090/api/v1/Qwerty/telemetry"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"sleep-interval"</span><span class="p">:</span> <span class="mi">30</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"http-push2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://192.168.1.50/ispindel"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"voltage-factor"</span><span class="p">:</span> <span class="mf">1.59</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"influxdb2-push"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://192.168.1.50:8086"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity-formula"</span><span class="p">:</span> <span class="s2">"0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"influxdb2-org"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Qwerty"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity-format"</span><span class="p">:</span> <span class="s2">"G"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"influxdb2-bucket"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Qwerty"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"temp-adjustment-value"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"influxdb2-auth"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Qwerty"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity-temp-adjustment"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"sleep-interval"</span><span class="p">:</span><span class="w"> </span><span class="mi">30</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gyro-calibration-data"</span><span class="p">:</span> <span class="p">{</span>
|
<span class="w"> </span><span class="nt">"voltage-factor"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.59</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"ax"</span><span class="p">:</span> <span class="o">-</span><span class="mi">330</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gravity-formula"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"ay"</span><span class="p">:</span> <span class="o">-</span><span class="mi">2249</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gravity-format"</span><span class="p">:</span><span class="w"> </span><span class="s2">"G"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"az"</span><span class="p">:</span> <span class="mi">1170</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temp-adjustment-value"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gx"</span><span class="p">:</span> <span class="mi">99</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gravity-temp-adjustment"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gy"</span><span class="p">:</span> <span class="o">-</span><span class="mi">6</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gyro-calibration-data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"gz"</span><span class="p">:</span> <span class="mi">4</span>
|
<span class="w"> </span><span class="nt">"ax"</span><span class="p">:</span><span class="w"> </span><span class="mi">-330</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">},</span>
|
<span class="w"> </span><span class="nt">"ay"</span><span class="p">:</span><span class="w"> </span><span class="mi">-2249</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"angle"</span><span class="p">:</span> <span class="mf">90.93</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"az"</span><span class="p">:</span><span class="w"> </span><span class="mi">1170</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity"</span><span class="p">:</span> <span class="mf">1.105</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gx"</span><span class="p">:</span><span class="w"> </span><span class="mi">99</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"battery"</span><span class="p">:</span> <span class="mf">0.04</span>
|
<span class="w"> </span><span class="nt">"gy"</span><span class="p">:</span><span class="w"> </span><span class="mi">-6</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="w"> </span><span class="nt">"gz"</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="p">},</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"angle"</span><span class="p">:</span><span class="w"> </span><span class="mf">90.93</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"gravity"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.105</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"battery"</span><span class="p">:</span><span class="w"> </span><span class="mf">0.04</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="get-api-device">
|
<section id="get-api-device">
|
||||||
<h3>GET: /api/device<a class="headerlink" href="#get-api-device" title="Permalink to this headline"></a></h3>
|
<h3>GET: /api/device<a class="headerlink" href="#get-api-device" title="Permalink to this headline"></a></h3>
|
||||||
<p>Retrive the current device settings via an HTTP GET command. Payload is in JSON format.</p>
|
<p>Retrive the current device settings via an HTTP GET command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"app-name"</span><span class="p">:</span> <span class="s2">"GravityMon "</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"app-name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"GravityMon "</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"app-ver"</span><span class="p">:</span> <span class="s2">"0.0.0"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"app-ver"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.0.0"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"mdns"</span><span class="p">:</span> <span class="s2">"gravmon"</span>
|
<span class="w"> </span><span class="nt">"mdns"</span><span class="p">:</span><span class="w"> </span><span class="s2">"gravmon"</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="get-api-status">
|
<section id="get-api-status">
|
||||||
<h3>GET: /api/status<a class="headerlink" href="#get-api-status" title="Permalink to this headline"></a></h3>
|
<h3>GET: /api/status<a class="headerlink" href="#get-api-status" title="Permalink to this headline"></a></h3>
|
||||||
<p>Retrive the current device status via an HTTP GET command. Payload is in JSON format.</p>
|
<p>Retrive the current device status via an HTTP GET command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<ul class="simple">
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">temp-format</span></code> can be either <code class="docutils literal notranslate"><span class="pre">C</span></code> or <code class="docutils literal notranslate"><span class="pre">F</span></code></p></li>
|
||||||
<span class="s2">"angle"</span><span class="p">:</span> <span class="mf">89.86</span><span class="p">,</span>
|
</ul>
|
||||||
<span class="s2">"gravity"</span><span class="p">:</span> <span class="mf">1.1052</span><span class="p">,</span>
|
<p>Other parameters are the same as in the configuration guide.</p>
|
||||||
<span class="s2">"gravity-tempcorr"</span><span class="p">:</span> <span class="mf">1.1031</span><span class="p">,</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"temp-c"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"temp-f"</span><span class="p">:</span> <span class="mi">32</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"angle"</span><span class="p">:</span><span class="w"> </span><span class="mf">89.86</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"battery"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gravity"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.1052</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"temp-format"</span><span class="p">:</span> <span class="s2">"C"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gravity-tempcorr"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.1031</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"sleep-mode"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temp-c"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"rssi"</span><span class="p">:</span> <span class="o">-</span><span class="mi">56</span>
|
<span class="w"> </span><span class="nt">"temp-f"</span><span class="p">:</span><span class="w"> </span><span class="mi">32</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="w"> </span><span class="nt">"battery"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"temp-format"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"sleep-mode"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"rssi"</span><span class="p">:</span><span class="w"> </span><span class="mi">-56</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="get-api-config-formula">
|
<section id="get-api-config-formula">
|
||||||
<h3>GET: /api/config/formula<a class="headerlink" href="#get-api-config-formula" title="Permalink to this headline"></a></h3>
|
<h3>GET: /api/config/formula<a class="headerlink" href="#get-api-config-formula" title="Permalink to this headline"></a></h3>
|
||||||
<p>Retrive the data used for formula calculation data via an HTTP GET command. Payload is in JSON format.</p>
|
<p>Retrive the data used for formula calculation data via an HTTP GET command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<ul class="simple">
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Unique</span> <span class="nb">id</span> <span class="n">of</span> <span class="n">the</span> <span class="n">device</span> <span class="p">(</span><span class="n">API</span> <span class="n">Key</span><span class="p">)</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">a1</span></code>-<code class="docutils literal notranslate"><span class="pre">a4</span></code> are the angles/tilt readings (up to 5 are currently supported)</p></li>
|
||||||
<span class="s2">"a1"</span><span class="p">:</span> <span class="mf">22.4</span><span class="p">,</span> <span class="o">//</span> <span class="n">Angles</span> <span class="mi">1</span><span class="o">-</span><span class="mi">5</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">g1</span></code>-<code class="docutils literal notranslate"><span class="pre">g4</span></code> are the corresponding gravity reaadings (in SG)</p></li>
|
||||||
<span class="s2">"a2"</span><span class="p">:</span> <span class="mf">54.4</span><span class="p">,</span>
|
</ul>
|
||||||
<span class="s2">"a3"</span><span class="p">:</span> <span class="mi">58</span><span class="p">,</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"a4"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"a5"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a1"</span><span class="p">:</span><span class="w"> </span><span class="mf">22.4</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g1"</span><span class="p">:</span> <span class="mf">1.000</span><span class="p">,</span> <span class="o">//</span> <span class="n">Gravity</span> <span class="mi">1</span><span class="o">-</span><span class="mi">5</span>
|
<span class="w"> </span><span class="nt">"a2"</span><span class="p">:</span><span class="w"> </span><span class="mf">54.4</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g2"</span><span class="p">:</span> <span class="mf">1.053</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a3"</span><span class="p">:</span><span class="w"> </span><span class="mi">58</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g3"</span><span class="p">:</span> <span class="mf">1.062</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a4"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g4"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a5"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g5"</span><span class="p">:</span> <span class="mi">1</span>
|
<span class="w"> </span><span class="nt">"g1"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.000</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity-formula"</span><span class="p">:</span> <span class="s2">"0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"g2"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.053</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="w"> </span><span class="nt">"g3"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.062</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"g4"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"g5"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"gravity-formula"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="post-api-config-device">
|
<section id="post-api-config-device">
|
||||||
<h3>POST: /api/config/device<a class="headerlink" href="#post-api-config-device" title="Permalink to this headline"></a></h3>
|
<h3>POST: /api/config/device<a class="headerlink" href="#post-api-config-device" title="Permalink to this headline"></a></h3>
|
||||||
<p>Used to update device settings via an HTTP POST command. Payload is in JSON format.</p>
|
<p>Used to update device settings via an HTTP POST command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<ul class="simple">
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Unique</span> <span class="nb">id</span> <span class="n">of</span> <span class="n">the</span> <span class="n">device</span> <span class="p">(</span><span class="n">API</span> <span class="n">Key</span><span class="p">)</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">temp-format</span></code> can be either <code class="docutils literal notranslate"><span class="pre">C</span></code> or <code class="docutils literal notranslate"><span class="pre">F</span></code></p></li>
|
||||||
<span class="s2">"mdns"</span><span class="p">:</span> <span class="s2">"gravmon"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Network</span> <span class="n">name</span> <span class="o">/</span> <span class="n">Device</span> <span class="n">name</span>
|
</ul>
|
||||||
<span class="s2">"temp-format"</span><span class="p">:</span> <span class="s2">"C"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Can</span> <span class="n">be</span> <span class="n">either</span> <span class="n">C</span> <span class="ow">or</span> <span class="n">F</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"sleep-interval"</span><span class="p">:</span> <span class="mi">30</span> <span class="o">//</span> <span class="n">Time</span> <span class="ow">in</span> <span class="n">seconds</span><span class="o">.</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="w"> </span><span class="nt">"mdns"</span><span class="p">:</span><span class="w"> </span><span class="s2">"gravmon"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"temp-format"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"sleep-interval"</span><span class="p">:</span><span class="w"> </span><span class="mi">30</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="post-api-config-push">
|
<section id="post-api-config-push">
|
||||||
<h3>POST: /api/config/push<a class="headerlink" href="#post-api-config-push" title="Permalink to this headline"></a></h3>
|
<h3>POST: /api/config/push<a class="headerlink" href="#post-api-config-push" title="Permalink to this headline"></a></h3>
|
||||||
<p>Used to update push settings via an HTTP POST command. Payload is in JSON format.</p>
|
<p>Used to update push settings via an HTTP POST command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Unique</span> <span class="nb">id</span> <span class="n">of</span> <span class="n">the</span> <span class="n">device</span> <span class="p">(</span><span class="n">API</span> <span class="n">Key</span><span class="p">)</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"http-push"</span><span class="p">:</span> <span class="s2">"http://192.168.1.50/ispindel"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"http-push"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://192.168.1.50/ispindel"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"http-push2"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"http-push2"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"brewfather-push"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"brewfather-push"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-push"</span><span class="p">:</span> <span class="s2">"http://192.168.1.50:8086"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"influxdb2-push"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://192.168.1.50:8086"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-org"</span><span class="p">:</span> <span class="s2">"Qwerty"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"influxdb2-org"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Qwerty"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-bucket"</span><span class="p">:</span> <span class="s2">"Qwerty"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"influxdb2-bucket"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Qwerty"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"influxdb2-auth"</span><span class="p">:</span> <span class="s2">"Qwerty"</span>
|
<span class="w"> </span><span class="nt">"influxdb2-auth"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Qwerty"</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="post-api-config-gravity">
|
<section id="post-api-config-gravity">
|
||||||
<h3>POST: /api/config/gravity<a class="headerlink" href="#post-api-config-gravity" title="Permalink to this headline"></a></h3>
|
<h3>POST: /api/config/gravity<a class="headerlink" href="#post-api-config-gravity" title="Permalink to this headline"></a></h3>
|
||||||
<p>Used to update gravity settings via an HTTP POST command. Payload is in JSON format.</p>
|
<p>Used to update gravity settings via an HTTP POST command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<ul class="simple">
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Unique</span> <span class="nb">id</span> <span class="n">of</span> <span class="n">the</span> <span class="n">device</span> <span class="p">(</span><span class="n">API</span> <span class="n">Key</span><span class="p">)</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">gravity-formula</span></code> keywords <code class="docutils literal notranslate"><span class="pre">temp</span></code> and <code class="docutils literal notranslate"><span class="pre">tilt</span></code> are supported.</p></li>
|
||||||
<span class="s2">"gravity-formula"</span><span class="p">:</span> <span class="s2">"0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436"</span><span class="p">,</span>
|
</ul>
|
||||||
<span class="s2">"gravity-temp-adjustment"</span><span class="p">:</span> <span class="s2">"off"</span> <span class="o">//</span> <span class="n">Can</span> <span class="n">be</span> <span class="n">on</span> <span class="ow">or</span> <span class="n">off</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"gravity-formula"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0.0*tilt^3+0.0*tilt^2+0.0017978*tilt+0.9436"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"gravity-temp-adjustment"</span><span class="p">:</span><span class="w"> </span><span class="s2">"off"</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="id2">
|
<section id="id2">
|
||||||
<h3>POST: /api/config/gravity<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h3>
|
<h3>POST: /api/config/gravity<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h3>
|
||||||
<p>Used to update hardware settings via an HTTP POST command. Payload is in JSON format.</p>
|
<p>Used to update hardware settings via an HTTP POST command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Unique</span> <span class="nb">id</span> <span class="n">of</span> <span class="n">the</span> <span class="n">device</span> <span class="p">(</span><span class="n">API</span> <span class="n">Key</span><span class="p">)</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"voltage-factor"</span><span class="p">:</span> <span class="mf">1.59</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"voltage-factor"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.59</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"temp-adjustment"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temp-adjustment"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"ota-url"</span><span class="p">:</span> <span class="s2">"http://192.168.1.50/firmware/gravmon/"</span>
|
<span class="w"> </span><span class="nt">"ota-url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://192.168.1.50/firmware/gravmon/"</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="post-api-config-formula">
|
<section id="post-api-config-formula">
|
||||||
<h3>POST: /api/config/formula<a class="headerlink" href="#post-api-config-formula" title="Permalink to this headline"></a></h3>
|
<h3>POST: /api/config/formula<a class="headerlink" href="#post-api-config-formula" title="Permalink to this headline"></a></h3>
|
||||||
<p>Used to update formula calculation data via an HTTP POST command. Payload is in JSON format.</p>
|
<p>Used to update formula calculation data via an HTTP POST command. Payload is in JSON format.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<ul class="simple">
|
||||||
<span class="s2">"id"</span><span class="p">:</span> <span class="s2">"ee1bfc"</span><span class="p">,</span> <span class="o">//</span> <span class="n">Unique</span> <span class="nb">id</span> <span class="n">of</span> <span class="n">the</span> <span class="n">device</span> <span class="p">(</span><span class="n">API</span> <span class="n">Key</span><span class="p">)</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">a1</span></code>-<code class="docutils literal notranslate"><span class="pre">a4</span></code> are the angles/tilt readings (up to 5 are currently supported)</p></li>
|
||||||
<span class="s2">"a1"</span><span class="p">:</span> <span class="mf">22.4</span><span class="p">,</span> <span class="o">//</span> <span class="n">Angles</span> <span class="mi">1</span><span class="o">-</span><span class="mi">5</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">g1</span></code>-<code class="docutils literal notranslate"><span class="pre">g4</span></code> are the corresponding gravity reaadings (in SG)</p></li>
|
||||||
<span class="s2">"a2"</span><span class="p">:</span> <span class="mf">54.4</span><span class="p">,</span>
|
</ul>
|
||||||
<span class="s2">"a3"</span><span class="p">:</span> <span class="mi">58</span><span class="p">,</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"a4"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ee1bfc"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"a5"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a1"</span><span class="p">:</span><span class="w"> </span><span class="mf">22.4</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g1"</span><span class="p">:</span> <span class="mf">1.000</span><span class="p">,</span> <span class="o">//</span> <span class="n">Gravity</span> <span class="mi">1</span><span class="o">-</span><span class="mi">5</span>
|
<span class="w"> </span><span class="nt">"a2"</span><span class="p">:</span><span class="w"> </span><span class="mf">54.4</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g2"</span><span class="p">:</span> <span class="mf">1.053</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a3"</span><span class="p">:</span><span class="w"> </span><span class="mi">58</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g3"</span><span class="p">:</span> <span class="mf">1.062</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a4"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g4"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"a5"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"g5"</span><span class="p">:</span> <span class="mi">1</span>
|
<span class="w"> </span><span class="nt">"g1"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.000</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="w"> </span><span class="nt">"g2"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.053</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"g3"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.062</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"g4"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"g5"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -453,36 +471,38 @@ code the update will be done during startup.</p>
|
|||||||
<section id="ispindle-format">
|
<section id="ispindle-format">
|
||||||
<h3>iSpindle format<a class="headerlink" href="#ispindle-format" title="Permalink to this headline"></a></h3>
|
<h3>iSpindle format<a class="headerlink" href="#ispindle-format" title="Permalink to this headline"></a></h3>
|
||||||
<p>This is the format used for standard http posts.</p>
|
<p>This is the format used for standard http posts.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<ul class="simple">
|
||||||
<span class="s2">"name"</span> <span class="p">:</span> <span class="s2">"gravmon"</span><span class="p">,</span> <span class="o">//</span> <span class="n">mDNS</span> <span class="n">name</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">corr-gravity</span></code> is an extended parameter containing a temperature corrected gravity reading.</p></li>
|
||||||
<span class="s2">"ID"</span><span class="p">:</span> <span class="s2">"2E6753"</span><span class="p">,</span> <span class="o">//</span> <span class="n">esp</span> <span class="n">device</span> <span class="nb">id</span>
|
<li><p><code class="docutils literal notranslate"><span class="pre">run-time</span></code> is an extended parameter containing the number of seconds the execution took.</p></li>
|
||||||
<span class="s2">"token"</span> <span class="p">:</span> <span class="s2">"gravmon"</span><span class="p">,</span>
|
</ul>
|
||||||
<span class="s2">"interval"</span><span class="p">:</span> <span class="mi">900</span><span class="p">,</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"temperature"</span><span class="p">:</span> <span class="mf">20.5</span><span class="p">,</span> <span class="o">//</span> <span class="n">C</span> <span class="ow">or</span> <span class="n">F</span> <span class="n">based</span> <span class="n">on</span> <span class="n">setting</span><span class="p">,</span> <span class="n">adjusted</span> <span class="n">value</span><span class="o">.</span>
|
<span class="w"> </span><span class="nt">"name"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s2">"gravmon"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"temp-units"</span><span class="p">:</span> <span class="s2">"C"</span><span class="p">,</span> <span class="o">//</span> <span class="n">C</span> <span class="ow">or</span> <span class="n">F</span> <span class="n">based</span> <span class="n">on</span> <span class="n">setting</span>
|
<span class="w"> </span><span class="nt">"ID"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2E6753"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity"</span><span class="p">:</span> <span class="mf">1.0050</span><span class="p">,</span> <span class="o">//</span> <span class="n">Raw</span> <span class="ow">or</span> <span class="n">temperature</span> <span class="n">corrected</span> <span class="n">gravity</span> <span class="p">(</span><span class="n">based</span> <span class="n">on</span> <span class="n">setting</span><span class="p">)</span>
|
<span class="w"> </span><span class="nt">"token"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s2">"gravmon"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"corr-gravity"</span><span class="p">:</span> <span class="mf">1.0050</span><span class="p">,</span> <span class="o">//</span> <span class="n">Temperature</span> <span class="n">corrected</span> <span class="n">gravity</span>
|
<span class="w"> </span><span class="nt">"interval"</span><span class="p">:</span><span class="w"> </span><span class="mi">900</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"angle"</span><span class="p">:</span> <span class="mf">45.34</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temperature"</span><span class="p">:</span><span class="w"> </span><span class="mf">20.5</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"battery"</span><span class="p">:</span> <span class="mf">3.67</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temp-units"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"rssi"</span><span class="p">:</span> <span class="o">-</span><span class="mi">12</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gravity"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.0050</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"corr-gravity"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.0050</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="o">//</span> <span class="n">Extension</span> <span class="n">fields</span>
|
<span class="w"> </span><span class="nt">"angle"</span><span class="p">:</span><span class="w"> </span><span class="mf">45.34</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"run-time"</span><span class="p">:</span> <span class="mi">230</span><span class="p">,</span> <span class="o">//</span> <span class="n">ms</span><span class="p">,</span> <span class="n">Runtime</span> <span class="k">for</span> <span class="n">this</span> <span class="n">reading</span><span class="p">,</span> <span class="n">this</span> <span class="ow">is</span> <span class="n">an</span> <span class="n">additional</span> <span class="n">field</span> <span class="ow">not</span> <span class="n">part</span> <span class="n">of</span> <span class="n">the</span> <span class="n">standard</span> <span class="nb">format</span>
|
<span class="w"> </span><span class="nt">"battery"</span><span class="p">:</span><span class="w"> </span><span class="mf">3.67</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="w"> </span><span class="nt">"rssi"</span><span class="p">:</span><span class="w"> </span><span class="mi">-12</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"run-time"</span><span class="p">:</span><span class="w"> </span><span class="mi">6</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="brewfather-format">
|
<section id="brewfather-format">
|
||||||
<h3>Brewfather format<a class="headerlink" href="#brewfather-format" title="Permalink to this headline"></a></h3>
|
<h3>Brewfather format<a class="headerlink" href="#brewfather-format" title="Permalink to this headline"></a></h3>
|
||||||
<p>This is the format for Brewfather</p>
|
<p>This is the format for Brewfather</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
<span class="s2">"name"</span> <span class="p">:</span> <span class="s2">"gravmon"</span><span class="p">,</span> <span class="o">//</span> <span class="n">mDNS</span> <span class="n">name</span>
|
<span class="w"> </span><span class="nt">"name"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s2">"gravmon"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"temp"</span><span class="p">:</span> <span class="mf">20.5</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temp"</span><span class="p">:</span><span class="w"> </span><span class="mf">20.5</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"temp-unit"</span><span class="p">:</span> <span class="s2">"C"</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"temp-unit"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"battery"</span><span class="p">:</span> <span class="mf">3.67</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"battery"</span><span class="p">:</span><span class="w"> </span><span class="mf">3.67</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity"</span><span class="p">:</span> <span class="mf">1.0050</span><span class="p">,</span>
|
<span class="w"> </span><span class="nt">"gravity"</span><span class="p">:</span><span class="w"> </span><span class="mf">1.0050</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="s2">"gravity_unit"</span><span class="p">:</span> <span class="s2">"G"</span><span class="p">,</span> <span class="o">//</span> <span class="n">G</span> <span class="o">=</span> <span class="n">SG</span><span class="p">,</span> <span class="n">Plato</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">yet</span> <span class="n">supported</span>
|
<span class="w"> </span><span class="nt">"gravity_unit"</span><span class="p">:</span><span class="w"> </span><span class="s2">"G"</span><span class="p">,</span><span class="w"></span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span><span class="w"></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -493,6 +513,25 @@ code the update will be done during startup.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<section id="version-json">
|
||||||
|
<h3>version.json<a class="headerlink" href="#version-json" title="Permalink to this headline"></a></h3>
|
||||||
|
<p>Contents version.json. The version is used by the device to check if the this version is newer. The html files will also be downloaded if the are present on the server. This way it’s easy to
|
||||||
|
upgrade to a version that serve the html files from the file system. If they dont exist nothing will happen, the OTA flashing will still work. If the html files are missing from the file system
|
||||||
|
they can be uploaded manually afterwards.</p>
|
||||||
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"project"</span><span class="p">:</span><span class="s2">"gravmon"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"version"</span><span class="p">:</span><span class="s2">"0.4.10"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"html"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"index.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"device.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"config.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"calibration.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"about.min.htm"</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="p">]</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
<h1>Welcome to GravityMon’s documentation!<a class="headerlink" href="#welcome-to-gravitymon-s-documentation" title="Permalink to this headline"></a></h1>
|
<h1>Welcome to GravityMon’s documentation!<a class="headerlink" href="#welcome-to-gravitymon-s-documentation" title="Permalink to this headline"></a></h1>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">Note</p>
|
<p class="admonition-title">Note</p>
|
||||||
<p>Preliminary documentation. This is work in progress.</p>
|
<p>Preliminary documentation. This is work in progress. This documentation reflects <strong>v0.5</strong></p>
|
||||||
</div>
|
</div>
|
||||||
<p>GravityMon is a replacement firmare for the iSpindle hardware. It’s used to measure gravity in beer and show the progress
|
<p>GravityMon is a replacement firmare for the iSpindle hardware. It’s used to measure gravity in beer and show the progress
|
||||||
of fermentation.</p>
|
of fermentation.</p>
|
||||||
@ -152,7 +152,11 @@ over the last 6 months without any issues.</p>
|
|||||||
<div class="toctree-wrapper compound">
|
<div class="toctree-wrapper compound">
|
||||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a><ul>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="releases.html#v0-5-0-beta">v0.5.0 (beta)</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="releases.html#v0-4-0">v0.4.0</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a><ul>
|
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a><ul>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#the-main-differences">The main differences</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#the-main-differences">The main differences</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#other-features">Other features</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#other-features">Other features</a></li>
|
||||||
@ -165,7 +169,7 @@ over the last 6 months without any issues.</p>
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a><ul>
|
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a><ul>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="configuration.html#main-index">Main index</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="configuration.html#status">Status</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="configuration.html#device">Device</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="configuration.html#device">Device</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="configuration.html#id1">Configuration</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="configuration.html#id1">Configuration</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
|
||||||
|
BIN
docs/objects.inv
BIN
docs/objects.inv
Binary file not shown.
@ -39,13 +39,18 @@
|
|||||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||||
<ul class="current">
|
<ul class="current">
|
||||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Releases</a></li>
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">Releases</a><ul>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#v0-5-0-beta">v0.5.0 (beta)</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#v0-4-0">v0.4.0</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="backlog.html#header-1">Header 1</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -74,9 +79,23 @@
|
|||||||
|
|
||||||
<section id="releases">
|
<section id="releases">
|
||||||
<h1>Releases<a class="headerlink" href="#releases" title="Permalink to this headline"></a></h1>
|
<h1>Releases<a class="headerlink" href="#releases" title="Permalink to this headline"></a></h1>
|
||||||
<p>There is not yet any releases publised.</p>
|
<section id="v0-5-0-beta">
|
||||||
|
<h2>v0.5.0 (beta)<a class="headerlink" href="#v0-5-0-beta" title="Permalink to this headline"></a></h2>
|
||||||
|
<p>Latest next target version is: <strong>v0.5.0</strong>. This is hosted in the <strong>dev branch</strong>.</p>
|
||||||
|
<ul class="simple">
|
||||||
|
<li><p>Added feature to calcuate formula on device</p></li>
|
||||||
|
<li><p>Total rewrite of documentation</p></li>
|
||||||
|
<li><p>WIFI settings are now stored in config file</p></li>
|
||||||
|
<li><p>Defined version numbers for all dependant libraries to avoid updates breaking build.</p></li>
|
||||||
|
<li><p>Cleanup of code</p></li>
|
||||||
|
<li><p>Refactor code from C to C++</p></li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
<section id="v0-4-0">
|
||||||
|
<h2>v0.4.0<a class="headerlink" href="#v0-4-0" title="Permalink to this headline"></a></h2>
|
||||||
<p>Latest stable development version is: <strong>v0.4.0</strong></p>
|
<p>Latest stable development version is: <strong>v0.4.0</strong></p>
|
||||||
<p><a class="reference external" href="https://github.com/mp-se/gravitymon/releases/tag/v0.4.0">https://github.com/mp-se/gravitymon/releases/tag/v0.4.0</a></p>
|
<p><a class="reference external" href="https://github.com/mp-se/gravitymon/releases/tag/v0.4.0">https://github.com/mp-se/gravitymon/releases/tag/v0.4.0</a></p>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
160
docs/styling.html
Normal file
160
docs/styling.html
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Testing formatting — GravityMon 0.5.0 documentation</title>
|
||||||
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="_static/js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
|
<script src="_static/jquery.js"></script>
|
||||||
|
<script src="_static/underscore.js"></script>
|
||||||
|
<script src="_static/doctools.js"></script>
|
||||||
|
<script src="_static/js/theme.js"></script>
|
||||||
|
<link rel="index" title="Index" href="genindex.html" />
|
||||||
|
<link rel="search" title="Search" href="search.html" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav">
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search" >
|
||||||
|
<a href="index.html" class="icon icon-home"> GravityMon
|
||||||
|
</a>
|
||||||
|
<div role="search">
|
||||||
|
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" />
|
||||||
|
<input type="hidden" name="check_keywords" value="yes" />
|
||||||
|
<input type="hidden" name="area" value="default" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="index.html">GravityMon</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content">
|
||||||
|
<div role="navigation" aria-label="Page navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||||
|
<li>Testing formatting</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
<a href="_sources/styling.rst.txt" rel="nofollow"> View page source</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div itemprop="articleBody">
|
||||||
|
|
||||||
|
<section id="testing-formatting">
|
||||||
|
<h1>Testing formatting<a class="headerlink" href="#testing-formatting" title="Permalink to this headline"></a></h1>
|
||||||
|
<section id="header-1">
|
||||||
|
<h2>Header 1<a class="headerlink" href="#header-1" title="Permalink to this headline"></a></h2>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
<section id="header-2">
|
||||||
|
<h1>Header 2<a class="headerlink" href="#header-2" title="Permalink to this headline"></a></h1>
|
||||||
|
<p><strong>BOLD</strong></p>
|
||||||
|
<p><em>ITALIC</em></p>
|
||||||
|
<p><code class="docutils literal notranslate"><span class="pre">CODE</span> <span class="pre">SAMPLE</span></code></p>
|
||||||
|
<ol class="arabic simple">
|
||||||
|
<li><p>List</p></li>
|
||||||
|
<li><p>List</p></li>
|
||||||
|
</ol>
|
||||||
|
<ul class="simple">
|
||||||
|
<li><p>List</p></li>
|
||||||
|
<li><p>List</p></li>
|
||||||
|
</ul>
|
||||||
|
<table class="colwidths-given docutils align-default" id="id1">
|
||||||
|
<caption><span class="caption-text">Table</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 40%" />
|
||||||
|
<col style="width: 60%" />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr class="row-odd"><th class="head"><p>table</p></th>
|
||||||
|
<th class="head"><p>table</p></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="row-even"><td><p>content</p></td>
|
||||||
|
<td><p>content</p></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<a class="reference internal image-reference" href="_images/formula1.png"><img alt="image" src="_images/formula1.png" style="width: 400px;" /></a>
|
||||||
|
<div class="highlight-objdump notranslate"><div class="highlight"><pre><span></span><span class="x">measurement,host=<mdns>,device=<id>,temp-format=<C|F>,gravity-format=SG,gravity=1.0004,corr-gravity=1.0004,angle=45.45,temp=20.1,battery=3.96,rssi=-18</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"project"</span><span class="p">:</span><span class="s2">"gravmon"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"version"</span><span class="p">:</span><span class="s2">"0.4.10"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="nt">"html"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"index.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"device.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"config.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"calibration.min.htm"</span><span class="p">,</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="s2">"about.min.htm"</span><span class="w"></span>
|
||||||
|
<span class="w"> </span><span class="p">]</span><span class="w"></span>
|
||||||
|
<span class="p">}</span><span class="w"></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<div class="admonition note">
|
||||||
|
<p class="admonition-title">Note</p>
|
||||||
|
<p>Note…</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<p>© Copyright 2021-2022, Magnus Persson.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||||
|
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||||
|
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
jQuery(function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,5 +1,5 @@
|
|||||||
Backlog of changes
|
Backlog of changes
|
||||||
######################################
|
##################
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
@ -9,8 +9,8 @@ One of the following conditions will place the device in `configuration mode`:
|
|||||||
- Placed in horizontal mode 85-90 degrees
|
- Placed in horizontal mode 85-90 degrees
|
||||||
- Charger connected >4.15V
|
- Charger connected >4.15V
|
||||||
|
|
||||||
Main index
|
Status
|
||||||
==========
|
======
|
||||||
|
|
||||||
URL: (http://gravmon.local)
|
URL: (http://gravmon.local)
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ Gravity Settings
|
|||||||
|
|
||||||
This is the formula used for temperature calibration (temp is in F). Cal = 20C.
|
This is the formula used for temperature calibration (temp is in F). Cal = 20C.
|
||||||
|
|
||||||
::
|
.. code-block::
|
||||||
|
|
||||||
gravity*((1.00130346-0.000134722124*temp+0.00000204052596*temp^2-0.00000000232820948*temp^3)/(1.00130346-0.000134722124*cal+0.00000204052596*cal^2-0.00000000232820948*cal^3))
|
gravity*((1.00130346-0.000134722124*temp+0.00000204052596*temp^2-0.00000000232820948*temp^3)/(1.00130346-0.000134722124*cal+0.00000204052596*cal^2-0.00000000232820948*cal^3))
|
||||||
|
|
||||||
@ -169,19 +169,11 @@ Hardware Settings
|
|||||||
|
|
||||||
Example; OTA URL (don't forget trailing dash), the name of the file should be firmware.bin
|
Example; OTA URL (don't forget trailing dash), the name of the file should be firmware.bin
|
||||||
|
|
||||||
::
|
.. code-block::
|
||||||
|
|
||||||
http://192.168.1.1/firmware/gravmon/
|
http://192.168.1.1/firmware/gravmon/
|
||||||
|
|
||||||
|
|
||||||
Contents version.json. The version is used by the device to check if the this version is newer. The html files will also be downloaded if the are present on the server. This way it's easy to
|
|
||||||
upgrade to a version that serve the html files from the file system. If they dont exist nothing will happen, the OTA flashing will still work. If the html files are missing from the file system
|
|
||||||
they can be uploaded manually afterwards.
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
{ "project":"gravmon", "version":"0.4.10", "html": [ "index.min.htm", "device.min.htm", "config.min.htm", "calibration.min.htm", "about.min.htm" ] }
|
|
||||||
|
|
||||||
|
|
||||||
Create formula
|
Create formula
|
||||||
=============================
|
=============================
|
||||||
@ -202,12 +194,19 @@ Once the formula is created a graph over the entered values and a simulation of
|
|||||||
REST API
|
REST API
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
|
All the API's use a key called ``ID`` which is the unique device id (chip id). This is used as an API key when sending requests to the device.
|
||||||
|
|
||||||
GET: /api/config
|
GET: /api/config
|
||||||
****************
|
****************
|
||||||
|
|
||||||
Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.
|
Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``temp-format`` can be either ``C`` or ``F``
|
||||||
|
* ``gravity-format`` is always ``G`` (plato is not yet supported)
|
||||||
|
|
||||||
|
Other parameters are the same as in the configuration guide.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"mdns": "gravmon",
|
"mdns": "gravmon",
|
||||||
@ -246,7 +245,7 @@ GET: /api/device
|
|||||||
|
|
||||||
Retrive the current device settings via an HTTP GET command. Payload is in JSON format.
|
Retrive the current device settings via an HTTP GET command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"app-name": "GravityMon ",
|
"app-name": "GravityMon ",
|
||||||
@ -261,7 +260,11 @@ GET: /api/status
|
|||||||
|
|
||||||
Retrive the current device status via an HTTP GET command. Payload is in JSON format.
|
Retrive the current device status via an HTTP GET command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``temp-format`` can be either ``C`` or ``F``
|
||||||
|
|
||||||
|
Other parameters are the same as in the configuration guide.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc",
|
"id": "ee1bfc",
|
||||||
@ -282,16 +285,19 @@ 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``-``a4`` are the angles/tilt readings (up to 5 are currently supported)
|
||||||
|
* ``g1``-``g4`` are the corresponding gravity reaadings (in SG)
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"a1": 22.4, // Angles 1-5
|
"a1": 22.4,
|
||||||
"a2": 54.4,
|
"a2": 54.4,
|
||||||
"a3": 58,
|
"a3": 58,
|
||||||
"a4": 0,
|
"a4": 0,
|
||||||
"a5": 0,
|
"a5": 0,
|
||||||
"g1": 1.000, // Gravity 1-5
|
"g1": 1.000,
|
||||||
"g2": 1.053,
|
"g2": 1.053,
|
||||||
"g3": 1.062,
|
"g3": 1.062,
|
||||||
"g4": 1,
|
"g4": 1,
|
||||||
@ -305,13 +311,15 @@ POST: /api/config/device
|
|||||||
|
|
||||||
Used to update device settings via an HTTP POST command. Payload is in JSON format.
|
Used to update device settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``temp-format`` can be either ``C`` or ``F``
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"mdns": "gravmon", // Network name / Device name
|
"mdns": "gravmon",
|
||||||
"temp-format": "C", // Can be either C or F
|
"temp-format": "C",
|
||||||
"sleep-interval": 30 // Time in seconds.
|
"sleep-interval": 30
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -320,10 +328,10 @@ POST: /api/config/push
|
|||||||
|
|
||||||
Used to update push settings via an HTTP POST command. Payload is in JSON format.
|
Used to update push settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"http-push": "http://192.168.1.50/ispindel",
|
"http-push": "http://192.168.1.50/ispindel",
|
||||||
"http-push2": "",
|
"http-push2": "",
|
||||||
"brewfather-push": "",
|
"brewfather-push": "",
|
||||||
@ -339,12 +347,14 @@ POST: /api/config/gravity
|
|||||||
|
|
||||||
Used to update gravity settings via an HTTP POST command. Payload is in JSON format.
|
Used to update gravity settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
* ``gravity-formula`` keywords ``temp`` and ``tilt`` are supported.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"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",
|
||||||
"gravity-temp-adjustment": "off" // Can be on or off
|
"gravity-temp-adjustment": "off"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -353,10 +363,10 @@ POST: /api/config/gravity
|
|||||||
|
|
||||||
Used to update hardware settings via an HTTP POST command. Payload is in JSON format.
|
Used to update hardware settings via an HTTP POST command. Payload is in JSON format.
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"voltage-factor": 1.59,
|
"voltage-factor": 1.59,
|
||||||
"temp-adjustment": 0,
|
"temp-adjustment": 0,
|
||||||
"ota-url": "http://192.168.1.50/firmware/gravmon/"
|
"ota-url": "http://192.168.1.50/firmware/gravmon/"
|
||||||
@ -368,16 +378,19 @@ 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``-``a4`` are the angles/tilt readings (up to 5 are currently supported)
|
||||||
|
* ``g1``-``g4`` are the corresponding gravity reaadings (in SG)
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "ee1bfc", // Unique id of the device (API Key)
|
"id": "ee1bfc",
|
||||||
"a1": 22.4, // Angles 1-5
|
"a1": 22.4,
|
||||||
"a2": 54.4,
|
"a2": 54.4,
|
||||||
"a3": 58,
|
"a3": 58,
|
||||||
"a4": 0,
|
"a4": 0,
|
||||||
"a5": 0,
|
"a5": 0,
|
||||||
"g1": 1.000, // Gravity 1-5
|
"g1": 1.000,
|
||||||
"g2": 1.053,
|
"g2": 1.053,
|
||||||
"g3": 1.062,
|
"g3": 1.062,
|
||||||
"g4": 1,
|
"g4": 1,
|
||||||
@ -393,23 +406,24 @@ iSpindle format
|
|||||||
|
|
||||||
This is the format used for standard http posts.
|
This is the format used for standard http posts.
|
||||||
|
|
||||||
::
|
* ``corr-gravity`` is an extended parameter containing a temperature corrected gravity reading.
|
||||||
|
* ``run-time`` is an extended parameter containing the number of seconds the execution took.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name" : "gravmon", // mDNS name
|
"name" : "gravmon",
|
||||||
"ID": "2E6753", // esp device id
|
"ID": "2E6753",
|
||||||
"token" : "gravmon",
|
"token" : "gravmon",
|
||||||
"interval": 900,
|
"interval": 900,
|
||||||
"temperature": 20.5, // C or F based on setting, adjusted value.
|
"temperature": 20.5,
|
||||||
"temp-units": "C", // C or F based on setting
|
"temp-units": "C",
|
||||||
"gravity": 1.0050, // Raw or temperature corrected gravity (based on setting)
|
"gravity": 1.0050,
|
||||||
"corr-gravity": 1.0050, // Temperature corrected gravity
|
"corr-gravity": 1.0050,
|
||||||
"angle": 45.34,
|
"angle": 45.34,
|
||||||
"battery": 3.67,
|
"battery": 3.67,
|
||||||
"rssi": -12,
|
"rssi": -12,
|
||||||
|
"run-time": 6
|
||||||
// Extension fields
|
|
||||||
"run-time": 230, // ms, Runtime for this reading, this is an additional field not part of the standard format
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -419,15 +433,15 @@ Brewfather format
|
|||||||
This is the format for Brewfather
|
This is the format for Brewfather
|
||||||
|
|
||||||
|
|
||||||
::
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name" : "gravmon", // mDNS name
|
"name" : "gravmon",
|
||||||
"temp": 20.5,
|
"temp": 20.5,
|
||||||
"temp-unit": "C",
|
"temp-unit": "C",
|
||||||
"battery": 3.67,
|
"battery": 3.67,
|
||||||
"gravity": 1.0050,
|
"gravity": 1.0050,
|
||||||
"gravity_unit": "G", // G = SG, Plato is not yet supported
|
"gravity_unit": "G",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -436,8 +450,28 @@ Influx DB v2
|
|||||||
|
|
||||||
This is the format for InfluxDB v2
|
This is the format for InfluxDB v2
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
::
|
|
||||||
|
|
||||||
measurement,host=<mdns>,device=<id>,temp-format=<C|F>,gravity-format=SG,gravity=1.0004,corr-gravity=1.0004,angle=45.45,temp=20.1,battery=3.96,rssi=-18
|
measurement,host=<mdns>,device=<id>,temp-format=<C|F>,gravity-format=SG,gravity=1.0004,corr-gravity=1.0004,angle=45.45,temp=20.1,battery=3.96,rssi=-18
|
||||||
|
|
||||||
|
|
||||||
|
version.json
|
||||||
|
************
|
||||||
|
|
||||||
|
Contents version.json. The version is used by the device to check if the this version is newer. The html files will also be downloaded if the are present on the server. This way it's easy to
|
||||||
|
upgrade to a version that serve the html files from the file system. If they dont exist nothing will happen, the OTA flashing will still work. If the html files are missing from the file system
|
||||||
|
they can be uploaded manually afterwards.
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"project":"gravmon",
|
||||||
|
"version":"0.4.10",
|
||||||
|
"html": [
|
||||||
|
"index.min.htm",
|
||||||
|
"device.min.htm",
|
||||||
|
"config.min.htm",
|
||||||
|
"calibration.min.htm",
|
||||||
|
"about.min.htm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
@ -8,7 +8,7 @@ Welcome to GravityMon's documentation!
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Preliminary documentation. This is work in progress.
|
Preliminary documentation. This is work in progress. This documentation reflects **v0.5**
|
||||||
|
|
||||||
|
|
||||||
GravityMon is a replacement firmare for the iSpindle hardware. It's used to measure gravity in beer and show the progress
|
GravityMon is a replacement firmare for the iSpindle hardware. It's used to measure gravity in beer and show the progress
|
||||||
|
@ -1,7 +1,20 @@
|
|||||||
Releases
|
Releases
|
||||||
------------
|
========
|
||||||
|
|
||||||
There is not yet any releases publised.
|
v0.5.0 (beta)
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Latest next target version is: **v0.5.0**. This is hosted in the **dev branch**.
|
||||||
|
|
||||||
|
* Added feature to calcuate formula on device
|
||||||
|
* Total rewrite of documentation
|
||||||
|
* WIFI settings are now stored in config file
|
||||||
|
* Defined version numbers for all dependant libraries to avoid updates breaking build.
|
||||||
|
* Cleanup of code
|
||||||
|
* Refactor code from C to C++
|
||||||
|
|
||||||
|
v0.4.0
|
||||||
|
------
|
||||||
|
|
||||||
Latest stable development version is: **v0.4.0**
|
Latest stable development version is: **v0.4.0**
|
||||||
|
|
||||||
|
58
src_docs/source/styling.rst
Normal file
58
src_docs/source/styling.rst
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
Testing formatting
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Header 1
|
||||||
|
########
|
||||||
|
|
||||||
|
Header 2
|
||||||
|
--------
|
||||||
|
|
||||||
|
Header 3
|
||||||
|
********
|
||||||
|
|
||||||
|
**BOLD**
|
||||||
|
|
||||||
|
*ITALIC*
|
||||||
|
|
||||||
|
``CODE SAMPLE``
|
||||||
|
|
||||||
|
1. List
|
||||||
|
2. List
|
||||||
|
|
||||||
|
* List
|
||||||
|
* List
|
||||||
|
|
||||||
|
.. list-table:: Table
|
||||||
|
:widths: 40 60
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - table
|
||||||
|
- table
|
||||||
|
* - content
|
||||||
|
- content
|
||||||
|
|
||||||
|
.. image:: images/formula1.png
|
||||||
|
:width: 400
|
||||||
|
:alt: image
|
||||||
|
|
||||||
|
.. code-block:: objdump
|
||||||
|
|
||||||
|
measurement,host=<mdns>,device=<id>,temp-format=<C|F>,gravity-format=SG,gravity=1.0004,corr-gravity=1.0004,angle=45.45,temp=20.1,battery=3.96,rssi=-18
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"project":"gravmon",
|
||||||
|
"version":"0.4.10",
|
||||||
|
"html": [
|
||||||
|
"index.min.htm",
|
||||||
|
"device.min.htm",
|
||||||
|
"config.min.htm",
|
||||||
|
"calibration.min.htm",
|
||||||
|
"about.min.htm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Note...
|
Loading…
Reference in New Issue
Block a user