Files
AI-on-the-edge-device-docs/Error-Debugging/index.html
2023-03-02 13:46:52 +00:00

295 lines
16 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><link rel="canonical" href="https://jomjol.github.io/AI-on-the-edge-device-docs/Error-Debugging/" />
<link rel="shortcut icon" href="../img/favicon.ico" />
<title>Error Debugging - AI on the Edge Device</title>
<link rel="stylesheet" href="../css/theme.css" />
<link rel="stylesheet" href="../css/theme_extra.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
<script>
// Current page data
var mkdocs_page_name = "Error Debugging";
var mkdocs_page_input_path = "Error-Debugging.md";
var mkdocs_page_url = "/AI-on-the-edge-device-docs/Error-Debugging/";
</script>
<script src="../js/jquery-3.6.0.min.js" defer></script>
<!--[if lt IE 9]>
<script src="../js/html5shiv.min.js"></script>
<![endif]-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<img src=https://jomjol.github.io/AI-on-the-edge-device-docs//img/logo.png>
<a href=".." class="icon icon-home"> AI on the Edge Device
</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" title="Type search term here" />
</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">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="..">Welcome</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Installation/">Installation</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../initial-setup/">Initial Setup</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Hardware-Compatibility/">Hardware Compatibility</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Best-Practice/">Best Practice</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../FAQs/">Frequently Asked Questions</a>
</li>
</ul>
<p class="caption"><span class="caption-text">External Links</span></p>
<ul>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/releases">Releases</a>
</li>
<li class="toctree-l1"><a class="" href="https://jomjol.github.io/AI-on-the-edge-device/index.html">Web Installer/Console</a>
</li>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/issues">Place an Issue</a>
</li>
<li class="toctree-l1"><a class="" href="https://github.com/jomjol/AI-on-the-edge-device/discussions">Join a Discussion</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Configuration</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Reference-Image/">Reference Image</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Alignment/">Alignment References</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ROI-Configuration/">ROIs (Regions of Interest)</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Configuration/">Graphical Configuration</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Choosing-the-Model/">Model Selection</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../ota/">Over-The-Air (OTA) Update</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Advanced</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Parameters/">Parameters</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Integration-Home-Assistant/">Integration into Home Assistant</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../External-LED/">External LED</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../data-logging/">Data Logging</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../rolling-installation/">Living on the Edge</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Watermeter-specific-analog---digital-transition/">Analog/Digital Transition on Water Meters</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../collect-new-images/">Collect images to improve the models</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Learn-models-with-your-own-images/">Learn a model with your own images</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Correction%20Algorithm/">Correction Algorithm</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Neural-Network-Types/">Neural Network Types</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Additional-Information/">Additional Information</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../New-Releases-Notification/">Notification about new Releases</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Troubleshooting</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../Error-Codes/">Error Codes</a>
</li>
<li class="toctree-l1 current"><a class="reference internal current" href="./">Error Debugging</a>
<ul class="current">
<li class="toctree-l2"><a class="reference internal" href="#rebooting">Rebooting</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#general-remark">General Remark</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#getting-deeper-inside">Getting deeper inside</a>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#often-observed-problems">Often observed problems</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#hardware-failure">Hardware failure</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#roi-misaligned">ROI misaligned</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#my-analog-meter-are-recognized-as-digital-counter-or-vice-versa">My Analog Meter are recognized as Digital Counter or vice versa</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#recognition-is-working-well-but-number-arent-sorted-correctly">Recognition is working well, but number aren't sorted correctly</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Frequent-Reboots/">Frequent Reboots</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Demo-Mode/">Demo Mode</a>
</li>
</ul>
<p class="caption"><span class="caption-text">API's</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../REST-API/">REST API</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../MQTT-API/">MQTT API</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Influx-DB/">Influx DB</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Build-Instructions/">Build the Project</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Upload-files-by-script/">Scripted File Upload</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Testing/">Testing</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Release-creation/">Preparing for Release</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Old Pages (no longer maintained)</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../outdated--Integrated-Functions/">Integrated Functions</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Assorted Pages</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../StatusLED-BlinkCodes/">StatusLED BlinkCodes</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">AI on the Edge Device</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href=".." class="icon icon-home" alt="Docs"></a> &raquo;</li>
<li>Troubleshooting &raquo;</li>
<li>Error Debugging</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs/edit/main/docs/Error-Debugging.md" class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="section" itemprop="articleBody">
<h1 id="error-debugging">Error Debugging</h1>
<h2 id="rebooting">Rebooting</h2>
<h5 id="general-remark">General Remark</h5>
<ol>
<li>
<p>Due to the rather complex code with a lot of external libraries and the limited availability of memory a reboot of the device from time to time is "normal". Background are memory leakages and therefore running out of free memory. </p>
</li>
<li>
<p>The hardware of the ESP32CAM has a varying quality. I have one and the same hardware with a reboot range from every 5 detection runs to up to 250 detection runs. </p>
</li>
</ol>
<h5 id="getting-deeper-inside">Getting deeper inside</h5>
<p>Have a look into the log file (<code>/log/message/...</code>). </p>
<ul>
<li>If the log file is very short you need to enable a enhanced logging in the <code>config.ini</code> (Debug --&gt; <code>logfile = true</code>) . </li>
</ul>
<p>Analyze the debugging output of the serial interface</p>
<ul>
<li>Connect a serial to USB interface (like for flashing) and make a logging of the serial communication</li>
<li>There are a lot more intermediate information and the lines before the reboot tell you, where the firmware fails</li>
</ul>
<p><strong>If you make an issue about this, please post these two information additionally</strong> </p>
<p><strong>Don't forget to remove your WLAN password in the serial log</strong></p>
<h2 id="often-observed-problems">Often observed problems</h2>
<h3 id="hardware-failure">Hardware failure</h3>
<ul>
<li>Camera not working --&gt; check the interface, test another module</li>
<li>Low cost module with only 2MB of PSRAM instead of 4MB --&gt; image taking will fail first. This will never work due to too low memory</li>
</ul>
<h3 id="roi-misaligned">ROI misaligned</h3>
<p><img src="https://user-images.githubusercontent.com/108122193/188264361-0f5038ce-d827-4096-93fb-5907d3b072b4.png" width=30% height=30%></p>
<p>This typically happens if you have suboptimal "Alignment Marks". A very simple and working solution is to put put higly contrasted stickers on your meter and put "Alignment Marks" on it (see picture below)</p>
<p><img src="https://user-images.githubusercontent.com/108122193/188264752-c0f2a2be-0c22-40de-afaf-fd55b2eb4182.png" width=30% height=30%></p>
<p>If after those adjustment you still have some issues, you can try to adjust your alignment settings in expert mode:
<img src="https://user-images.githubusercontent.com/108122193/188382213-68c4a015-6582-4911-81bc-cdce8ef60ed2.png" width=75% height=75%></p>
<h3 id="my-analog-meter-are-recognized-as-digital-counter-or-vice-versa">My Analog Meter are recognized as Digital Counter or vice versa</h3>
<p><img src="https://user-images.githubusercontent.com/108122193/188265470-001a392f-d1f4-46a3-b1e8-f29ec41c8621.png" width=40% height=40%></p>
<ol>
<li>First, check that your ROI are correctly defined (yey!)</li>
<li>Second, verify that the name of your ROI analog and digital ROIs are different </li>
</ol>
<h3 id="recognition-is-working-well-but-number-arent-sorted-correctly">Recognition is working well, but number aren't sorted correctly</h3>
<p>You have to sort your ROI correctly (Bigger to smaller). Select your ROI and click either "move next" or "move previous". Repeat until your ROI are correctly sorted</p>
<p><img src="https://user-images.githubusercontent.com/108122193/188264916-03befff1-4e61-4370-bd5a-9168a88c57f2.png" width=50% height=50%></p>
</div>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../Error-Codes/" class="btn btn-neutral float-left" title="Error Codes"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../Frequent-Reboots/" class="btn btn-neutral float-right" title="Frequent Reboots">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="https://www.mkdocs.org/">MkDocs</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>
<div class="rst-versions" role="note" aria-label="Versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span>
<a href="https://github.com/jomjol/AI-on-the-edge-device-docs" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
</span>
<span><a href="../Error-Codes/" style="color: #fcfcfc">&laquo; Previous</a></span>
<span><a href="../Frequent-Reboots/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '..';</script>
<script src="../js/theme_extra.js" defer></script>
<script src="../js/theme.js" defer></script>
<script src="../search/main.js" defer></script>
<script defer>
window.onload = function () {
SphinxRtdTheme.Navigation.enable(true);
};
</script>
</body>
</html>