389 lines
20 KiB
HTML
389 lines
20 KiB
HTML
<!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="Installation" href="installation.html" /><link rel="prev" title="Releases" href="releases.html" />
|
||
|
||
<meta name="generator" content="sphinx-4.4.0, furo 2022.01.02"/>
|
||
<title>Functionallity - GravityMon 0.7.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="index.html"><div class="brand">GravityMon 0.7.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="index.html">
|
||
|
||
|
||
<span class="sidebar-brand-text">GravityMon 0.7.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 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 current-page"><a class="current reference internal" href="#">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#format-editor">Format editor</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 & 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="functionallity">
|
||
<span id="id1"></span><h1>Functionallity<a class="headerlink" href="#functionallity" title="Permalink to this headline">¶</a></h1>
|
||
<div class="section" id="the-main-features">
|
||
<h2>The main features<a class="headerlink" href="#the-main-features" 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, 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 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.</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 more battery power so use only as many as needed.</p>
|
||
<p>Currently the device supports the following endpoints: http (2 different), influxdb2, Brewfather and MQTT.</p>
|
||
<p>If you want additional targets please raise a feature request in the github repo.</p>
|
||
</li>
|
||
<li><p><strong>Create gravity formulas on the device</strong></p>
|
||
<p>Another big difference is that this software can create the gravity formula in the device, just enter the
|
||
angle/gravity data that you have collected. You will also see a graph simulating how the formula would work.</p>
|
||
</li>
|
||
</ul>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>This feature needs more testing to be validated.</p>
|
||
</div>
|
||
<ul>
|
||
<li><p><strong>Customize the data format beeing sent to push targets</strong></p>
|
||
<p>In order to make it easier to support more targets there is a built in format editor that can be used to
|
||
customize the data that is to be sent. This way you can easily adapt the software to new targets without coding.
|
||
If you have a good template please share it on the girhub repository and I will add it to the documentation
|
||
for other users to enjoy. See the <a class="reference internal" href="configuration.html#format-editor"><span class="std std-ref">Format editor</span></a> for more information.</p>
|
||
</li>
|
||
</ul>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>This feature needs more testing to be validated.</p>
|
||
</div>
|
||
<ul>
|
||
<li><p><strong>Automatic temperature adjustment of gravity reading</strong></p>
|
||
<p>If you want to correct gravity based on beer temperature you can do this in the formula but here is a nice
|
||
feature that can correct the gravity as a second step making this independant of the formula.</p>
|
||
</li>
|
||
</ul>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>This feature needs more testing to be validated.</p>
|
||
</div>
|
||
<ul>
|
||
<li><p><strong>OTA support from local webserver</strong></p>
|
||
<p>When starting up in configuration mode the device will check for a software update from a local webserver.</p>
|
||
</li>
|
||
<li><p><strong>DS18B20 temperature adjustments</strong></p>
|
||
<p>You can adjust the temperature reading of the temperature sensor.</p>
|
||
</li>
|
||
<li><p><strong>Gyro Movement</strong></p>
|
||
<p>The software will detect if the gyro is moving and if this is the case it will go back to sleep for 60seconds.
|
||
This way we should avoid faulty measurements.</p>
|
||
</li>
|
||
<li><p><strong>WIFI connection issues</strong></p>
|
||
<p>The software will not wait indefiently for a wifi connection. If it takes longer than 20 seconds to connect then
|
||
the device will go into deep sleep for 60 seoncds and then retry.</p>
|
||
</li>
|
||
<li><p><strong>Use gyro temperature sensor</strong></p>
|
||
<p>This works fine when the device has time to cool down between measurements and it saves up to 400 ms.
|
||
My testing shows that this is quite accurate with a deviation of less than 0.3C. This
|
||
reduces the run time by 20% (with optimal wifi connection).</p>
|
||
<p>The graph below compares from the temp from two different devices in the same bucket of water. One with
|
||
gyro temp enabled and one with the DS18B20 sensor. The blue line is the gyro temperature and this clear
|
||
that the temperature will be higher after it has been running but cools down when in sleep mode. The interval
|
||
has been set to 300s. A low delay of 30s will not allow the gyro to cool down and the temperature will
|
||
be 0.5-1.0C higher.</p>
|
||
</li>
|
||
</ul>
|
||
<a class="reference internal image-reference" href="_images/temp1.png"><img alt="Gyro temp vs DS18B20" src="_images/temp1.png" style="width: 800px;"/></a>
|
||
</div>
|
||
<div class="section" id="other-features">
|
||
<h2>Other features<a class="headerlink" href="#other-features" title="Permalink to this headline">¶</a></h2>
|
||
<ul class="simple">
|
||
<li><p>Support for Celcius and Farenheigt as temperature formats.</p></li>
|
||
<li><p>Support SG (Plato is not yet supported)</p></li>
|
||
<li><p>Gyro data is read 50 times to ensure good accuracy</p></li>
|
||
</ul>
|
||
</div>
|
||
<div class="section" id="experimental-features">
|
||
<h2>Experimental features<a class="headerlink" href="#experimental-features" title="Permalink to this headline">¶</a></h2>
|
||
<ul>
|
||
<li><p><strong>Performance measurements</strong></p>
|
||
<p>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.</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>
|
||
<li><p><strong>Power measurements</strong></p>
|
||
<p>I’ve also create a project to measure the power consumption of the device, but more on this later.</p>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="section" id="battery-life">
|
||
<h2>Battery life<a class="headerlink" href="#battery-life" title="Permalink to this headline">¶</a></h2>
|
||
<p>I’m currently measuring battery life of v0.5 but previous versions have been able to measure gravity for
|
||
a 2-3 weeks without issues (Using 900 seconds as interval).</p>
|
||
<p>I had a device running with an sleep interval of only 30s with ok wifi connection. The device lasted
|
||
12 days which i think is excellent considering the short sleep interval. From what I have discovered
|
||
it’s the WIFI connection that has the most impact on the battery life. In a perfect scenario it
|
||
can take around 400ms but can in some cases take up to 8 seconds.</p>
|
||
<p><em>More on this topics once my tests are done</em></p>
|
||
</div>
|
||
<div class="section" id="performance">
|
||
<h2>Performance<a class="headerlink" href="#performance" title="Permalink to this headline">¶</a></h2>
|
||
<p>Since I have the possibility to measure the performance of different function in the code this is what I have been able to gather.</p>
|
||
<p>The typical runtime in a measurement cycle is approx 2 seconds and in some cases it can take up to 6-8 seconds but this is mainly related to establishing the WIFI connection. So stable wifi is
|
||
essential for long batterylife. Out of the 2 seconds of run-time the major time is spent on gyro readings (1.3s) and temperature measurements of (0.6s) so using the gyro sensor for measureing
|
||
temperature would reduce the total runtime with 25%. Sending data over http takes less than 100ms (on my local network) so this is not drawing much power.</p>
|
||
<p>The image below shows how the run-time varies over time. The pink line is the wifi connection time and this is why the time varies. The orange is the total runtime for the awake period.</p>
|
||
<a class="reference internal image-reference" href="_images/perf1.png"><img alt="Performance view" src="_images/perf1.png" style="width: 800px;"/></a>
|
||
</div>
|
||
</div>
|
||
|
||
</article>
|
||
</div>
|
||
<footer>
|
||
|
||
<div class="related-pages">
|
||
<a class="next-page" href="installation.html">
|
||
<div class="page-info">
|
||
<div class="context">
|
||
<span>Next</span>
|
||
</div>
|
||
<div class="title">Installation</div>
|
||
</div>
|
||
<svg><use href="#svg-arrow-right"></use></svg>
|
||
</a>
|
||
<a class="prev-page" href="releases.html">
|
||
<svg><use href="#svg-arrow-right"></use></svg>
|
||
<div class="page-info">
|
||
<div class="context">
|
||
<span>Previous</span>
|
||
</div>
|
||
|
||
<div class="title">Releases</div>
|
||
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="related-information">
|
||
Copyright © 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="#">Functionallity</a><ul>
|
||
<li><a class="reference internal" href="#the-main-features">The main features</a></li>
|
||
<li><a class="reference internal" href="#other-features">Other features</a></li>
|
||
<li><a class="reference internal" href="#experimental-features">Experimental features</a></li>
|
||
<li><a class="reference internal" href="#battery-life">Battery life</a></li>
|
||
<li><a class="reference internal" href="#performance">Performance</a></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> |