Update documentation

This commit is contained in:
GitHub Action 2022-01-09 08:24:16 +00:00
parent 9dfd5c498a
commit ab95e4b4c0
21 changed files with 553 additions and 165 deletions

View File

@ -1,5 +1,7 @@
.. _compiling-the-software:
Compiling the software
-----------------------
######################
Tools
=====
@ -14,7 +16,7 @@ Code Formatting
===============
I use pre-commit and their cpp style checks to validate the code. Plugin defintions are found in **.pre-commit-config.yaml**
https://www.pre-commit.com
`Pre-Commit <https://www.pre-commit.com>`_
.. note::
@ -23,12 +25,19 @@ https://www.pre-commit.com
Targets
=======
In the repository there are 3 targets defined
In the platformio config there are 3 targets defined
* gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled.
* gravity-release; Standard release
* gravity-perf; Standard release but contains code for measuring performance
.. warning::
The debug target can be unsable and crash the device under certain circumstanses.
Excessive logging to the serial port can cause corruption and crashes. I'm still
trying to figure out what causes these issues in the debug target. Other targets are
stable and works fine.
Source structure
================
.. list-table:: Directory structure

View File

@ -1,8 +1,11 @@
Configuration
-----------------------
The device can operate in two modes and must be in `configuration mode` in order for the web server to be active.
.. _setting-up-device:
One of the following conditions will place the device in `configuration mode`:
Setting up device
#################
The device can operate in two modes and must be in ``configuration mode`` in order for the web server to be active.
One of the following conditions will place the device in ``configuration mode``:
- Gyro has not been calibrated
- Sleep mode has been disabled in the web interface
@ -23,7 +26,7 @@ Configuration is accessed by entering the URL for the device, this will be the m
The main page shows the device readings; gravity, angle, temperature and battery charge. If the checkbox is active then the device will never go into sleep mode. This is useful if
you are collecting angle/tilt for calibration. If this is unchecked the device will change mode as explained before.
.. note::
.. tip::
If you are connected to the device via a serial console (speed: 115200) you can see the connection sequence and get the Unique ID and IP adress from there.
@ -57,7 +60,7 @@ Configuration
URL: (http://gravmon.local/config)
Device Setting
**************
++++++++++++++
.. image:: images/config1.png
:width: 800
@ -83,12 +86,12 @@ Device Setting
These are calibration data for the gyro. Place the device flat on a table and press the button to save the default orientation values. Without this calibration we cannot calculate the correct angle/tilt.
.. note::
.. warning::
The device will **not** go into `gravity monitoring` mode unless calibrated
Push Settings
*************
+++++++++++++
.. image:: images/config2.png
:width: 800
@ -124,7 +127,7 @@ Push Settings
Gravity Settings
****************
++++++++++++++++
.. image:: images/config3.png
:width: 800
@ -138,15 +141,19 @@ Gravity Settings
Will apply a temperature calibration formula to the gravity as a second step.
This is the formula used for temperature calibration (temp is in F). Cal = 20C.
.. warning::
This formula assumes that the calibration has been done at 20C.
.. code-block::
Formula used in temperature correction:
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))
Hardware Settings
*****************
+++++++++++++++++
.. image:: images/config4.png
:width: 800
@ -174,9 +181,10 @@ Hardware Settings
http://192.168.1.1/firmware/gravmon/
.. _create-formula:
Create formula
=============================
##############
.. image:: images/formula1.png
:width: 800
@ -190,14 +198,15 @@ Here you can enter up to 5 values (angles + gravity) that is then used to create
Once the formula is created a graph over the entered values and a simulation of the formula will give you a nice overview on how the formula will work.
.. _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
****************
================
Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.
@ -241,7 +250,7 @@ Other parameters are the same as in the configuration guide.
GET: /api/device
****************
================
Retrive the current device settings via an HTTP GET command. Payload is in JSON format.
@ -256,7 +265,7 @@ Retrive the current device settings via an HTTP GET command. Payload is in JSON
GET: /api/status
****************
================
Retrive the current device status via an HTTP GET command. Payload is in JSON format.
@ -281,7 +290,7 @@ Other parameters are the same as in the configuration guide.
GET: /api/config/formula
************************
========================
Retrive the data used for formula calculation data via an HTTP GET command. Payload is in JSON format.
@ -307,7 +316,7 @@ Retrive the data used for formula calculation data via an HTTP GET command. Payl
POST: /api/config/device
************************
========================
Used to update device settings via an HTTP POST command. Payload is in JSON format.
@ -324,7 +333,7 @@ Used to update device settings via an HTTP POST command. Payload is in JSON form
POST: /api/config/push
**********************
======================
Used to update push settings via an HTTP POST command. Payload is in JSON format.
@ -343,7 +352,7 @@ Used to update push settings via an HTTP POST command. Payload is in JSON format
POST: /api/config/gravity
*************************
=========================
Used to update gravity settings via an HTTP POST command. Payload is in JSON format.
@ -359,7 +368,7 @@ Used to update gravity settings via an HTTP POST command. Payload is in JSON for
POST: /api/config/gravity
*************************
=========================
Used to update hardware settings via an HTTP POST command. Payload is in JSON format.
@ -374,7 +383,7 @@ Used to update hardware settings via an HTTP POST command. Payload is in JSON fo
POST: /api/config/formula
*************************
=========================
Used to update formula calculation data via an HTTP POST command. Payload is in JSON format.
@ -398,11 +407,87 @@ Used to update formula calculation data via an HTTP POST command. Payload is in
}
Data Formats
Calling the API's from Python
=============================
Here is some example code for how to access the API's from a python script. Keys should always be
present or the API call will fail.
.. code-block:: python
import requests
import json
host = "192.168.1.1" # IP adress (or name) of the device to send these settings to
id = "ee1bfc" # Device ID (shown in serial console during startup or in UI)
def set_config( url, json ):
headers = { "ContentType": "application/json" }
print( url )
resp = requests.post( url, headers=headers, data=json )
if resp.status_code != 200 :
print ( "Failed " )
else :
print ( "Success " )
url = "http://" + host + "/api/config/device"
json = { "id": id,
"mdns": "gravmon", # Name of the device
"temp-format": "C", # Temperature format C or F
"sleep-interval": 30 # Sleep interval in seconds
}
set_config( url, json )
url = "http://" + host + "/api/config/push"
json = { "id": id,
"http-push": "http://192.168.1.1/ispindel", # HTTP endpoint
"http-push2": "", # HTTP endpoint2
"brewfather-push": "", # Brewfather URL
"influxdb2-push": "", # InfluxDB2 settings
"influxdb2-org": "",
"influxdb2-bucket": "",
"influxdb2-auth": ""
}
set_config( url, json )
url = "http://" + host + "/api/config/gravity"
json = { "id": id,
"gravity-formula": "", # If you want to set the gravity formula
"gravity-temp-adjustment": "off" # on or off
}
set_config( url, json )
url = "http://" + host + "/api/config/hardware"
json = { "id": id,
"voltage-factor": 1.59, # Default value for voltage calculation
"temp-adjustment": 0, # If temp sensor needs to be corrected
"ota-url": "" # if the device should seach for a new update when active
}
set_config( url, json )
url = "http://" + host + "/api/formula"
json = { "id": id,
"a1": 22.4,
"a2": 54.4,
"a3": 58,
"a4": 0,
"a5": 0,
"g1": 1.000,
"g2": 1.053,
"g3": 1.062,
"g4": 1,
"g5": 1
}
set_config( url, json )
.. _data-formats:
Data Formats
############
iSpindle format
***************
===============
This is the format used for standard http posts.
@ -428,11 +513,10 @@ This is the format used for standard http posts.
Brewfather format
******************
=================
This is the format for Brewfather
.. code-block:: json
{
@ -446,7 +530,7 @@ This is the format for Brewfather
Influx DB v2
************
============
This is the format for InfluxDB v2
@ -456,7 +540,7 @@ This is the format for InfluxDB v2
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

View File

@ -1,3 +1,5 @@
.. _functionallity:
Functionallity
==============
@ -6,21 +8,21 @@ The main differences
* **Operates in two modes gravity monitoring and configuration mode**
In ``gravity monitoring`` mode it behaves just like the iSpindle, it wakes up at regular intervals, measure angle/tile, temperature, calculates gravity and pushes the data to defined endpoints.
In ``gravity monitoring`` mode it behaves just like the iSpindle, it wakes up at regular intervals, measures angle/tile, temperature, calculates gravity and pushes the data to defined endpoints.
In ``configuration mode`` the device is always active and the webserver is active. Here you can view the angle/tilt values, change configuration options and more. When in this mode you can also interact with the device
via an REST API so data can be pushed to the device via scripts (see API section for more information)
via an REST API so data can be pushed to the device via scripts (see API section for more information).
You can force the device into ``configuration mode`` while measuring gravity. This is useful when calibrating the device so you dont needs to wait for the device to wake up and push the data. The entire calibration
You can force the device into ``configuration mode`` while measuring gravity. This is useful when calibrating the device so you don't needs to wait for the device to wake up and push the data. The entire calibration
sequence can be handled via the web interface without need for additional software tools.
*See the configuration section for more information on how to trigger the configuration mode.*
See the :ref:`setting-up-device` section for more information on how to trigger the configuration mode.
* **Can send data to multiple endpoints at once**
The original iSpindle can only have one destination, this software will push data to all defined endpoints so in theory you can use them all. However this will consume a lot of battery power so use only as many as needed.
Currently the device supports the following endpoints: http (2 differnt), influxdb2 and Brewfather
Currently the device supports the following endpoints: http (2 different), influxdb2 and Brewfather
If you want additional targets please raise a feature request in the github repo.
@ -60,21 +62,20 @@ Other features
Experimental features
---------------------
.. tip::
These are not enabled by default. To enable them you need to recompile the code and enable the correct defines.
* Use the temperature sensor in the gyro instead of DS18B20
This works fine when the device has time to cool down between measurements and it saves a few milliseconds (reduced battery consumption). My testing shows that this is quite accurate.
There is lots of battery power to save, reading the temp sensor takes almost as long as the gyro. This could reduce the run time by 40-50% and probly extend battery life with the same.
However more testing is required. Might add this as an option in the UI.
.. note::
This is not enabled by default.
* Performance measurements
I've also create a small library to measure execution code in some areas of the code that i know is time consuming. This way I can find a good balance between performace and quality.
*See the compile section for more information.*
See the :ref:`compiling-the-software` for more information.
Battery life

View File

@ -7,14 +7,13 @@ Welcome to GravityMon's documentation!
######################################
.. note::
Preliminary documentation. This is work in progress. This documentation reflects **v0.5**
This documentation reflects **v0.5**. Last updated 2022-01-09
GravityMon is a replacement firmare for the iSpindle firmware, it uses the same hardware configuration so
you can easily switch between them. It's used to measure gravity in beer and show the progress of fermentation.
For more information on this topic and function please visit https://www.ispindel.de.
For more information on this topic and function please visit `iSpindel Homepage <https://www.ispindel.de>`_ .
I started GravityMon because i like to create software and wanted to do some low level programming. I had done a few
projects based on esp8266 and also started to brew beer so this combination was quite natural.
@ -22,10 +21,9 @@ projects based on esp8266 and also started to brew beer so this combination was
The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation.
My approach to this software is a little different from that the original ispindle firmware. The github repository can
be found here; https://github.com/mp-se/gravitymon
be found here; `GravityMon on Github <https://github.com/mp-se/gravitymon>`_
.. note::
This software is in the early stages even though its more than one year old so if you find issues, please
open a ticket on github.
@ -39,18 +37,19 @@ The main differences:
* Send data to multiple endpoints when pushing data.
* Automatic temperature adjustment of gravity reading
* OTA support from local webserver
* Build in function to create gravity formulas (*New in v0.5*)
* Build in function to create gravity formulas
There are also a experimental features such as:
* Using the temperature sensor in gyro instead of DS18B20 (faster)
* Performance measurements (used to optimise code)
**For a complete breakdown see the functionallity section.**
For a complete breakdown see the :ref:`functionallity`
Credits to
----------
This software uses the following libraries and without these this would have been much more difficult to acheive:
Ideas to some of these functions have been picked up from disucssions in the iSpindle forums. This software uses
the following libraries and without these this would have been much more difficult to acheive:
* https://github.com/jrowberg/i2cdevlib.git
@ -105,6 +104,7 @@ This software uses the following libraries and without these this would have bee
:maxdepth: 2
:caption: Contents:
license
releases
functionallity
installation

View File

@ -5,7 +5,7 @@ Official esptool
================
The prefered option for flashing esp8266 device is via the official esptool. Documentation can be found
here; https://docs.espressif.com/projects/esptool/en/latest/esp32/
here; `esptool home page <https://docs.espressif.com/projects/esptool/en/latest/esp32/>`_
Windows 10 should install a driver for the USB -> Serial automatically when you connect a esp8266.
@ -34,7 +34,7 @@ Just select a baud rate of 115200, 8N1.
Binaries
********
In the /bin directory you will find 3 different firmware builds;
In the /bin directory you will find 2 different firmware builds;
* **firmware.bin**
@ -44,9 +44,6 @@ In the /bin directory you will find 3 different firmware builds;
This version also submits performance data to an influx database with detailed execution times.
* **firmware-debug.bin**
Development build. Not recommended for normal use.
In these versions all the html files are embedded in the binaries. The file system is currently only used for storing
the configuration file.

View File

@ -0,0 +1,26 @@
.. _licence:
Licence
#######
MIT License
Copyright (c) 2021-22 Magnus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,5 +1,7 @@
.. _releases:
Releases
========
########
v0.5.0 (beta)
-------------
@ -18,5 +20,5 @@ v0.4.0
Latest stable development version is: **v0.4.0**
https://github.com/mp-se/gravitymon/releases/tag/v0.4.0
`Release v0.4 on Github <https://github.com/mp-se/gravitymon/releases/tag/v0.4.0>`_

View File

@ -36,10 +36,14 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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 current"><a class="current reference internal" href="#">Backlog of changes</a><ul>

View File

@ -17,7 +17,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Contributing" href="contributing.html" />
<link rel="prev" title="Configuration" href="configuration.html" />
<link rel="prev" title="Setting up device" href="configuration.html" />
</head>
<body class="wy-body-for-nav">
@ -37,10 +37,14 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Compiling the software</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#tools">Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="#code-formatting">Code Formatting</a></li>
@ -78,7 +82,7 @@
<div itemprop="articleBody">
<div class="section" id="compiling-the-software">
<h1>Compiling the software<a class="headerlink" href="#compiling-the-software" title="Permalink to this headline"></a></h1>
<span id="id1"></span><h1>Compiling the software<a class="headerlink" href="#compiling-the-software" title="Permalink to this headline"></a></h1>
<div class="section" id="tools">
<h2>Tools<a class="headerlink" href="#tools" title="Permalink to this headline"></a></h2>
<p>I use the following tools in order to build and manage the software:</p>
@ -92,7 +96,7 @@
<div class="section" id="code-formatting">
<h2>Code Formatting<a class="headerlink" href="#code-formatting" title="Permalink to this headline"></a></h2>
<p>I use pre-commit and their cpp style checks to validate the code. Plugin defintions are found in <strong>.pre-commit-config.yaml</strong></p>
<p><a class="reference external" href="https://www.pre-commit.com">https://www.pre-commit.com</a></p>
<p><a class="reference external" href="https://www.pre-commit.com">Pre-Commit</a></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>There is not yet any automatic checks since this does not work on Windows. It works if running under WSL2 with Ubuntu.</p>
@ -100,17 +104,24 @@
</div>
<div class="section" id="targets">
<h2>Targets<a class="headerlink" href="#targets" title="Permalink to this headline"></a></h2>
<p>In the repository there are 3 targets defined</p>
<p>In the platformio config there are 3 targets defined</p>
<ul class="simple">
<li><p>gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled.</p></li>
<li><p>gravity-release; Standard release</p></li>
<li><p>gravity-perf; Standard release but contains code for measuring performance</p></li>
</ul>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The debug target can be unsable and crash the device under certain circumstanses.
Excessive logging to the serial port can cause corruption and crashes. Im still
trying to figure out what causes these issues in the debug target. Other targets are
stable and works fine.</p>
</div>
</div>
<div class="section" id="source-structure">
<h2>Source structure<a class="headerlink" href="#source-structure" title="Permalink to this headline"></a></h2>
<table class="colwidths-given docutils align-default" id="id1">
<caption><span class="caption-text">Directory structure</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
<table class="colwidths-given docutils align-default" id="id2">
<caption><span class="caption-text">Directory structure</span><a class="headerlink" href="#id2" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 40%" />
<col style="width: 60%" />
@ -160,8 +171,8 @@
<div class="section" id="options">
<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h2>
<p>This is a list of C++ defines that is used to enable/disable functions in the code.</p>
<table class="colwidths-given docutils align-default" id="id2">
<caption><span class="caption-text">Defines</span><a class="headerlink" href="#id2" title="Permalink to this table"></a></caption>
<table class="colwidths-given docutils align-default" id="id3">
<caption><span class="caption-text">Defines</span><a class="headerlink" href="#id3" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 40%" />
<col style="width: 60%" />
@ -223,7 +234,7 @@
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="configuration.html" class="btn btn-neutral float-left" title="Configuration" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="configuration.html" class="btn btn-neutral float-left" title="Setting up device" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="contributing.html" class="btn btn-neutral float-right" title="Contributing" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Configuration &mdash; GravityMon 0.5.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>Setting up device &mdash; GravityMon 0.5.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
@ -37,39 +37,41 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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 current"><a class="current reference internal" href="#">Configuration</a><ul>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Setting up device</a><ul>
<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="#id1">Configuration</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#configuration">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="#push-settings">Push Settings</a></li>
<li class="toctree-l3"><a class="reference internal" href="#gravity-settings">Gravity Settings</a></li>
<li class="toctree-l3"><a class="reference internal" href="#hardware-settings">Hardware Settings</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#create-formula">Create formula</a></li>
<li class="toctree-l2"><a class="reference internal" href="#rest-api">REST API</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#get-api-config">GET: /api/config</a></li>
<li class="toctree-l3"><a class="reference internal" href="#get-api-device">GET: /api/device</a></li>
<li class="toctree-l3"><a class="reference internal" href="#get-api-status">GET: /api/status</a></li>
<li class="toctree-l3"><a class="reference internal" href="#get-api-config-formula">GET: /api/config/formula</a></li>
<li class="toctree-l3"><a class="reference internal" href="#post-api-config-device">POST: /api/config/device</a></li>
<li class="toctree-l3"><a class="reference internal" href="#post-api-config-push">POST: /api/config/push</a></li>
<li class="toctree-l3"><a class="reference internal" href="#post-api-config-gravity">POST: /api/config/gravity</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id2">POST: /api/config/gravity</a></li>
<li class="toctree-l3"><a class="reference internal" href="#post-api-config-formula">POST: /api/config/formula</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#data-formats">Data Formats</a><ul>
<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="#influx-db-v2">Influx DB v2</a></li>
<li class="toctree-l3"><a class="reference internal" href="#version-json">version.json</a></li>
<li class="toctree-l1"><a class="reference internal" href="#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="#rest-api">REST API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#get-api-config">GET: /api/config</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-api-device">GET: /api/device</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-api-status">GET: /api/status</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-api-config-formula">GET: /api/config/formula</a></li>
<li class="toctree-l2"><a class="reference internal" href="#post-api-config-device">POST: /api/config/device</a></li>
<li class="toctree-l2"><a class="reference internal" href="#post-api-config-push">POST: /api/config/push</a></li>
<li class="toctree-l2"><a class="reference internal" href="#post-api-config-gravity">POST: /api/config/gravity</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id4">POST: /api/config/gravity</a></li>
<li class="toctree-l2"><a class="reference internal" href="#post-api-config-formula">POST: /api/config/formula</a></li>
<li class="toctree-l2"><a class="reference internal" href="#calling-the-api-s-from-python">Calling the APIs from Python</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="#data-formats">Data Formats</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#ispindle-format">iSpindle format</a></li>
<li class="toctree-l2"><a class="reference internal" href="#brewfather-format">Brewfather format</a></li>
<li class="toctree-l2"><a class="reference internal" href="#influx-db-v2">Influx DB v2</a></li>
<li class="toctree-l2"><a class="reference internal" href="#version-json">version.json</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
@ -91,7 +93,7 @@
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Configuration</li>
<li>Setting up device</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/configuration.rst.txt" rel="nofollow"> View page source</a>
</li>
@ -101,10 +103,10 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="configuration">
<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h1>
<p>The device can operate in two modes and must be in <cite>configuration mode</cite> in order for the web server to be active.</p>
<p>One of the following conditions will place the device in <cite>configuration mode</cite>:</p>
<div class="section" id="setting-up-device">
<span id="id1"></span><h1>Setting up device<a class="headerlink" href="#setting-up-device" title="Permalink to this headline"></a></h1>
<p>The device can operate in two modes and must be in <code class="docutils literal notranslate"><span class="pre">configuration</span> <span class="pre">mode</span></code> in order for the web server to be active.</p>
<p>One of the following conditions will place the device in <code class="docutils literal notranslate"><span class="pre">configuration</span> <span class="pre">mode</span></code>:</p>
<ul class="simple">
<li><p>Gyro has not been calibrated</p></li>
<li><p>Sleep mode has been disabled in the web interface</p></li>
@ -118,8 +120,8 @@
<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>The main page shows the device readings; gravity, angle, temperature and battery charge. If the checkbox is active then the device will never go into sleep mode. This is useful if
you are collecting angle/tilt for calibration. If this is unchecked the device will change mode as explained before.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>If you are connected to the device via a serial console (speed: 115200) you can see the connection sequence and get the Unique ID and IP adress from there.</p>
</div>
</div>
@ -145,8 +147,8 @@ you are collecting angle/tilt for calibration. If this is unchecked the device w
</li>
</ul>
</div>
<div class="section" id="id1">
<h2>Configuration<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<p>URL: (<a class="reference external" href="http://gravmon.local/config">http://gravmon.local/config</a>)</p>
<div class="section" id="device-setting">
<h3>Device Setting<a class="headerlink" href="#device-setting" title="Permalink to this headline"></a></h3>
@ -179,8 +181,8 @@ you are collecting angle/tilt for calibration. If this is unchecked the device w
</div></blockquote>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The device will <strong>not</strong> go into <cite>gravity monitoring</cite> mode unless calibrated</p>
</div>
</div>
@ -237,11 +239,16 @@ you are collecting angle/tilt for calibration. If this is unchecked the device w
<li><p><strong>Temperature correct gravity:</strong></p>
<blockquote>
<div><p>Will apply a temperature calibration formula to the gravity as a second step.</p>
<p>This is the formula used for temperature calibration (temp is in F). Cal = 20C.</p>
</div></blockquote>
</li>
</ul>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">gravity</span><span class="o">*</span><span class="p">((</span><span class="mf">1.00130346</span><span class="o">-</span><span class="mf">0.000134722124</span><span class="o">*</span><span class="n">temp</span><span class="o">+</span><span class="mf">0.00000204052596</span><span class="o">*</span><span class="n">temp</span><span class="o">^</span><span class="mi">2</span><span class="o">-</span><span class="mf">0.00000000232820948</span><span class="o">*</span><span class="n">temp</span><span class="o">^</span><span class="mi">3</span><span class="p">)</span><span class="o">/</span><span class="p">(</span><span class="mf">1.00130346</span><span class="o">-</span><span class="mf">0.000134722124</span><span class="o">*</span><span class="n">cal</span><span class="o">+</span><span class="mf">0.00000204052596</span><span class="o">*</span><span class="n">cal</span><span class="o">^</span><span class="mi">2</span><span class="o">-</span><span class="mf">0.00000000232820948</span><span class="o">*</span><span class="n">cal</span><span class="o">^</span><span class="mi">3</span><span class="p">))</span>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This formula assumes that the calibration has been done at 20C.</p>
</div>
<p>Formula used in temperature correction:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">gravity</span><span class="o">*</span><span class="p">((</span><span class="mf">1.00130346</span><span class="o">-</span><span class="mf">0.000134722124</span><span class="o">*</span><span class="n">temp</span><span class="o">+</span><span class="mf">0.00000204052596</span><span class="o">*</span><span class="n">temp</span><span class="o">^</span><span class="mi">2</span><span class="o">-</span><span class="mf">0.00000000232820948</span><span class="o">*</span><span class="n">temp</span><span class="o">^</span><span class="mi">3</span><span class="p">)</span><span class="o">/</span>
<span class="p">(</span><span class="mf">1.00130346</span><span class="o">-</span><span class="mf">0.000134722124</span><span class="o">*</span><span class="n">cal</span><span class="o">+</span><span class="mf">0.00000204052596</span><span class="o">*</span><span class="n">cal</span><span class="o">^</span><span class="mi">2</span><span class="o">-</span><span class="mf">0.00000000232820948</span><span class="o">*</span><span class="n">cal</span><span class="o">^</span><span class="mi">3</span><span class="p">))</span>
</pre></div>
</div>
</div>
@ -273,18 +280,19 @@ code the update will be done during startup.</p>
</div>
</div>
</div>
</div>
<div class="section" id="create-formula">
<h2>Create formula<a class="headerlink" href="#create-formula" title="Permalink to this headline"></a></h2>
<span id="id2"></span><h1>Create formula<a class="headerlink" href="#create-formula" title="Permalink to this headline"></a></h1>
<a class="reference internal image-reference" href="_images/formula1.png"><img alt="Formula data" src="_images/formula1.png" style="width: 800px;" /></a>
<p>Here you can enter up to 5 values (angles + gravity) that is then used to create the formula. Angles equal to zero will be regarded as empty even if there is a gravity reading.</p>
<a class="reference internal image-reference" href="_images/formula2.png"><img alt="Formula graph" src="_images/formula2.png" style="width: 800px;" /></a>
<p>Once the formula is created a graph over the entered values and a simulation of the formula will give you a nice overview on how the formula will work.</p>
</div>
<div class="section" id="rest-api">
<h2>REST API<a class="headerlink" href="#rest-api" title="Permalink to this headline"></a></h2>
<span id="id3"></span><h1>REST API<a class="headerlink" href="#rest-api" title="Permalink to this headline"></a></h1>
<p>All the APIs 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>
<div class="section" id="get-api-config">
<h3>GET: /api/config<a class="headerlink" href="#get-api-config" title="Permalink to this headline"></a></h3>
<h2>GET: /api/config<a class="headerlink" href="#get-api-config" title="Permalink to this headline"></a></h2>
<p>Retrive the current configuation of the device via an HTTP GET command. Payload is in JSON format.</p>
<ul class="simple">
<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>
@ -325,7 +333,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="section" id="get-api-device">
<h3>GET: /api/device<a class="headerlink" href="#get-api-device" title="Permalink to this headline"></a></h3>
<h2>GET: /api/device<a class="headerlink" href="#get-api-device" title="Permalink to this headline"></a></h2>
<p>Retrive the current device settings via an HTTP GET command. Payload is in JSON format.</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;app-name&quot;</span><span class="p">:</span> <span class="s2">&quot;GravityMon &quot;</span><span class="p">,</span>
@ -337,7 +345,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="section" id="get-api-status">
<h3>GET: /api/status<a class="headerlink" href="#get-api-status" title="Permalink to this headline"></a></h3>
<h2>GET: /api/status<a class="headerlink" href="#get-api-status" title="Permalink to this headline"></a></h2>
<p>Retrive the current device status via an HTTP GET command. Payload is in JSON format.</p>
<ul class="simple">
<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>
@ -359,7 +367,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="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>
<h2>GET: /api/config/formula<a class="headerlink" href="#get-api-config-formula" title="Permalink to this headline"></a></h2>
<p>Retrive the data used for formula calculation data via an HTTP GET command. Payload is in JSON format.</p>
<ul class="simple">
<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>
@ -383,7 +391,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="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>
<h2>POST: /api/config/device<a class="headerlink" href="#post-api-config-device" title="Permalink to this headline"></a></h2>
<p>Used to update device settings via an HTTP POST command. Payload is in JSON format.</p>
<ul class="simple">
<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>
@ -398,7 +406,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="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>
<h2>POST: /api/config/push<a class="headerlink" href="#post-api-config-push" title="Permalink to this headline"></a></h2>
<p>Used to update push settings via an HTTP POST command. Payload is in JSON format.</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;ee1bfc&quot;</span><span class="p">,</span>
@ -414,7 +422,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="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>
<h2>POST: /api/config/gravity<a class="headerlink" href="#post-api-config-gravity" title="Permalink to this headline"></a></h2>
<p>Used to update gravity settings via an HTTP POST command. Payload is in JSON format.</p>
<ul class="simple">
<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>
@ -427,8 +435,8 @@ code the update will be done during startup.</p>
</pre></div>
</div>
</div>
<div class="section" id="id2">
<h3>POST: /api/config/gravity<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h3>
<div class="section" id="id4">
<h2>POST: /api/config/gravity<a class="headerlink" href="#id4" title="Permalink to this headline"></a></h2>
<p>Used to update hardware settings via an HTTP POST command. Payload is in JSON format.</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;ee1bfc&quot;</span><span class="p">,</span>
@ -440,7 +448,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="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>
<h2>POST: /api/config/formula<a class="headerlink" href="#post-api-config-formula" title="Permalink to this headline"></a></h2>
<p>Used to update formula calculation data via an HTTP POST command. Payload is in JSON format.</p>
<ul class="simple">
<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>
@ -462,11 +470,82 @@ code the update will be done during startup.</p>
</pre></div>
</div>
</div>
<div class="section" id="calling-the-api-s-from-python">
<h2>Calling the APIs from Python<a class="headerlink" href="#calling-the-api-s-from-python" title="Permalink to this headline"></a></h2>
<p>Here is some example code for how to access the APIs from a python script. Keys should always be
present or the API call will fail.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">requests</span>
<span class="kn">import</span> <span class="nn">json</span>
<span class="n">host</span> <span class="o">=</span> <span class="s2">&quot;192.168.1.1&quot;</span> <span class="c1"># IP adress (or name) of the device to send these settings to</span>
<span class="nb">id</span> <span class="o">=</span> <span class="s2">&quot;ee1bfc&quot;</span> <span class="c1"># Device ID (shown in serial console during startup or in UI)</span>
<span class="k">def</span> <span class="nf">set_config</span><span class="p">(</span> <span class="n">url</span><span class="p">,</span> <span class="n">json</span> <span class="p">):</span>
<span class="n">headers</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">&quot;ContentType&quot;</span><span class="p">:</span> <span class="s2">&quot;application/json&quot;</span> <span class="p">}</span>
<span class="nb">print</span><span class="p">(</span> <span class="n">url</span> <span class="p">)</span>
<span class="n">resp</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">post</span><span class="p">(</span> <span class="n">url</span><span class="p">,</span> <span class="n">headers</span><span class="o">=</span><span class="n">headers</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">json</span> <span class="p">)</span>
<span class="k">if</span> <span class="n">resp</span><span class="o">.</span><span class="n">status_code</span> <span class="o">!=</span> <span class="mi">200</span> <span class="p">:</span>
<span class="nb">print</span> <span class="p">(</span> <span class="s2">&quot;Failed &quot;</span> <span class="p">)</span>
<span class="k">else</span> <span class="p">:</span>
<span class="nb">print</span> <span class="p">(</span> <span class="s2">&quot;Success &quot;</span> <span class="p">)</span>
<span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;http://&quot;</span> <span class="o">+</span> <span class="n">host</span> <span class="o">+</span> <span class="s2">&quot;/api/config/device&quot;</span>
<span class="n">json</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="nb">id</span><span class="p">,</span>
<span class="s2">&quot;mdns&quot;</span><span class="p">:</span> <span class="s2">&quot;gravmon&quot;</span><span class="p">,</span> <span class="c1"># Name of the device</span>
<span class="s2">&quot;temp-format&quot;</span><span class="p">:</span> <span class="s2">&quot;C&quot;</span><span class="p">,</span> <span class="c1"># Temperature format C or F</span>
<span class="s2">&quot;sleep-interval&quot;</span><span class="p">:</span> <span class="mi">30</span> <span class="c1"># Sleep interval in seconds</span>
<span class="p">}</span>
<span class="n">set_config</span><span class="p">(</span> <span class="n">url</span><span class="p">,</span> <span class="n">json</span> <span class="p">)</span>
<span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;http://&quot;</span> <span class="o">+</span> <span class="n">host</span> <span class="o">+</span> <span class="s2">&quot;/api/config/push&quot;</span>
<span class="n">json</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="nb">id</span><span class="p">,</span>
<span class="s2">&quot;http-push&quot;</span><span class="p">:</span> <span class="s2">&quot;http://192.168.1.1/ispindel&quot;</span><span class="p">,</span> <span class="c1"># HTTP endpoint</span>
<span class="s2">&quot;http-push2&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="c1"># HTTP endpoint2</span>
<span class="s2">&quot;brewfather-push&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="c1"># Brewfather URL</span>
<span class="s2">&quot;influxdb2-push&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="c1"># InfluxDB2 settings</span>
<span class="s2">&quot;influxdb2-org&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;influxdb2-bucket&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;influxdb2-auth&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span>
<span class="p">}</span>
<span class="n">set_config</span><span class="p">(</span> <span class="n">url</span><span class="p">,</span> <span class="n">json</span> <span class="p">)</span>
<span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;http://&quot;</span> <span class="o">+</span> <span class="n">host</span> <span class="o">+</span> <span class="s2">&quot;/api/config/gravity&quot;</span>
<span class="n">json</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="nb">id</span><span class="p">,</span>
<span class="s2">&quot;gravity-formula&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="c1"># If you want to set the gravity formula</span>
<span class="s2">&quot;gravity-temp-adjustment&quot;</span><span class="p">:</span> <span class="s2">&quot;off&quot;</span> <span class="c1"># on or off</span>
<span class="p">}</span>
<span class="n">set_config</span><span class="p">(</span> <span class="n">url</span><span class="p">,</span> <span class="n">json</span> <span class="p">)</span>
<span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;http://&quot;</span> <span class="o">+</span> <span class="n">host</span> <span class="o">+</span> <span class="s2">&quot;/api/config/hardware&quot;</span>
<span class="n">json</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="nb">id</span><span class="p">,</span>
<span class="s2">&quot;voltage-factor&quot;</span><span class="p">:</span> <span class="mf">1.59</span><span class="p">,</span> <span class="c1"># Default value for voltage calculation</span>
<span class="s2">&quot;temp-adjustment&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="c1"># If temp sensor needs to be corrected</span>
<span class="s2">&quot;ota-url&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span> <span class="c1"># if the device should seach for a new update when active</span>
<span class="p">}</span>
<span class="n">set_config</span><span class="p">(</span> <span class="n">url</span><span class="p">,</span> <span class="n">json</span> <span class="p">)</span>
<span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;http://&quot;</span> <span class="o">+</span> <span class="n">host</span> <span class="o">+</span> <span class="s2">&quot;/api/formula&quot;</span>
<span class="n">json</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="nb">id</span><span class="p">,</span>
<span class="s2">&quot;a1&quot;</span><span class="p">:</span> <span class="mf">22.4</span><span class="p">,</span>
<span class="s2">&quot;a2&quot;</span><span class="p">:</span> <span class="mf">54.4</span><span class="p">,</span>
<span class="s2">&quot;a3&quot;</span><span class="p">:</span> <span class="mi">58</span><span class="p">,</span>
<span class="s2">&quot;a4&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s2">&quot;a5&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s2">&quot;g1&quot;</span><span class="p">:</span> <span class="mf">1.000</span><span class="p">,</span>
<span class="s2">&quot;g2&quot;</span><span class="p">:</span> <span class="mf">1.053</span><span class="p">,</span>
<span class="s2">&quot;g3&quot;</span><span class="p">:</span> <span class="mf">1.062</span><span class="p">,</span>
<span class="s2">&quot;g4&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="s2">&quot;g5&quot;</span><span class="p">:</span> <span class="mi">1</span>
<span class="p">}</span>
<span class="n">set_config</span><span class="p">(</span> <span class="n">url</span><span class="p">,</span> <span class="n">json</span> <span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="data-formats">
<h2>Data Formats<a class="headerlink" href="#data-formats" title="Permalink to this headline"></a></h2>
<span id="id5"></span><h1>Data Formats<a class="headerlink" href="#data-formats" title="Permalink to this headline"></a></h1>
<div class="section" id="ispindle-format">
<h3>iSpindle format<a class="headerlink" href="#ispindle-format" title="Permalink to this headline"></a></h3>
<h2>iSpindle format<a class="headerlink" href="#ispindle-format" title="Permalink to this headline"></a></h2>
<p>This is the format used for standard http posts.</p>
<ul class="simple">
<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>
@ -490,7 +569,7 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="section" id="brewfather-format">
<h3>Brewfather format<a class="headerlink" href="#brewfather-format" title="Permalink to this headline"></a></h3>
<h2>Brewfather format<a class="headerlink" href="#brewfather-format" title="Permalink to this headline"></a></h2>
<p>This is the format for Brewfather</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;name&quot;</span> <span class="p">:</span> <span class="s2">&quot;gravmon&quot;</span><span class="p">,</span>
@ -504,14 +583,14 @@ code the update will be done during startup.</p>
</div>
</div>
<div class="section" id="influx-db-v2">
<h3>Influx DB v2<a class="headerlink" href="#influx-db-v2" title="Permalink to this headline"></a></h3>
<h2>Influx DB v2<a class="headerlink" href="#influx-db-v2" title="Permalink to this headline"></a></h2>
<p>This is the format for InfluxDB v2</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">measurement</span><span class="p">,</span><span class="n">host</span><span class="o">=&lt;</span><span class="n">mdns</span><span class="o">&gt;</span><span class="p">,</span><span class="n">device</span><span class="o">=&lt;</span><span class="nb">id</span><span class="o">&gt;</span><span class="p">,</span><span class="n">temp</span><span class="o">-</span><span class="nb">format</span><span class="o">=&lt;</span><span class="n">C</span><span class="o">|</span><span class="n">F</span><span class="o">&gt;</span><span class="p">,</span><span class="n">gravity</span><span class="o">-</span><span class="nb">format</span><span class="o">=</span><span class="n">SG</span><span class="p">,</span><span class="n">gravity</span><span class="o">=</span><span class="mf">1.0004</span><span class="p">,</span><span class="n">corr</span><span class="o">-</span><span class="n">gravity</span><span class="o">=</span><span class="mf">1.0004</span><span class="p">,</span><span class="n">angle</span><span class="o">=</span><span class="mf">45.45</span><span class="p">,</span><span class="n">temp</span><span class="o">=</span><span class="mf">20.1</span><span class="p">,</span><span class="n">battery</span><span class="o">=</span><span class="mf">3.96</span><span class="p">,</span><span class="n">rssi</span><span class="o">=-</span><span class="mi">18</span>
</pre></div>
</div>
</div>
<div class="section" id="version-json">
<h3>version.json<a class="headerlink" href="#version-json" title="Permalink to this headline"></a></h3>
<h2>version.json<a class="headerlink" href="#version-json" title="Permalink to this headline"></a></h2>
<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 its 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>
@ -529,7 +608,6 @@ they can be uploaded manually afterwards.</p>
</pre></div>
</div>
</div>
</div>
</div>

View File

@ -37,10 +37,14 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</a></li>
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>

View File

@ -37,6 +37,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Functionallity</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#the-main-differences">The main differences</a></li>
@ -47,7 +48,10 @@
</ul>
</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">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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>
@ -78,21 +82,21 @@
<div itemprop="articleBody">
<div class="section" id="functionallity">
<h1>Functionallity<a class="headerlink" href="#functionallity" title="Permalink to this headline"></a></h1>
<span id="id1"></span><h1>Functionallity<a class="headerlink" href="#functionallity" title="Permalink to this headline"></a></h1>
<div class="section" id="the-main-differences">
<h2>The main differences<a class="headerlink" href="#the-main-differences" title="Permalink to this headline"></a></h2>
<ul>
<li><p><strong>Operates in two modes gravity monitoring and configuration mode</strong></p>
<p>In <code class="docutils literal notranslate"><span class="pre">gravity</span> <span class="pre">monitoring</span></code> mode it behaves just like the iSpindle, it wakes up at regular intervals, measure angle/tile, temperature, calculates gravity and pushes the data to defined endpoints.</p>
<p>In <code class="docutils literal notranslate"><span class="pre">gravity</span> <span class="pre">monitoring</span></code> mode it behaves just like the iSpindle, it wakes up at regular intervals, measures angle/tile, temperature, calculates gravity and pushes the data to defined endpoints.</p>
<p>In <code class="docutils literal notranslate"><span class="pre">configuration</span> <span class="pre">mode</span></code> the device is always active and the webserver is active. Here you can view the angle/tilt values, change configuration options and more. When in this mode you can also interact with the device
via an REST API so data can be pushed to the device via scripts (see API section for more information)</p>
<p>You can force the device into <code class="docutils literal notranslate"><span class="pre">configuration</span> <span class="pre">mode</span></code> while measuring gravity. This is useful when calibrating the device so you dont needs to wait for the device to wake up and push the data. The entire calibration
via an REST API so data can be pushed to the device via scripts (see API section for more information).</p>
<p>You can force the device into <code class="docutils literal notranslate"><span class="pre">configuration</span> <span class="pre">mode</span></code> while measuring gravity. This is useful when calibrating the device so you dont needs to wait for the device to wake up and push the data. The entire calibration
sequence can be handled via the web interface without need for additional software tools.</p>
<p><em>See the configuration section for more information on how to trigger the configuration mode.</em></p>
<p>See the <a class="reference internal" href="configuration.html#setting-up-device"><span class="std std-ref">Setting up device</span></a> section for more information on how to trigger the configuration mode.</p>
</li>
<li><p><strong>Can send data to multiple endpoints at once</strong></p>
<p>The original iSpindle can only have one destination, this software will push data to all defined endpoints so in theory you can use them all. However this will consume a lot of battery power so use only as many as needed.</p>
<p>Currently the device supports the following endpoints: http (2 differnt), influxdb2 and Brewfather</p>
<p>Currently the device supports the following endpoints: http (2 different), influxdb2 and Brewfather</p>
<p>If you want additional targets please raise a feature request in the github repo.</p>
</li>
<li><p><strong>Build in function to create gravity formulas, so no need for using other tools for this part</strong></p>
@ -128,21 +132,19 @@ sequence can be handled via the web interface without need for additional softwa
</div>
<div class="section" id="experimental-features">
<h2>Experimental features<a class="headerlink" href="#experimental-features" title="Permalink to this headline"></a></h2>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>These are not enabled by default. To enable them you need to recompile the code and enable the correct defines.</p>
</div>
<ul>
<li><p>Use the temperature sensor in the gyro instead of DS18B20</p>
<p>This works fine when the device has time to cool down between measurements and it saves a few milliseconds (reduced battery consumption). My testing shows that this is quite accurate.
There is lots of battery power to save, reading the temp sensor takes almost as long as the gyro. This could reduce the run time by 40-50% and probly extend battery life with the same.
However more testing is required. Might add this as an option in the UI.</p>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This is not enabled by default.</p>
</div>
<ul>
<li><p>Performance measurements</p>
<p>Ive also create a small library to measure execution code in some areas of the code that i know is time consuming. This way I can find a good balance between performace and quality.</p>
<p><em>See the compile section for more information.</em></p>
<p>See the <a class="reference internal" href="compiling.html#compiling-the-software"><span class="std std-ref">Compiling the software</span></a> for more information.</p>
</li>
</ul>
</div>

View File

@ -36,10 +36,14 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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>

View File

@ -16,7 +16,7 @@
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Releases" href="releases.html" />
<link rel="next" title="Licence" href="license.html" />
</head>
<body class="wy-body-for-nav">
@ -36,10 +36,14 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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>
@ -73,16 +77,16 @@
<h1>Welcome to GravityMons documentation!<a class="headerlink" href="#welcome-to-gravitymon-s-documentation" title="Permalink to this headline"></a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Preliminary documentation. This is work in progress. This documentation reflects <strong>v0.5</strong></p>
<p>This documentation reflects <strong>v0.5</strong>. Last updated 2022-01-09</p>
</div>
<p>GravityMon is a replacement firmare for the iSpindle firmware, it uses the same hardware configuration so
you can easily switch between them. Its used to measure gravity in beer and show the progress of fermentation.</p>
<p>For more information on this topic and function please visit <a class="reference external" href="https://www.ispindel.de">https://www.ispindel.de</a>.</p>
<p>For more information on this topic and function please visit <a class="reference external" href="https://www.ispindel.de">iSpindel Homepage</a> .</p>
<p>I started GravityMon because i like to create software and wanted to do some low level programming. I had done a few
projects based on esp8266 and also started to brew beer so this combination was quite natural.</p>
<p>The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation.</p>
<p>My approach to this software is a little different from that the original ispindle firmware. The github repository can
be found here; <a class="reference external" href="https://github.com/mp-se/gravitymon">https://github.com/mp-se/gravitymon</a></p>
be found here; <a class="reference external" href="https://github.com/mp-se/gravitymon">GravityMon on Github</a></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This software is in the early stages even though its more than one year old so if you find issues, please
@ -97,18 +101,19 @@ over the last 6 months without any issues.</p>
<li><p>Send data to multiple endpoints when pushing data.</p></li>
<li><p>Automatic temperature adjustment of gravity reading</p></li>
<li><p>OTA support from local webserver</p></li>
<li><p>Build in function to create gravity formulas (<em>New in v0.5</em>)</p></li>
<li><p>Build in function to create gravity formulas</p></li>
</ul>
<p>There are also a experimental features such as:</p>
<ul class="simple">
<li><p>Using the temperature sensor in gyro instead of DS18B20 (faster)</p></li>
<li><p>Performance measurements (used to optimise code)</p></li>
</ul>
<p><strong>For a complete breakdown see the functionallity section.</strong></p>
<p>For a complete breakdown see the <a class="reference internal" href="functionallity.html#functionallity"><span class="std std-ref">Functionallity</span></a></p>
</div>
<div class="section" id="credits-to">
<h2>Credits to<a class="headerlink" href="#credits-to" title="Permalink to this headline"></a></h2>
<p>This software uses the following libraries and without these this would have been much more difficult to acheive:</p>
<p>Ideas to some of these functions have been picked up from disucssions in the iSpindle forums. This software uses
the following libraries and without these this would have been much more difficult to acheive:</p>
<ul>
<li><p><a class="reference external" href="https://github.com/jrowberg/i2cdevlib.git">https://github.com/jrowberg/i2cdevlib.git</a></p>
<p>This library contains the basic code to interact with the gyro + many more chips.</p>
@ -150,6 +155,7 @@ over the last 6 months without any issues.</p>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</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>
@ -168,13 +174,31 @@ over the last 6 months without any issues.</p>
<li class="toctree-l2"><a class="reference internal" href="installation.html#configuring-wifi">Configuring WIFI</a></li>
</ul>
</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">Setting up device</a><ul>
<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#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#rest-api">REST API</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#data-formats">Data Formats</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#configuration">Configuration</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#get-api-config">GET: /api/config</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#get-api-device">GET: /api/device</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#get-api-status">GET: /api/status</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#get-api-config-formula">GET: /api/config/formula</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#post-api-config-device">POST: /api/config/device</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#post-api-config-push">POST: /api/config/push</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#post-api-config-gravity">POST: /api/config/gravity</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#id4">POST: /api/config/gravity</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#post-api-config-formula">POST: /api/config/formula</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#calling-the-api-s-from-python">Calling the APIs from Python</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#ispindle-format">iSpindle format</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#brewfather-format">Brewfather format</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#influx-db-v2">Influx DB v2</a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#version-json">version.json</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a><ul>
@ -208,7 +232,7 @@ over the last 6 months without any issues.</p>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="releases.html" class="btn btn-neutral float-right" title="Releases" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="license.html" class="btn btn-neutral float-right" title="Licence" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>

View File

@ -16,7 +16,7 @@
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Configuration" href="configuration.html" />
<link rel="next" title="Setting up device" href="configuration.html" />
<link rel="prev" title="Functionallity" href="functionallity.html" />
</head>
@ -37,6 +37,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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 current"><a class="current reference internal" href="#">Installation</a><ul>
@ -49,7 +50,10 @@
<li class="toctree-l2"><a class="reference internal" href="#configuring-wifi">Configuring WIFI</a></li>
</ul>
</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">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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>
@ -84,7 +88,7 @@
<div class="section" id="official-esptool">
<h2>Official esptool<a class="headerlink" href="#official-esptool" title="Permalink to this headline"></a></h2>
<p>The prefered option for flashing esp8266 device is via the official esptool. Documentation can be found
here; <a class="reference external" href="https://docs.espressif.com/projects/esptool/en/latest/esp32/">https://docs.espressif.com/projects/esptool/en/latest/esp32/</a></p>
here; <a class="reference external" href="https://docs.espressif.com/projects/esptool/en/latest/esp32/">esptool home page</a></p>
<p>Windows 10 should install a driver for the USB -&gt; Serial automatically when you connect a esp8266.</p>
<div class="section" id="flashing-on-windows">
<h3>Flashing on windows<a class="headerlink" href="#flashing-on-windows" title="Permalink to this headline"></a></h3>
@ -101,7 +105,7 @@ Just select a baud rate of 115200, 8N1.</p>
</div>
<div class="section" id="binaries">
<h3>Binaries<a class="headerlink" href="#binaries" title="Permalink to this headline"></a></h3>
<p>In the /bin directory you will find 3 different firmware builds;</p>
<p>In the /bin directory you will find 2 different firmware builds;</p>
<ul>
<li><p><strong>firmware.bin</strong></p>
<p>This is the standard release build (prefered version)</p>
@ -109,9 +113,6 @@ Just select a baud rate of 115200, 8N1.</p>
<li><p><strong>firmware-perf.bin</strong></p>
<p>This version also submits performance data to an influx database with detailed execution times.</p>
</li>
<li><p><strong>firmware-debug.bin</strong></p>
<p>Development build. Not recommended for normal use.</p>
</li>
</ul>
<p>In these versions all the html files are embedded in the binaries. The file system is currently only used for storing
the configuration file.</p>
@ -136,7 +137,7 @@ in the browser: <strong>http://192.168.4.1</strong></p>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="functionallity.html" class="btn btn-neutral float-left" title="Functionallity" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="configuration.html" class="btn btn-neutral float-right" title="Configuration" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="configuration.html" class="btn btn-neutral float-right" title="Setting up device" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>

129
docs/license.html Normal file
View File

@ -0,0 +1,129 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Licence &mdash; GravityMon 0.5.0 documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script id="documentation_options" data-url_root="./" 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/language_data.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" />
<link rel="next" title="Releases" href="releases.html" />
<link rel="prev" title="Welcome to GravityMons documentation!" href="index.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"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Licence</a></li>
<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">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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> &raquo;</li>
<li>Licence</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/license.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">
<div class="section" id="licence">
<span id="id1"></span><h1>Licence<a class="headerlink" href="#licence" title="Permalink to this headline"></a></h1>
<p>MIT License</p>
<p>Copyright (c) 2021-22 Magnus</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.</p>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Welcome to GravityMons documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="releases.html" class="btn btn-neutral float-right" title="Releases" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; 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>

Binary file not shown.

View File

@ -17,7 +17,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Functionallity" href="functionallity.html" />
<link rel="prev" title="Welcome to GravityMons documentation!" href="index.html" />
<link rel="prev" title="Licence" href="license.html" />
</head>
<body class="wy-body-for-nav">
@ -37,6 +37,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</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>
@ -44,7 +45,10 @@
</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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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>
@ -75,7 +79,7 @@
<div itemprop="articleBody">
<div class="section" id="releases">
<h1>Releases<a class="headerlink" href="#releases" title="Permalink to this headline"></a></h1>
<span id="id1"></span><h1>Releases<a class="headerlink" href="#releases" title="Permalink to this headline"></a></h1>
<div class="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>
@ -91,7 +95,7 @@
<div class="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><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">Release v0.4 on Github</a></p>
</div>
</div>
@ -99,7 +103,7 @@
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Welcome to GravityMons documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="license.html" class="btn btn-neutral float-left" title="Licence" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="functionallity.html" class="btn btn-neutral float-right" title="Functionallity" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

View File

@ -38,10 +38,14 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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>

File diff suppressed because one or more lines are too long

View File

@ -35,10 +35,14 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="license.html">Licence</a></li>
<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="configuration.html">Setting up device</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#create-formula">Create formula</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#data-formats">Data Formats</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>