Merge branch 'rolling'

# Conflicts:
#	Changelog.md
#	code/components/jomjol_helper/Helper.cpp
#	code/components/jomjol_helper/Helper.h
#	sd-card/html/edit_config_param.html
#	sd-card/html/readconfigparam.js
This commit is contained in:
CaCO3
2023-02-24 20:19:45 +01:00
43 changed files with 941 additions and 307 deletions

View File

@@ -121,9 +121,15 @@ function fetchFiles(urls, filesData, index, retry, zipFilename) {
else if (retry == 1) { // longer timeout
xhr.timeout = 5000; // time in milliseconds
}
else { // very long timeout
else if (retry == 2) { // longer timeout
xhr.timeout = 20000; // time in milliseconds
}
else if (retry == 3) { // longer timeout
xhr.timeout = 30000; // time in milliseconds
}
else { // very long timeout
xhr.timeout = 60000; // time in milliseconds
}
xhr.onload = () => { // Request finished
//console.log(url + " done");

View File

@@ -1,7 +1,7 @@
/* The UI can also be run locally, but you have to set the IP of your devide accordingly.
* And you also might have to disable CORS in your webbrowser! */
var domainname_for_testing = "192.168.178.44";
var domainname_for_testing = "192.168.178.62";

View File

@@ -2,7 +2,7 @@
<html>
<head>
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Make Alignment</title>
<title>Alignment Marks</title>
<meta charset="utf-8"/>
<style>
@@ -48,7 +48,11 @@ select {
<body style="font-family: arial; padding: 0px 10px;">
<h2>Define Alignment Structure in Reference Image</h2>
<h2>Alignment Marks</h2>
<p>On this page you define two Reference Marks.
See <a href=https://jomjol.github.io/AI-on-the-edge-device-docs/Alignment/ target=_blank>https://jomjol.github.io/AI-on-the-edge-device-docs/Alignment/</a> for explanations.</p>
<p>After saving the Reference Marks, you can define the <a href=edit_digits.html>digit</a> resp. <a href=edit_analog.html>analog</a> ROI's.<br>
Only after those steps a reboot is required.</p>
<table>
<tr>
@@ -88,11 +92,9 @@ select {
<table>
<tr>
<td><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save"></td>
<td><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save">
<p>Proceed to update the <a href=edit_digits.html>digit</a> resp. <a href=edit_analog.html>analog</a> ROI's when you are done.</p></td>
</tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button></td>
</tr>
</table>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
@@ -131,7 +133,7 @@ function SaveToConfig(){
WriteConfigININew();
UpdateConfigReference(domainname)
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
firework.launch('Configuration got updated. It will get applied after the next reboot!', 'success', 5000);
}
function EnhanceContrast(){

View File

@@ -3,7 +3,7 @@
<head>
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<meta charset="utf-8"/>
<title>Make Analog Alignment</title>
<title>Analog ROI's</title>
<style>
h1 {font-size: 2em;}
@@ -67,10 +67,12 @@ th, td {
<body style="font-family: arial; padding: 0px 10px;">
<h2><input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'EnDisableAnalog()' checked >
Edit Analog</h2>
<h2>Analog ROI's</h2>
<p>On this page you define ROI's for the analog counters.
See <a href=https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/ target=_blank>https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/</a> for explanations.</p>
<input type="checkbox" id="Category_Analog_enabled" value="1" onclick = 'EnDisableAnalog()' checked ><label for="Category_Analog_enabled">Enable Analog ROI's</label></p>
<div id="div1">
<table>
<tr>
@@ -134,10 +136,10 @@ th, td {
<table>
<tr>
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save" tabindex=9></td>
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save" tabindex=9>
</tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button></td>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate the changes</button></td>
</tr>
</table>
@@ -290,7 +292,7 @@ function SaveToConfig(){
cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
WriteConfigININew();
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
firework.launch('Configuration got updated. It will get applied after the next reboot!', 'success', 5000);
}

View File

@@ -63,7 +63,7 @@ function saveTextAsFile()
FileDeleteOnServer("/config/config.ini", domainname);
var textToSave = document.getElementById("inputTextToSave").value;
FileSendContent(textToSave, "/config/config.ini", domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
firework.launch('Configuration got updated. It will get applied after the next reboot!', 'success', 5000);
}
}

View File

@@ -160,8 +160,9 @@ textarea {
<input type="number" id="TakeImage_ImageQuality_value1" size="13" min="0" max="63">
</td>
<td class="description">
Quality index for picture (default = "12" - "0" high ... "63" low) <br>
Remark: values smaller than 12 can result in a reboot, as the bigger sized JPEG might not fit in the available RAM!
Image quality index (default = 12) <br>
Input range: 8 [highest quality] ... 63 [lowest quality] <br>
Remark: Value < 12 could result in system instabilities!
</td>
</tr>
<tr class="expert" id="ex3">
@@ -200,7 +201,8 @@ textarea {
<input type="number" id="TakeImage_Brightness_value1" size="13" min="-2" max="2">
</td>
<td style="font-size: 80%;">
Image Brightness (-2 .. 2 - default = "0")
Image brightness (default = 0) <br>
Input range: -2 ... 2
</td>
</tr>
@@ -212,8 +214,8 @@ textarea {
<input type="number" id="TakeImage_Contrast_value1" size="13" min="-2" max="2">
</td>
<td style="font-size: 80%;">
Image Contrast (-2 .. 2 - default = "0") <br>
Remark: camera driver is not fully supporting this setting yet (no impact on image)
Image contrast (default = 0) <br>
Input range: -2 ... 2
</td>
</tr>
@@ -225,8 +227,8 @@ textarea {
<input type="number" id="TakeImage_Saturation_value1" size="13" min="-2" max="2">
</td>
<td style="font-size: 80%;">
Image Saturation (-2 .. 2 - default = "0") <br>
Remark: camera driver is not fully supporting this setting yet (no impact on image)
Image saturation (default = 0) <br>
Input range: -2 ... 2
</td>
</tr>
@@ -281,6 +283,7 @@ textarea {
<option value="default" selected>Default</option>
<option value="highAccuracy" >HighAccuracy</option>
<option value="fast" >Fast</option>
<option value="off" >Off</option><!-- add disable aligment algo |01.2023 -->
</select>
</td>
<td style="font-size: 80%;">
@@ -721,7 +724,7 @@ textarea {
<td colspan="3" style="padding-left: 20px;">
<h4>
<input type="checkbox" id="Category_InfluxDB_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
<label for=Category_InfluxDB_enabled>InfluxDB</h4><h5>Only InfluxDB v1.x is supported as of now</h5></label>
<label for=Category_InfluxDB_enabled>InfluxDB</h4><h5>Only InfluxDB v1.x is supported as of now</h5></label>
</td>
</tr>
<tr>
@@ -788,6 +791,97 @@ textarea {
<tr>
<td colspan="3" style="padding-left: 20px;">
<h4>
<input type="checkbox" id="Category_InfluxDBv2_enabled" value="1" onclick = 'UpdateAfterCategoryCheck()' unchecked >
<label for=Category_InfluxDBv2_enabled>InfluxDBv2</h4><h5>Only InfluxDB v2.x is configured here, v1.x see above [InfluxDB]</h5></label>
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="InfluxDBv2_Uri_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Uri")' unchecked >
<label for=InfluxDBv2_Uri_enabled><class id="InfluxDBv2_Uri_text" style="color:black;">Uri</class></label>
</td>
<td>
<input type="text" id="InfluxDBv2_Uri_value1">
</td>
<td style="font-size: 80%;">
URI of the HTTP interface to InfluxDB (Version2), without traililing slash, e.g. http://IP-Address:Port
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="InfluxDBv2_Database_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Database")' unchecked >
<label for=InfluxDBv2_Database_enabled><class id="InfluxDBv2_Database_text" style="color:black;">Database</class></label>
</td>
<td>
<input type="text" id="InfluxDBv2_Database_value1">
</td>
<td style="font-size: 80%;">
Database name in which to publish the read value.
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="InfluxDBv2_Measurement_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Measurement")' unchecked >
<label for=InfluxDBv2_Measurement_enabled><class id="InfluxDBv2_Measurement_text" style="color:black;">Measurement</class></label>
</td>
<td>
<input type="text" id="InfluxDBv2_Measurement_value1">
</td>
<td style="font-size: 80%;">
Measurement name to use to publish the read value.
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="InfluxDBv2_Org_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Org")' unchecked >
<label for=InfluxDBv2_Org_enabled><class id="InfluxDBv2_Org_text" style="color:black;">Org</class></label>
</td>
<td>
<input type="text" id="InfluxDBv2_Org_value1">
</td>
<td style="font-size: 80%;">
Organisation (Org) for InfluxDBv2 authentication
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="InfluxDBv2_Token_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Token")' unchecked >
<label for=InfluxDBv2_Token_enabled><class id="InfluxDBv2_Token_text" style="color:black;">Token</class></label>
</td>
<td>
<input type="text" id="InfluxDBv2_Token_value1">
</td>
<td style="font-size: 80%;">
Token for InfluxDB authentication
</td>
</tr>
<tr>
<td class="indent1" colspan="3">
<br>
<b>Postprocessing Individual Parameters:
<select id="NumbersInfluxDB_value1" onchange="numberInfluxDBChanged()">
<option value="0" selected>default</option>
<option value="1" >NT</option>
<option value="2" >HT</option>
</select></b>
</td>
</tr>
<tr>
<td class="indent1" style="padding-left: 75px;">
<input type="checkbox" id="InfluxDBv2_Fieldname_enabled" value="1" onclick = 'InvertEnableItem("InfluxDBv2", "Fieldname")' unchecked >
<label for=InfluxDBv2_Fieldname_enabled><class id="InfluxDBv2_Fieldname_text" style="color:black;">Fieldname</class></label>
</td>
<td>
<input type="text" id="InfluxDBv2_Fieldname_value1">
</td>
<td style="font-size: 80%;">
Fieldname to use for saving.
</td>
</tr>
<tr>
<td colspan="3" style="padding-left: 20px;">
<h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='UpdateAfterCategoryCheck()' unchecked >
@@ -1487,7 +1581,8 @@ function LoadConfigNeu() {
InitIndivParameter();
UpdateInput();
UpdateInputIndividual();
var sel = document.getElementById("Numbers_value1");
UpdateInputIndividual(sel);
UpdateExpertModus();
document.getElementById("divall").style.display = '';
}
@@ -1499,15 +1594,18 @@ function InitIndivParameter()
var _index = document.getElementById("Numbers_value1");
while (_index.length)
_index.remove(0);
var _indexInflux = document.getElementById("NumbersInfluxDB_value1");
while (_indexInflux.length)
_indexInflux.remove(0);
for (var i = 0; i < NUMBERS.length; ++i){
var option = document.createElement("option");
option.text = NUMBERS[i]["name"];
option.value = i;
_index.add(option);
var optionInflux = document.createElement("option");
optionInflux.text = NUMBERS[i]["name"];
optionInflux.value = i;
_indexInflux.add(optionInflux);
}
_index.selectedIndex = 0;
_indexInflux.selectedIndex = 0;
}
@@ -1798,30 +1896,30 @@ function ReadParameter(_param, _cat, _name, _optional, _number = -1){
}
}
function UpdateInputIndividual()
function UpdateInputIndividual(sel)
{
if (NUNBERSAkt != -1)
{
ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt)
ReadParameter(param, "InfluxDBv2", "Fieldname", true, NUNBERSAkt)
}
var sel = document.getElementById("Numbers_value1");
// var sel = document.getElementById("Numbers_value1");
NUNBERSAkt = sel.selectedIndex;
WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt);
WriteParameter(param, category, "InfluxDBv2", "Fieldname", true, NUNBERSAkt);
}
function UpdateInput() {
@@ -1830,6 +1928,7 @@ function UpdateInput() {
document.getElementById("Category_MQTT_enabled").checked = category["MQTT"]["enabled"];
document.getElementById("Category_GPIO_enabled").checked = category["GPIO"]["enabled"];
document.getElementById("Category_InfluxDB_enabled").checked = category["InfluxDB"]["enabled"];
document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"];
setVisible("GPIO_item", category["GPIO"]["enabled"]);
WriteParameter(param, category, "TakeImage", "RawImagesLocation", true);
@@ -1876,6 +1975,13 @@ function UpdateInput() {
WriteParameter(param, category, "InfluxDB", "user", true);
WriteParameter(param, category, "InfluxDB", "password", true);
WriteParameter(param, category, "InfluxDBv2", "Uri", true);
WriteParameter(param, category, "InfluxDBv2", "Database", true);
WriteParameter(param, category, "InfluxDBv2", "Measurement", true);
WriteParameter(param, category, "InfluxDBv2", "Org", true);
WriteParameter(param, category, "InfluxDBv2", "Token", true);
WriteParameter(param, category, "InfluxDBv2", "Fieldname", true);
WriteParameter(param, category, "GPIO", "IO0", true);
WriteParameter(param, category, "GPIO", "IO1", true);
WriteParameter(param, category, "GPIO", "IO3", true);
@@ -1951,6 +2057,7 @@ function ReadParameterAll()
category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
ReadParameter(param, "TakeImage", "RawImagesLocation", true);
@@ -1978,8 +2085,8 @@ function ReadParameterAll()
ReadParameter(param, "Analog", "ROIImagesLocation", true);
ReadParameter(param, "Analog", "ROIImagesRetention", true);
ReadParameter(param, "PostProcessing", "PreValueUse", false);
ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
ReadParameter(param, "PostProcessing", "PreValueUse", false);
ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
ReadParameter(param, "PostProcessing", "ErrorMessage", false);
ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false);
@@ -1998,6 +2105,13 @@ function ReadParameterAll()
ReadParameter(param, "InfluxDB", "user", true);
ReadParameter(param, "InfluxDB", "password", true);
ReadParameter(param, "InfluxDBv2", "Uri", true);
ReadParameter(param, "InfluxDBv2", "Database", true);
ReadParameter(param, "InfluxDBv2", "Measurement", true);
ReadParameter(param, "InfluxDBv2", "Org", true);
ReadParameter(param, "InfluxDBv2", "Token", true);
// ReadParameter(param, "InfluxDB", "Fieldname", true);
ReadParameter(param, "GPIO", "IO0", true);
ReadParameter(param, "GPIO", "IO1", true);
ReadParameter(param, "GPIO", "IO3", true);
@@ -2029,7 +2143,8 @@ function ReadParameterAll()
ReadParameter(param, "System", "TimeServer", true);
ReadParameter(param, "System", "RSSIThreshold", true);
UpdateInputIndividual();
var sel = document.getElementById("Numbers_value1");
UpdateInputIndividual(sel);
// FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
}
@@ -2049,10 +2164,12 @@ function UpdateAfterCategoryCheck() {
category["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked;
category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked;
category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked;
category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
UpdateInput();
UpdateInputIndividual();
var sel = document.getElementById("Numbers_value1");
UpdateInputIndividual(sel);
}
function UpdateExpertModus()
@@ -2103,7 +2220,7 @@ function saveTextAsFile()
ReadParameterAll();
WriteConfigININew();
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
firework.launch('Configuration got updated. It will get applied after the next reboot!', 'success', 5000);
}
}
@@ -2129,7 +2246,24 @@ function editConfigDirect() {
function numberChanged()
{
UpdateInputIndividual();
var sel = document.getElementById("Numbers_value1");
_neu = sel.selectedIndex;
UpdateInputIndividual(sel);
var _selInflux = document.getElementById("NumbersInfluxDB_value1");
if (_selInflux.selectedIndex != _neu)
_selInflux.selectedIndex = _neu
}
function numberInfluxDBChanged()
{
var sel = document.getElementById("NumbersInfluxDB_value1");
_neu = sel.selectedIndex;
UpdateInputIndividual(sel);
var _sel2 = document.getElementById("Numbers_value1");
if (_sel2.selectedIndex != _neu)
_sel2.selectedIndex = _neu
}
LoadConfigNeu();

View File

@@ -3,7 +3,7 @@
<head>
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<meta charset="utf-8"/>
<title>Make Digital Alignment</title>
<title>Digit ROI's</title>
<style>
h1 {font-size: 2em;}
@@ -58,8 +58,15 @@ th, td {
<body style="font-family: arial; padding: 0px 10px;">
<h2><input type="checkbox" id="Category_Digits_enabled" value="1" onclick = 'EnDisableDigits()' checked >
Edit Digits</h2>
<h2>Digit ROI's</h2>
<p>On this page you define ROI's for the digits.
See <a href=https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/ target=_blank>https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/</a> for explanations.</p>
<p><input type="checkbox" id="Category_Digits_enabled" value="1" onclick = 'EnDisableDigits()' checked><label for="Category_Digits_enabled">Enable Digit ROI's</label></p>
<p>After saving the digit ROI's, you can define the <a href=edit_analog.html>analog</a> ROI's if your meter has analog counters.<br>
Only after those steps a reboot is required.</p>
<div id="div1">
@@ -126,11 +133,9 @@ th, td {
<table>
<tr>
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save" tabindex=10></td>
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save" tabindex=10>
<p>Proceed to update the <a href=edit_analog.html>analog</a> ROI's when you are done or <a href=reboot_page.html>reboot</a> if there are no analogue counters.</p></td>
</tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate changes</button></td>
</tr>
</table>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
@@ -291,7 +296,7 @@ function SaveToConfig(){
cofcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
WriteConfigININew();
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
firework.launch('Configuration got updated. It will get applied after the next reboot!', 'success', 5000);
}

View File

@@ -28,12 +28,12 @@ p {font-size: 1em;}
<p>
This is the first time you started the digitizer after the initial installation. You have been automatically routed to the <b>initial setup procedure</b>.
Here you adjust the settings for your counter within five steps. In the final step the inital setup will be disabled and it will restart to the normal mode.
All settings will also be accessible there.
<br>
<br>
You can navigate forward and backward during the setup with the buttons "Next" and "Previous".<br><br>
<span color=red>Do not forget to save in each step!</span><br>
Here you adjust the settings for your meter within five steps. In the final step the inital setup will be disabled and it will restart to the normal mode.
All settings will also be accessible there. See <a href=https://jomjol.github.io/AI-on-the-edge-device-docs/initial-setup target=_blank>
https://jomjol.github.io/AI-on-the-edge-device-docs/initial-setup</a> for additional explanations.</p>
</p>
<p>You can navigate forward and backward during the setup with the buttons "Next" and "Previous".<br><br>
<span color=red>Do not forget to save in each step before heading to another step!</span><br>
</p>
<p>
This is an overview over the five steps:
@@ -41,26 +41,27 @@ p {font-size: 1em;}
<p>
<ol>
<li>Create reference image <br>
Base for the position referencing and the identification of the digits and counters.</li>
<li>Define two unique references <br>
Used to align the individual camera shot and identify the absolut positions</li>
<li>Define the digits <br>
Digital digits to be recognized</li>
<li>Define the analog counters <br>
Analog counters to be identified</li>
<li>General settings <br>
Most settings can be used with default value at the beginning. MQTT connection can be specified here</li>
<li><p>Create the <b>Reference Image</b>.<br>
It is the base for the position referencing and the identification of the digits and counters.</p></li>
<li><p>Define two unique <b>Reference Marks</b>.<br>
They is used to align the individual camera images and identify the absolut positions.</p></li>
<li></p>Define <b>ROI's</b> for the <b>Digits</b>.<br>
They will be used to digitize the digit part of your meter.<br>
If your meter has no digits, this step can be skipped.</p></li>
<li>Define <b>ROI's</b>> for the <b>Analog Counters</b>.<br>
They will be used to digitize the analog part of your meter.<br>
If your meter has no analog counters, this step can be skipped.</p></li>
<li><p><b>General Settings</b><br>
Further configuration of your device.</p></li>
</ol>
<p>
After step 5 setup mode is completed, it then reboots and starts into the normal mode.
<br><br>
<p>Please be patient when switching to another step. The device takes some time to load all needed information!</p>
If you need support, have a look to the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs target=_blank>documenation</a> or the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>discussion</a> pages.<br>
<p>After step 5 the setup is completed, you then can reboot and starts into the normal operation mode.</p>
<h4>Have fun with the digitizer!</h4>
<p>If you need support, have a look to the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs target=_blank>documentation</a> or the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>discussion</a> pages.</p>
<p><b>Have fun with your digitizer!</b></p>
</body>
</html>

View File

@@ -28,16 +28,11 @@ p {font-size: 1em;}
<body style="font-family: arial">
<h4>Finished!</h4>
<h4>Step 6: Setup Completed!</h4>
<p>
Now you are finished with the setup and ready to reboot to the normal mode.
<br>
Once you have pushed below button, the setup modus will be left and the digitizer will restart to normal operation mode.
<br>
The Web Interface will automatically reload. It will take two to four minutes, until you get the first reading.
<br>
All settings can be changed as well in the configuration menu in the Normal modus.
<p>Congratulations, you completed the setup and are now ready to reboot to the normal mode!</p>
<p>Once you have pushed the button below, the setup modus will be left and the digitizer will restart to normal operation mode.<br>
The Web Interface will automatically reload. It will take some minutes until you get the first reading.
</p>
<p>

View File

@@ -2,7 +2,7 @@
<html>
<head>
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Make Reference</title>
<title>Reference Image</title>
<meta charset="utf-8"/>
<style>
@@ -36,8 +36,12 @@ table {
</head>
<body style="font-family: arial; padding: 0px 10px;">
<h2>Create Reference out of Raw Image</h2>
<p><b>Note: After saving a new Reference Image, make sure to update the Alignment Marks and the ROI's and reboot once!</b></p>
<h2>Reference Image</h2>
<p>On this page you define the Reference Image.
See <a href=https://jomjol.github.io/AI-on-the-edge-device-docs/Reference-Image/ target=_blank>https://jomjol.github.io/AI-on-the-edge-device-docs/Reference-Image/</a> for explanations.</p>
<p>After saving a new Reference Image, make sure to update the <a href=edit_alignment.html>Alignment Marks</a> and then
the <a href=edit_digits.html>digit</a> resp. <a href=edit_analog.html>analog</a> ROI's.<br>
Only after those steps a reboot is required.</p>
<table>
<tr>
@@ -87,10 +91,8 @@ table {
<td><canvas id="canvas"></canvas></td>
</tr>
<tr>
<td><input class="button" type="button" id="updatereferenceimage" value="Save" onclick="SaveReference()"></td>
</tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved Reference</button></td>
<td><input class="button" type="button" id="updatereferenceimage" value="Save" onclick="SaveReference()">
<p>Proceed to update the <a href=edit_alignment.html>Alignment Marks</a> when you are done.</p></td>
</tr>
</table>
@@ -129,7 +131,7 @@ table {
_contrast = document.getElementById("TakeImage_Contrast_value1").value;
_saturation = document.getElementById("TakeImage_Saturation_value1").value;
url = getDomainname() + "/editflow?task=test_take&bri=" + _brightness;
url = url + "&con=" + _saturation + "&sat=" + _saturation + "&int=" + _intensity;
url = url + "&con=" + _contrast + "&sat=" + _saturation + "&int=" + _intensity;
}
else
{
@@ -270,7 +272,7 @@ table {
SaveCanvasToImage(canvas, "/config/reference.jpg", true, getDomainname());
showReference(param);
UpdatePage();
firework.launch('Reference got updated. Please reboot to activate changes!', 'success', 5000);
firework.launch('Reference got updated. It will get applied after the next reboot!', 'success', 5000);
}
}

View File

@@ -20,12 +20,14 @@ p {font-size: 1em;}
<body style="font-family: arial">
<h4>Reference Image</h4>
<h4>Step 1: Define a Reference Image</h4>
The reference image is the base to define the digits, counters and references positions.
<p>
Firstly you see the default image. Use the Button "Create New Reference" to start to create your own reference image.<br>
Most important feature is a straight alignment of the image. Use the Pre-rotate angle and the fine alignment to adjust the rotation of the image<br>
Store the reference image by pushing <b>"Update Reference Image"</b>. A reboot is not yet required.
Most important feature is a straight alignment of the image. Use the Pre-rotate angle and the fine alignment to adjust the rotation of the image.
</p>
<p>
Don't forget to save your changes with the <b>"Save"</b> button!
</p>
</body>

View File

@@ -19,15 +19,15 @@ p {font-size: 1em;}
<body style="font-family: arial">
<h4>Alignment References</h4>
Two opposite alignment references are needed to identify unique fix points on the image.
<h4>Step 2: Define two Alignment Marks</h4>
Two opposite alignment marks are needed to identify unique fix points on the image.
<p>
Mark the reference by drag and dop with the mouse or with the coordinates and push <b>"Update Reference"</b>.
<br>
You can switch between the two reference with <b>"Select Reference"</b>.
</p>
<p>
Don't forget to save your changes! A reboot is not yet required.
Don't forget to save your changes with the <b>"Save"</b> button!
</p>
</body>

View File

@@ -20,7 +20,7 @@ p {font-size: 1em;}
<body style="font-family: arial">
<h4>Define Digits</h4>
<h4>Step 3: Define ROI's for your Digits</h4>
Here you define your digits you want to read. If you have more than one number on the reading you can define several numbers with the <b>"Number"</b> selector. There you can also define new numbers.
<p>
With the drop down menue <b>"ROI x"</b> you can change between the different digits. Mark them with the mouse or the coordinates.
@@ -29,7 +29,7 @@ Here you define your digits you want to read. If you have more than one number o
You can change it with <b>"move Next" / "move Previous"</b>.
</p>
<p>
Don't forget to save your changes! A reboot is not yet required.
Don't forget to save your changes with the <b>"Save"</b> button!
</p>
</body>

View File

@@ -19,7 +19,7 @@ p {font-size: 1em;}
<body style="font-family: arial">
<h4>Define Digits</h4>
<h4>Step 4: Define ROI's for your Analog Counters</h4>
Here you define your analog counters you want to read. If you have more than one number on the reading you can define several numbers with the <b>"Number"</b> selector. There you can also define new numbers. If you do not have analog counters delete all ROIs.
<p>
With the drop down menue <b>"ROI x"</b> you can change between the different counters. Mark them with the mouse or the coordinates.
@@ -28,7 +28,7 @@ Here you define your analog counters you want to read. If you have more than one
You can change it with <b>"move Next" / "move Previous"</b>.
</p>
<p>
Don't forget to save your changes with <b>"Save all to Config.ini"</b>! A reboot is not yet required.
Don't forget to save your changes with the <b>"Save"</b> button!
</p>
</body>

View File

@@ -19,12 +19,12 @@ p {font-size: 1em;}
<body style="font-family: arial">
<h4>General configuration parameters</h4>
<p>Here you can define additional settings. The settings should fit for a normal setup.</p>
<p>You will also be availabl</p>
<h4>Step 5: General Configuration Settings</h4>
<p>Here you can define additional settings. The default settings should fit for a normal/initial setup.</p>
<p>You will also be able to change them later, so don't worry if you do not understand the parameters yet!</p>
</p>
<p>
Don't forget to save your changes!
<br><span color=red>You should not reboot here, but leave the setup modus on the next page!</span>
Don't forget to save your changes with the <b>"Save"</b> button!
</p>
</body>

View File

@@ -1,26 +1 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
h1 {font-size: 2em; margin-block-end: 0.3em;}
h2 {font-size: 1.5em;margin-block-start: 0.3em;}
h3 {font-size: 1.2em;}
p {font-size: 1em;}
</style>
</head>
<body style="font-family: arial">
<h4>Finished!</h4>
Read below!
</body>
</html>
<!-- This page is never shown -->

View File

@@ -13,7 +13,7 @@ function getbasepath(){
{
// host = "http://192.168.2.219"; // jomjol interner test
// host = "http://192.168.178.46"; // jomjol interner test
host = "http://192.168.178.62"; // jomjol interner Real
host = "http://192.168.178.44"; // jomjol interner Real
// host = "http://192.168.43.191";
// host = "."; // jomjol interner localhost

View File

@@ -118,7 +118,7 @@
* - *.bin
* - *.zip */
else if (filename.endsWith(".zip") || filename.endsWith(".bin")) { // Warning but still accepted
firework.launch('The filename does not match the suggested filename pattern, but is nevertheless accepted. You can now press "Upload and install', 'warning', 10000);
firework.launch('The filename does not match the suggested filename pattern, but is nevertheless accepted. You can now press "Upload and install".', 'warning', 10000);
}
/* Any other file name format is not accepted */
else { // invalid

View File

@@ -45,7 +45,6 @@ function ZerlegeZeile(input, delimiter = " =\t\r")
var Output = Array(0);
// delimiter = " =,\t";
input = trim(input, delimiter);
/* The input can have multiple formats:
* - key = value
@@ -61,12 +60,14 @@ function ZerlegeZeile(input, delimiter = " =\t\r")
* As a workaround and to not break any legacy usage, we enforce to only use the
* equal sign, if the key is "password"
*/
if (input.includes("password")) { // Line contains a password, use the equal sign as the only delimiter and only split on first occurrence
if (input.includes("password") || input.includes("Token")) { // Line contains a password, use the equal sign as the only delimiter and only split on first occurrence
var pos = input.indexOf("=");
delimiter = " \t\r"
Output.push(trim(input.substr(0, pos), delimiter));
Output.push(trim(input.substr(pos +1, input.length), delimiter));
}
else { // Legacy Mode
input = trim(input, delimiter);
var pos = findDelimiterPos(input, delimiter);
var token;
while (pos > -1) {

View File

@@ -194,8 +194,19 @@ function ParseConfig() {
ParamAddValue(param, catname, "Measurement");
ParamAddValue(param, catname, "user");
ParamAddValue(param, catname, "password");
var catname = "InfluxDBv2";
category[catname] = new Object();
category[catname]["enabled"] = false;
category[catname]["found"] = false;
param[catname] = new Object();
ParamAddValue(param, catname, "Uri");
ParamAddValue(param, catname, "Database");
ParamAddValue(param, catname, "Measurement");
ParamAddValue(param, catname, "Org");
ParamAddValue(param, catname, "Token");
ParamAddValue(param, catname, "Fieldname", 1, true);
var catname = "GPIO";
category[catname] = new Object();
category[catname]["enabled"] = false;

View File

@@ -40,7 +40,7 @@ p {font-size: 1em;}
<td>
<button class="button" id="previous" name="previous" onclick="clickPrevious()">Previous</button>
<button class="button" id="next" name="next" onclick="clickNext()">Next</button>
If you need support, have a look to the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs target=_blank>documenation</a> or the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>discussion</a> pages.
If you need support, have a look to the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs target=_blank>documentation</a> or the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>discussion</a> pages.
</td>
</tr>
</table>
@@ -83,53 +83,53 @@ function clickPrevious() {
function LoadStep(){
switch (aktstatu) {
case 0:
document.getElementById('maincontent').src = '/edit_explain_0.html?v=$COMMIT_HASH';
document.getElementById('maincontent').src = 'edit_explain_0.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "none";
document.getElementById("previous").disabled = true;
document.getElementById("next").disabled = false;
break;
case 1:
document.getElementById('maincontent').src = '/edit_reference.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_1.html?v=$COMMIT_HASH';
document.getElementById('maincontent').src = 'edit_reference.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = 'explain_1.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 2:
document.getElementById('maincontent').src = '/edit_alignment.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_2.html?v=$COMMIT_HASH';
document.getElementById('maincontent').src = 'edit_alignment.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = 'explain_2.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 3:
document.getElementById('maincontent').src = '/edit_digits.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_3.html?v=$COMMIT_HASH';
document.getElementById('maincontent').src = 'edit_digits.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = 'explain_3.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 4:
document.getElementById('maincontent').src = '/edit_analog.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_4.html?v=$COMMIT_HASH';
document.getElementById('maincontent').src = 'edit_analog.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = 'explain_4.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 5:
document.getElementById('maincontent').src = '/edit_config_param.html?v=$COMMIT_HASH?InitialSetup=true';
document.getElementById('explaincontent').src = '/explain_5.html?v=$COMMIT_HASH';
document.getElementById('maincontent').src = 'edit_config_param.html?v=$COMMIT_HASH?InitialSetup=true';
document.getElementById('explaincontent').src = 'explain_5.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 6:
document.getElementById('maincontent').src = '/edit_explain_6.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_6.html?v=$COMMIT_HASH';
document.getElementById('maincontent').src = 'edit_explain_6.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = 'explain_6.html?v=$COMMIT_HASH'; // Note: The page never gets shown!
document.getElementById('h_iframe_explain').style.display = "none";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = true;