566 lines
34 KiB
HTML
566 lines
34 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="Releases" href="releases.html" /><link rel="prev" title="Installation" href="installation.html" />
|
||
|
||
<meta name="generator" content="sphinx-4.3.2, furo 2022.01.02"/>
|
||
<title>Configuration - GravityMon v1.2.0</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/copybutton.css" />
|
||
<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 v1.2.0</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 centered" href="index.html">
|
||
|
||
<div class="sidebar-logo-container">
|
||
<img class="sidebar-logo" src="_static/gravitymon_logo.png" alt="Logo"/>
|
||
</div>
|
||
|
||
<span class="sidebar-brand-text">GravityMon v1.2.0</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="functionality.html">Functionality</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="intro.html">Getting started</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
||
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Configuration</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="hardware.html">Hardware</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="formula.html">Create formula</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="services.html">Service Integration</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced Configuration</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="api.html">REST API</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="data.html">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="license.html">Licence</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="q_and_a.html">Q & A</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="configuration">
|
||
<span id="setting-up-device"></span><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 <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>
|
||
<li><p>Placed in horizontal mode 85-90 degrees</p></li>
|
||
<li><p>Charger connected >4.15V (or the value that is configured). This does not work on the Floaty variant due to lack of hardware support.</p></li>
|
||
</ul>
|
||
<div class="section" id="status">
|
||
<h2>Status<a class="headerlink" href="#status" title="Permalink to this headline">¶</a></h2>
|
||
<p>URL: (<a class="reference external" href="http://gravmon.local">http://gravmon.local</a>)</p>
|
||
<a class="reference internal image-reference" href="_images/index.png"><img alt="Index page" src="_images/index.png" style="width: 800px;"/></a>
|
||
<p>Configuration is accessed by entering the URL for the device, this will be the mDNS name <em>device.local</em> or the IP address. 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>
|
||
<p>You can also view the average time a gravity measurement takes. Under optimal setting this should be around 1.5 - 2.0 seconds. If this is higher than 2 seconds this is most likely connected to slow wifi
|
||
connection. It will show 0 if data has not been collected yet.</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 address from there.</p>
|
||
</div>
|
||
<div class="admonition tip">
|
||
<p class="admonition-title">Tip</p>
|
||
<p>The button <cite>view error log</cite> will show the last error messages on the device. This can be useful for checking errors without
|
||
the need to connect to the serial port or to check what errors has occurred while in <cite>gravity mode</cite>. From v1.1 it will also detect
|
||
any abnormal restarts or crashes and record these in the logfile (this applies to esp8266 only).</p>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="id1">
|
||
<h2>Configuration<a class="headerlink" href="#id1" 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>
|
||
<a class="reference internal image-reference" href="_images/config1.png"><img alt="Device Settings" src="_images/config1.png" style="width: 800px;"/></a>
|
||
<ul class="simple">
|
||
<li><p><strong>Device name:</strong></p></li>
|
||
</ul>
|
||
<p>This is unique name for the device. It will be used in pushing data as well as mDNS name on the network (<name>.local).
|
||
The limitation is 63 chars but using long names might break endpoints that data is sent to if they have other limitations.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Temperature format:</strong></p></li>
|
||
</ul>
|
||
<p>Choose between Celsius and Fahrenheit when displaying temperature.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Interval:</strong></p></li>
|
||
</ul>
|
||
<p>This defines how long the device should be sleeping between the readings when in <cite>gravity monitoring</cite> mode. You will also see
|
||
the values in minutes/seconds to easier set the interval. 900s is a recommended interval. The sleep interval can
|
||
be set between 10 - 3600 seconds (60 minutes).</p>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>A low value such as 30s will give a lifespan of 1-2 weeks and 300s (5 min) would last for 3+ weeks. This assumes that
|
||
there is good wifi connection that takes less than 1s to reconnect. Poor wifi connection is the main reason for battery drain.
|
||
The device will show the estimated lifespan based on the average connection time, if no data exist it will not be shown.</p>
|
||
</div>
|
||
<ul class="simple">
|
||
<li><p><strong>Calibration values:</strong></p></li>
|
||
</ul>
|
||
<p>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.</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>
|
||
<div class="section" id="push-settings">
|
||
<h3>Push Settings<a class="headerlink" href="#push-settings" title="Permalink to this headline">¶</a></h3>
|
||
<a class="reference internal image-reference" href="_images/config2.png"><img alt="Push Settings" src="_images/config2.png" style="width: 800px;"/></a>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>When enabling SSL this will not validate the root CA of the remote service, this is a design decision based on two aspects. Enabling CA validation will take 3-4s extra on each connection which means way less
|
||
battery life, so the decision is to prioritize battery life over security. The data transmitted is not really that sensitive anyway so I believe this is a good balance.</p>
|
||
</div>
|
||
<ul class="simple">
|
||
<li><p><strong>HTTP 1 (POST):</strong></p></li>
|
||
</ul>
|
||
<p>Endpoint to send data via http. Default format used Format used <a class="reference internal" href="data.html#data-formats-ispindle"><span class="std std-ref">HTTP Post, iSpindle format</span></a>. You can customize the format using <a class="reference internal" href="advanced.html#format-editor"><span class="std std-ref">Format editor</span></a>.</p>
|
||
<p>If you add the prefix <cite>https://</cite> then the device will use SSL when sending data.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>HTTP 2 (POST):</strong></p></li>
|
||
</ul>
|
||
<p>Endpoint to send data via http. Default format used <a class="reference internal" href="data.html#data-formats-ispindle"><span class="std std-ref">HTTP Post, iSpindle format</span></a>. You can customize the format using <a class="reference internal" href="advanced.html#format-editor"><span class="std std-ref">Format editor</span></a>.</p>
|
||
<p>If you add the prefix <cite>https://</cite> then the device will use SSL when sending data.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Token:</strong></p></li>
|
||
</ul>
|
||
<p>The token is included in the iSpindle JSON format and will be used for both HTTP targets. If you
|
||
need to have 2 different tokens please use the <a class="reference internal" href="advanced.html#format-editor"><span class="std std-ref">Format editor</span></a> to customize the data format.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>HTTP 3 (GET):</strong></p></li>
|
||
</ul>
|
||
<p>Endpoint to send data via http. This is using an HTTP GET request instead of a post. This means that the values are appended to the URL like; <a class="reference external" href="http://endpoint?param=value&param2=value2">http://endpoint?param=value&param2=value2</a>. You can customize the format using <a class="reference internal" href="advanced.html#format-editor"><span class="std std-ref">Format editor</span></a>.</p>
|
||
<p>If you add the prefix <cite>https://</cite> then the device will use SSL when sending data.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Token 2:</strong></p></li>
|
||
</ul>
|
||
<p>The token is included in the default format for the HTTP GET url but can be used for any of the formats. For HTTP GET use can use this for an authorization token with for instance ubidots or blynk http api.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>HTTP Headers</strong></p></li>
|
||
</ul>
|
||
<a class="reference internal image-reference" href="_images/config-popup1.png"><img alt="HTTP Headers" src="_images/config-popup1.png" style="width: 300px;"/></a>
|
||
<p>You can define 2 http headers per push target. This is available via a pop-up window but don’t forget
|
||
to press the save buttons on the post section to save the values. One common header is content type which is the
|
||
default setting for http targets.</p>
|
||
<p>The input must have the format <strong>‘<header>: <value>’</strong> for it to work. The UI will accept any value so errors
|
||
will not show until the device tries to push data.</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Content</span><span class="o">-</span><span class="n">Type</span><span class="p">:</span> <span class="n">application</span><span class="o">/</span><span class="n">json</span>
|
||
<span class="n">X</span><span class="o">-</span><span class="n">Auth</span><span class="o">-</span><span class="n">Token</span><span class="p">:</span> <span class="o"><</span><span class="n">api</span><span class="o">-</span><span class="n">token</span><span class="o">></span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Mozilla has a good guide on what headers are valid; <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP Headers</a></p>
|
||
</div>
|
||
<div class="section" id="push-settings-2">
|
||
<h3>Push Settings (2)<a class="headerlink" href="#push-settings-2" title="Permalink to this headline">¶</a></h3>
|
||
<a class="reference internal image-reference" href="_images/config2b.png"><img alt="Push Settings" src="_images/config2b.png" style="width: 800px;"/></a>
|
||
<ul class="simple">
|
||
<li><p><strong>Influx DB v2 URL:</strong></p></li>
|
||
</ul>
|
||
<p>Endpoint to send data via http to InfluxDB. Format used <a class="reference internal" href="data.html#data-formats-influxdb2"><span class="std std-ref">HTTP Get</span></a>. You can customize the format using <a class="reference internal" href="advanced.html#format-editor"><span class="std std-ref">Format editor</span></a>.</p>
|
||
<p>SSL is not supported for this target. Raise a issue on github if this is wanted.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Influx DB v2 Organisation:</strong></p></li>
|
||
</ul>
|
||
<p>Name of organisation in Influx.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Influx DB v2 Bucket:</strong></p></li>
|
||
</ul>
|
||
<p>Token for bucket. Don’t use the bucket name.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Influx DB v2 Token:</strong></p></li>
|
||
</ul>
|
||
<p>Token with write access to bucket.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>MQTT server:</strong></p></li>
|
||
</ul>
|
||
<p>IP or name of server to send data to. Default format used <a class="reference internal" href="data.html#data-formats-mqtt"><span class="std std-ref">MQTT</span></a>. You can customize the format using <a class="reference internal" href="advanced.html#format-editor"><span class="std std-ref">Format editor</span></a>.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>MQTT Port:</strong></p></li>
|
||
</ul>
|
||
<p>Which port should be used for communication, default is 1883 (standard port). For SSL use 8883 (any port over 8000 is treated as SSL).</p>
|
||
<ul class="simple">
|
||
<li><p><strong>MQTT user:</strong></p></li>
|
||
</ul>
|
||
<p>Username or blank if anonymous is accepted</p>
|
||
<ul class="simple">
|
||
<li><p><strong>MQTT password:</strong></p></li>
|
||
</ul>
|
||
<p>Password or blank if anonymous is accepted</p>
|
||
</div>
|
||
<div class="section" id="gravity-settings">
|
||
<h3>Gravity Settings<a class="headerlink" href="#gravity-settings" title="Permalink to this headline">¶</a></h3>
|
||
<a class="reference internal image-reference" href="_images/config3.png"><img alt="Gravity Settings" src="_images/config3.png" style="width: 800px;"/></a>
|
||
<ul class="simple">
|
||
<li><p><strong>Gravity format:</strong></p></li>
|
||
</ul>
|
||
<p>Gravity format can be either <cite>SG</cite> or <cite>Plato</cite>. The device will use SG Internally and convert to Plato when displaying or sending data.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Gravity formula:</strong></p></li>
|
||
</ul>
|
||
<p>Gravity formula is compatible with standard iSpindle formulas so any existing calculation option can be used. You can also use
|
||
the feature to create the formula by supplying the raw data. See <a class="reference internal" href="formula.html#create-formula"><span class="std std-ref">Create formula</span></a></p>
|
||
<p>The gravity formula accepts to parameters, <strong>tilt</strong> for the angle or <strong>temp</strong> for temperature (temperature inserted into the formula
|
||
will be in celsius). I would recommend to use the formula calculation feature instead since this is much easier.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Temperature correct gravity:</strong></p></li>
|
||
</ul>
|
||
<p>Will apply a temperature calibration formula to the gravity as a second step after gravity has been calculated. It’s also possible to
|
||
build this into the gravity formula.</p>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">Warning</p>
|
||
<p>This formula assumes that the calibration has been done at 20°C / 68°F.</p>
|
||
<p>Formula used in temperature correction. The calibration temperature can be changed under advanced settings.</p>
|
||
</div>
|
||
<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>
|
||
<div class="section" id="hardware-settings">
|
||
<h3>Hardware Settings<a class="headerlink" href="#hardware-settings" title="Permalink to this headline">¶</a></h3>
|
||
<a class="reference internal image-reference" href="_images/config4.png"><img alt="Hardware Settings" src="_images/config4.png" style="width: 800px;"/></a>
|
||
<ul class="simple">
|
||
<li><p><strong>Voltage factor:</strong></p></li>
|
||
</ul>
|
||
<p>Factor used to calculate the battery voltage. If you get a too low/high voltage you can adjust this value.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Config voltage:</strong></p></li>
|
||
</ul>
|
||
<p>Defines the level of voltage when the device should enter config mode due to charging. This might vary between different battery manufacturers.
|
||
If you don’t what the device to go into configuration mode when charging, set this to 6V. This was added since different batteries have different
|
||
voltages when fully charged.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Temperature correction:</strong></p></li>
|
||
</ul>
|
||
<p>This value will be added to the temperature reading (negative value will reduce temperature reading). This is applied
|
||
when the device starts. So changing this will not take affect until the device is restarted.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Gyro Temperature:</strong></p></li>
|
||
</ul>
|
||
<p>Enable this feature will use the temp sensor i the gyro instead of the DS18B20, the benefit is shorter run time and
|
||
longer battery life (this is an experimental feature). The value used is the first temperature reading from when the
|
||
device is activated, since the gyro should be cool this is reflecting the surrounding temperature. After it has
|
||
been running the value would be totally off.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Enable storage mode when placed on cap</strong></p></li>
|
||
</ul>
|
||
<p>When place on the cap (<5 degree tilt) the device will go into deep sleep forever (until reset). In order to wake it
|
||
up you need to do a reset. One option is to attach a magnetic reed switch (default open) to the reset pin and use a
|
||
magnet to force a reset without opening the tube. The reed switch is typically an electronic component of 14 mm
|
||
long encapsulated in a small glass tube. See hardware section for more information, <a class="reference internal" href="hardware.html#hardware"><span class="std std-ref">Hardware</span></a>.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Bluetooth: (Only ESP32)</strong></p></li>
|
||
</ul>
|
||
<p>If the build is using an ESP32 then you can send data over BLE, simulating a Tilt device. Choose the color that you want the device to simulate.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>OTA URL:</strong></p></li>
|
||
</ul>
|
||
<p>Should point to a URL where the firmware.bin file + version.json file are located. For an ESP32 target the firmware should be named firmware32.bin.</p>
|
||
<p>For the OTA to work, place the following files (version.json + firmware.bin) at the location that you pointed out in OTA URL. If the version number in the json file is newer than in the
|
||
code the update will be done during startup.</p>
|
||
<p>If you have the previx <cite>https://</cite> then the device will use secure transfer without CA validation.</p>
|
||
<p>Example; OTA URL (don’t forget trailing dash), the name of the file should be firmware.bin</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="mf">192.168.1.1</span><span class="o">/</span><span class="n">firmware</span><span class="o">/</span><span class="n">gravmon</span><span class="o">/</span>
|
||
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="mf">192.168.1.1</span><span class="o">/</span><span class="n">firmware</span><span class="o">/</span><span class="n">gravmon</span><span class="o">/</span>
|
||
</pre></div>
|
||
</div>
|
||
<ul class="simple">
|
||
<li><p><strong>Upload Firmware</strong></p></li>
|
||
</ul>
|
||
<p>This option gives you the possibility to install an new version of the firmware (or any firmware that uses the standard flash layout).</p>
|
||
<a class="reference internal image-reference" href="_images/firmware.png"><img alt="Update firmware" src="_images/firmware.png" style="width: 600px;"/></a>
|
||
</div>
|
||
<div class="section" id="advanced-settings">
|
||
<h3>Advanced Settings<a class="headerlink" href="#advanced-settings" title="Permalink to this headline">¶</a></h3>
|
||
<a class="reference internal image-reference" href="_images/config5.png"><img alt="Advanced Settings" src="_images/config5.png" style="width: 800px;"/></a>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">Warning</p>
|
||
<p>Change these parameters with caution. The wrong values might cause the device to become unresponsive.</p>
|
||
</div>
|
||
<ul class="simple">
|
||
<li><p><strong>Gyro reads:</strong></p></li>
|
||
</ul>
|
||
<p>This defines how many gyro reads will be done before an angle is calculated. More reads will give better accuracy and also allow detection of
|
||
movement. Too many reads will take time and affect battery life. 50 takes about 800 ms to execute.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Gyro moving threshold:</strong></p></li>
|
||
</ul>
|
||
<p>This is the max amount of deviation allowed for a stable reading.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Formula deviation:</strong></p></li>
|
||
</ul>
|
||
<p>This is the maximum deviation on the formula allowed for it to be accepted. Once the formula has been derived it will be validated against the supplied
|
||
data and of the deviation on any point is bigger the formula will be rejected.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Ignore angles below water:</strong></p></li>
|
||
</ul>
|
||
<p>If this option is checked any angles below that of SG 1 will be discarded as invalid and never sent to any server. Default = off.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Gravity calibration temp</strong></p></li>
|
||
</ul>
|
||
<p>This option allows you to set the correction temperature used in the automatic temperature gravity adjustment formula. Standard is 20C.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>DS18B20 Resolution:</strong></p></li>
|
||
</ul>
|
||
<p>Define the resolution used on the temp sensor. 9 bits is default and will give an accuracy of 0.5C, 12 bits will give an accuracy of 0.0625C but will also
|
||
take longer time to measure..</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Wifi connect timeout:</strong></p></li>
|
||
</ul>
|
||
<p>This is the amount of time allowed for a wifi connect.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Wifi portal timeout:</strong></p></li>
|
||
</ul>
|
||
<p>If the wifi portal is triggered (can be triggered by reset) then this is the amount of time allowed before it exists again.</p>
|
||
<ul class="simple">
|
||
<li><p><strong>Skip Interval (…):</strong></p></li>
|
||
</ul>
|
||
<p>These options allow the user to have variable push intervals for the different endpoints. 0 means that every wakeup will send data to that endpoint. If you enter another number then that defines how many sleep cycles will be skipped.</p>
|
||
<p>If the sleep interval is 300s and MQTT is set to 0 and HTTP1 is set to 2 then MQTT will be sent every 300s while HTTP1 would be sent 900s. This is great if you want to send data to a local mqtt server often but brewfather will only
|
||
accept data every 15 min.</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</article>
|
||
</div>
|
||
<footer>
|
||
|
||
<div class="related-pages">
|
||
<a class="next-page" href="releases.html">
|
||
<div class="page-info">
|
||
<div class="context">
|
||
<span>Next</span>
|
||
</div>
|
||
<div class="title">Releases</div>
|
||
</div>
|
||
<svg><use href="#svg-arrow-right"></use></svg>
|
||
</a>
|
||
<a class="prev-page" href="installation.html">
|
||
<svg><use href="#svg-arrow-right"></use></svg>
|
||
<div class="page-info">
|
||
<div class="context">
|
||
<span>Previous</span>
|
||
</div>
|
||
|
||
<div class="title">Installation</div>
|
||
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="related-information">
|
||
Copyright © 2021-2023, 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="#">Configuration</a><ul>
|
||
<li><a class="reference internal" href="#status">Status</a></li>
|
||
<li><a class="reference internal" href="#id1">Configuration</a><ul>
|
||
<li><a class="reference internal" href="#device-setting">Device Setting</a></li>
|
||
<li><a class="reference internal" href="#push-settings">Push Settings</a></li>
|
||
<li><a class="reference internal" href="#push-settings-2">Push Settings (2)</a></li>
|
||
<li><a class="reference internal" href="#gravity-settings">Gravity Settings</a></li>
|
||
<li><a class="reference internal" href="#hardware-settings">Hardware Settings</a></li>
|
||
<li><a class="reference internal" href="#advanced-settings">Advanced Settings</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>
|
||
<script src="_static/clipboard.min.js"></script>
|
||
<script src="_static/copybutton.js"></script>
|
||
</body>
|
||
</html> |