gravitymon/docs/index.html
2022-01-15 15:50:23 +00:00

424 lines
23 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html class="no-js">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Licence" href="license.html" />
<meta name="generator" content="sphinx-4.3.2, furo 2022.01.02"/>
<title>GravityMon 0.6.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=df49af52631e7917044a9c21a57f7b83170a6dd0" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=fade93df149f7c5fedb3ff897f799dc7d283b420" />
<style>
body {
--color-code-background: #f8f8f8;
--color-code-foreground: black;
}
body[data-theme="dark"] {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
}
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
}
}
</style></head>
<body>
<script>
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
</script>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-toc" viewBox="0 0 24 24">
<title>Contents</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" />
<line x1="4" y1="6" x2="20" y2="6" />
<line x1="10" y1="12" x2="20" y2="12" />
<line x1="6" y1="18" x2="20" y2="18" />
</svg>
</symbol>
<symbol id="svg-menu" viewBox="0 0 24 24">
<title>Menu</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
<title>Expand</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</symbol>
<symbol id="svg-sun" viewBox="0 0 24 24">
<title>Light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</symbol>
<symbol id="svg-moon" viewBox="0 0 24 24">
<title>Dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
</svg>
</symbol>
<symbol id="svg-sun-half" viewBox="0 0 24 24">
<title>Auto light/dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<circle cx="12" cy="12" r="9" />
<path d="M13 12h5" />
<path d="M13 15h4" />
<path d="M13 18h1" />
<path d="M13 9h4" />
<path d="M13 6h1" />
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
<label class="overlay sidebar-overlay" for="__navigation">
<div class="visually-hidden">Hide navigation sidebar</div>
</label>
<label class="overlay toc-overlay" for="__toc">
<div class="visually-hidden">Hide table of contents sidebar</div>
</label>
<div class="page">
<header class="mobile-header">
<div class="header-left">
<label class="nav-overlay-icon" for="__navigation">
<div class="visually-hidden">Toggle site navigation sidebar</div>
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
</label>
</div>
<div class="header-center">
<a href="#"><div class="brand">GravityMon 0.6.0 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-header-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand" href="#">
<span class="sidebar-brand-text">GravityMon 0.6.0 documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<p class="caption" role="heading"><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">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="q_and_a.html">Q &amp; A</a></li>
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>
</ul>
</div>
</div>
</div>
</div>
</aside>
<div class="main">
<div class="content">
<div class="article-container">
<div class="content-icon-container">
<div class="theme-toggle-container theme-toggle-content">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-content-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
<article role="main">
<div class="section" id="welcome-to-gravitymon-s-documentation">
<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>This documentation reflects <strong>v0.6</strong>. Last updated 2022-01-15</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">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">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
open a ticket on github.</p>
<p>I dont take responsibility for any errors that can cause problems with the use. I have tested v0.4 on 5+ brews
over the last 6 months without any issues.</p>
</div>
<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 class="simple">
<li><p>Operates in two modes gravity monitoring and configuration mode (simplify calibration)</p></li>
<li><p>Modern web based UI for configuration (in config mode)</p></li>
<li><p>REST API</p></li>
<li><p>Send data to multiple endpoints when pushing data (2xhttp, brewfather, influxdb v2, mqtt supported)</p></li>
<li><p>Automatic temperature adjustment of gravity reading</p></li>
<li><p>OTA support from local webserver</p></li>
<li><p>Built in function to create gravity formulas, no need for additional software, just enter tilt/gravity.</p></li>
<li><p>Visual graph showing how formula will be interpreted</p></li>
<li><p>Using the temperature sensor in gyro instead of DS18B20 (faster)</p></li>
<li><p>Built in performance measurements (used to optimise code)</p></li>
</ul>
<p>For a complete breakdown see the <a class="reference internal" href="functionallity.html#functionallity"><span class="std std-ref">Functionallity</span></a></p>
<p>This is a simple overview of the different components that the software contains. The green ones are only active during <cite>configuration mode</cite> in
order to save battery.</p>
<a class="reference internal image-reference" href="_images/software_design.png"><img alt="Software design" src="_images/software_design.png" style="width: 600px;"/></a>
</div>
<div class="section" id="credits-to">
<h2>Credits to<a class="headerlink" href="#credits-to" title="Permalink to this headline"></a></h2>
<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">https://github.com/jrowberg/i2cdevlib</a></p>
<p>This library contains the basic code to interact with the gyro + many more chips.</p>
</li>
<li><p><a class="reference external" href="https://github.com/codeplea/tinyexpr">https://github.com/codeplea/tinyexpr</a></p>
<p>Proccess the gravity formula and calculate the gravity and various corrections.</p>
</li>
<li><p><a class="reference external" href="https://github.com/graphitemaster/incbin">https://github.com/graphitemaster/incbin</a></p>
<p>Include binary files into the code, used to service html files.</p>
</li>
<li><p><a class="reference external" href="https://github.com/khoih-prog/ESP_DoubleResetDetector">https://github.com/khoih-prog/ESP_DoubleResetDetector</a></p>
<p>Can detect if the reset button is pressed twice, is used to enter WIFI config mode.</p>
</li>
<li><p><a class="reference external" href="https://github.com/khoih-prog/ESP_WiFiManager">https://github.com/khoih-prog/ESP_WiFiManager</a></p>
<p>Configure wifi settings.</p>
</li>
<li><p><a class="reference external" href="https://github.com/thijse/Arduino-Log">https://github.com/thijse/Arduino-Log</a></p>
<p>Logging library for handling different loglevels and configure what sent over the serial.</p>
</li>
<li><p><a class="reference external" href="https://github.com/bblanchon/ArduinoJson">https://github.com/bblanchon/ArduinoJson</a></p>
<p>Json parser/creator used in configuration files and APIs</p>
</li>
<li><p><a class="reference external" href="https://github.com/PaulStoffregen/OneWire">https://github.com/PaulStoffregen/OneWire</a></p>
<p>Communication library used for interacting with temperature sensor.</p>
</li>
<li><p><a class="reference external" href="https://github.com/milesburton/Arduino-Temperature-Control-Library">https://github.com/milesburton/Arduino-Temperature-Control-Library</a></p>
<p>Interaction with the DS18B20 sensor</p>
</li>
<li><p><a class="reference external" href="https://github.com/Rotario/arduinoCurveFitting">https://github.com/Rotario/arduinoCurveFitting</a></p>
<p>Create the gravity formula.</p>
</li>
<li><p><a class="reference external" href="https://github.com/256dpi/arduino-mqtt">https://github.com/256dpi/arduino-mqtt</a></p>
<p>Library for sending data to mqtt based on lightweight mqtt implemenentation.</p>
</li>
<li><p><a class="reference external" href="https://graphjs.com/">https://graphjs.com/</a></p>
<p>Render the graphs in the UI.</p>
</li>
<li><p><a class="reference external" href="https://getbootstrap.com/">https://getbootstrap.com/</a></p>
<p>CSS templates for the web page.</p>
</li>
</ul>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><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-6-0">v0.6.0</a></li>
<li class="toctree-l2"><a class="reference internal" href="releases.html#v0-5-0">v0.5.0</a></li>
<li class="toctree-l2"><a class="reference internal" href="releases.html#v0-4-0">v0.4.0</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a><ul>
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#the-main-differences">The main differences</a></li>
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#other-features">Other features</a></li>
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#experimental-features">Experimental features</a></li>
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#battery-life">Battery life</a></li>
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#performance">Performance</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation.html#brewflasher">Brewflasher</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#esptool">Esptool</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#serial-monitoring">Serial Monitoring</a></li>
<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">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#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#post-api-config-hardware">POST: /api/config/hardware</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>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#tools">Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#code-formatting">Code Formatting</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#targets">Targets</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#source-structure">Source structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#options">Options</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="q_and_a.html">Q &amp; A</a><ul>
<li class="toctree-l2"><a class="reference internal" href="q_and_a.html#my-device-is-no-going-in-to-sleep-after-fully-charged">My device is no going in to sleep after fully charged</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a><ul>
<li class="toctree-l2"><a class="reference internal" href="backlog.html#documentation">Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="backlog.html#code">Code</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="indices-and-tables">
<h3>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
</div>
</div>
</div>
</article>
</div>
<footer>
<div class="related-pages">
<a class="next-page" href="license.html">
<div class="page-info">
<div class="context">
<span>Next</span>
</div>
<div class="title">Licence</div>
</div>
<svg><use href="#svg-arrow-right"></use></svg>
</a>
</div>
<div class="related-information">
Copyright &#169; 2021-2022, Magnus Persson |
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo theme</a>.
</div>
</footer>
</div>
<aside class="toc-drawer">
<div class="toc-sticky toc-scroll">
<div class="toc-title-container">
<span class="toc-title">
Contents
</span>
</div>
<div class="toc-tree-container">
<div class="toc-tree">
<ul>
<li><a class="reference internal" href="#">Welcome to GravityMons documentation!</a><ul>
<li><a class="reference internal" href="#the-main-differences">The main differences:</a></li>
<li><a class="reference internal" href="#credits-to">Credits to</a><ul>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</aside>
</div>
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/scripts/furo.js"></script>
</body>
</html>