\n";
std::vector htmlinfoana;
@@ -510,7 +510,7 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
/* Full Image
* Only show it after the image got taken and aligned */
- txt = "
Aligned Image (current round)
\n";
+ txt = "
Aligned Image (current round)
\n";
if ((*status == std::string("Initialization")) ||
(*status == std::string("Initialization (delayed)")) ||
(*status == std::string("Take Image"))) {
@@ -657,14 +657,7 @@ esp_err_t handler_editflow(httpd_req_t *req)
string out2 = out.substr(0, out.length() - 4) + "_org.jpg";
- std::string state = *flowctrl.getActStatus();
-
- /* To be able to provide the image, several conditions must be met due to the shared PSRAM usage:
- - Ether the round most be completed or not started yet
- - Or we must be in Setup Mode
- - Additionally, the initialization of the shared PSRAM must be successful */
- if (((state == "Flow finished") || (state == "Initialization") || (state == "Initialization (delayed)") || isSetupModusActive()) &&
- psram_init_shared_memory_for_take_image_step()) {
+ if ((flowctrl.SetupModeActive || (*flowctrl.getActStatus() == "Flow finished")) && psram_init_shared_memory_for_take_image_step()) {
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Taking image for Alignment Mark Update...");
CAlignAndCutImage *caic = new CAlignAndCutImage("cutref", in);
@@ -687,7 +680,7 @@ esp_err_t handler_editflow(httpd_req_t *req)
}
else {
LogFile.WriteToFile(ESP_LOG_WARN, TAG, std::string("Taking image for Alignment Mark not possible while device") +
- " is busy with a round (Current State: '" + state + "')!");
+ " is busy with a round (Current State: '" + *flowctrl.getActStatus() + "')!");
zw = "Device Busy";
}
@@ -897,7 +890,7 @@ esp_err_t handler_prevalue(httpd_req_t *req)
if (httpd_query_key_value(_query, "value", _value, 20) == ESP_OK) {
#ifdef DEBUG_DETAIL_ON
- ESP_LOGD(TAG, "Value: %s", _size);
+ ESP_LOGD(TAG, "Value: %s", _value);
#endif
}
}
diff --git a/code/components/jomjol_influxdb/interface_influxdb.cpp b/code/components/jomjol_influxdb/interface_influxdb.cpp
index e338bf934..1a9ac3088 100644
--- a/code/components/jomjol_influxdb/interface_influxdb.cpp
+++ b/code/components/jomjol_influxdb/interface_influxdb.cpp
@@ -116,7 +116,7 @@ static esp_err_t http_event_handler(esp_http_client_event_t *evt)
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "HTTP Client Error encountered");
break;
case HTTP_EVENT_ON_CONNECTED:
- LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "HTTP Client Error encountered");
+ LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "HTTP Client connected");
ESP_LOGI(TAG, "HTTP Client Connected");
break;
case HTTP_EVENT_HEADERS_SENT:
diff --git a/code/components/jomjol_mqtt/interface_mqtt.cpp b/code/components/jomjol_mqtt/interface_mqtt.cpp
index 1ab8f03fd..aa21fe7da 100644
--- a/code/components/jomjol_mqtt/interface_mqtt.cpp
+++ b/code/components/jomjol_mqtt/interface_mqtt.cpp
@@ -9,6 +9,11 @@
#include "cJSON.h"
#include "../../include/defines.h"
+#if DEBUG_DETAIL_ON
+#include "esp_timer.h"
+#endif
+
+
static const char *TAG = "MQTT IF";
std::map>* connectFunktionMap = NULL;
diff --git a/code/components/jomjol_wlan/read_wlanini.cpp b/code/components/jomjol_wlan/read_wlanini.cpp
index 1a9af2276..7ebca23da 100644
--- a/code/components/jomjol_wlan/read_wlanini.cpp
+++ b/code/components/jomjol_wlan/read_wlanini.cpp
@@ -174,10 +174,12 @@ int LoadWlanFromFile(std::string fn)
}
/* Check if password is empty (mandatory parameter) */
+ /* Disabled see issue #2393
if (wlan_config.password.empty()) {
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Password empty. Device init aborted!");
return -2;
}
+ */
return 0;
}
diff --git a/code/platformio.ini b/code/platformio.ini
index c5a40aca4..ea924fb2f 100644
--- a/code/platformio.ini
+++ b/code/platformio.ini
@@ -19,7 +19,7 @@
[common:esp32-idf]
extends = common:idf
- platform = platformio/espressif32 @ 6.2.0
+ platform = platformio/espressif32 @ 6.3.2
framework = espidf
lib_deps =
${common:idf.lib_deps}
diff --git a/code/sdkconfig.defaults b/code/sdkconfig.defaults
index e41514a16..8e7fbc64b 100644
--- a/code/sdkconfig.defaults
+++ b/code/sdkconfig.defaults
@@ -109,6 +109,11 @@ CONFIG_ESP_INT_WDT_TIMEOUT_MS=300
CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024
CONFIG_HTTPD_PURGE_BUF_LEN=16
+<<<<<<< Updated upstream
+=======
+CONFIG_HTTPD_WS_SUPPORT=y
+CONFIG_LWIP_MAX_SOCKETS=12
+>>>>>>> Stashed changes
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16
diff --git a/images/Flowstate_initialization.xcf b/images/Flowstate_initialization.xcf
index 6a54f159a..ddfedf702 100644
Binary files a/images/Flowstate_initialization.xcf and b/images/Flowstate_initialization.xcf differ
diff --git a/images/Flowstate_initialization_delayed.xcf b/images/Flowstate_initialization_delayed.xcf
index 80e61e5d7..2e465cf42 100644
Binary files a/images/Flowstate_initialization_delayed.xcf and b/images/Flowstate_initialization_delayed.xcf differ
diff --git a/images/Flowstate_take_image.xcf b/images/Flowstate_take_image.xcf
index 961597d59..1fe747f6e 100644
Binary files a/images/Flowstate_take_image.xcf and b/images/Flowstate_take_image.xcf differ
diff --git a/images/icon/logo.png b/images/icon/logo.png
new file mode 100644
index 000000000..194cb4afd
Binary files /dev/null and b/images/icon/logo.png differ
diff --git a/sd-card/config/ana-class100_0157_s1_q.tflite b/sd-card/config/ana-class100_0157_s1_q.tflite
deleted file mode 100644
index 0b184b206..000000000
Binary files a/sd-card/config/ana-class100_0157_s1_q.tflite and /dev/null differ
diff --git a/sd-card/config/ana-class100_0169_s1_q.tflite b/sd-card/config/ana-class100_0169_s1_q.tflite
new file mode 100644
index 000000000..cf52e19bb
Binary files /dev/null and b/sd-card/config/ana-class100_0169_s1_q.tflite differ
diff --git a/sd-card/config/ana-class100_0170_s1_q.tflite b/sd-card/config/ana-class100_0170_s1_q.tflite
new file mode 100644
index 000000000..8ecddda33
Binary files /dev/null and b/sd-card/config/ana-class100_0170_s1_q.tflite differ
diff --git a/sd-card/config/ana-cont_1105_s2_q.tflite b/sd-card/config/ana-cont_1105_s2_q.tflite
deleted file mode 100644
index e9c2368a4..000000000
Binary files a/sd-card/config/ana-cont_1105_s2_q.tflite and /dev/null differ
diff --git a/sd-card/config/ana-cont_1206_s2_q.tflite b/sd-card/config/ana-cont_1206_s2_q.tflite
new file mode 100644
index 000000000..e4e5f5faf
Binary files /dev/null and b/sd-card/config/ana-cont_1206_s2_q.tflite differ
diff --git a/sd-card/config/ana-cont_1207_s2_q.tflite b/sd-card/config/ana-cont_1207_s2_q.tflite
new file mode 100644
index 000000000..3ff05babe
Binary files /dev/null and b/sd-card/config/ana-cont_1207_s2_q.tflite differ
diff --git a/sd-card/config/config.ini b/sd-card/config/config.ini
index 08e350460..dc9955566 100644
--- a/sd-card/config/config.ini
+++ b/sd-card/config/config.ini
@@ -12,7 +12,7 @@ FixedExposure = false
Demo = false
[Alignment]
-InitialRotate = 179
+InitialRotate = 0.0
InitialMirror = false
SearchFieldX = 20
SearchFieldY = 20
@@ -22,7 +22,7 @@ FlipImageSize = false
/config/ref1.jpg 442 142
[Digits]
-Model = /config/dig-cont_0611_s3_q.tflite
+Model = /config/dig-cont_0620_s3_q.tflite
CNNGoodThreshold = 0.5
;ROIImagesLocation = /log/digit
;ROIImagesRetention = 3
@@ -31,7 +31,7 @@ main.dig2 343 126 30 54 false
main.dig3 391 126 30 54 false
[Analog]
-Model = /config/ana-cont_1105_s2_q.tflite
+Model = /config/ana-cont_1207_s2_q.tflite
CNNGoodThreshold = 0.5
;ROIImagesLocation = /log/analog
;ROIImagesRetention = 3
@@ -106,6 +106,6 @@ LogfilesRetention = 3
TimeZone = CET-1CEST,M3.5.0,M10.5.0/3
;TimeServer = pool.ntp.org
;Hostname = undefined
-;RSSIThreshold = 0
+RSSIThreshold = -75
CPUFrequency = 160
SetupMode = true
diff --git a/sd-card/config/dig-class100-0165_s2_q.tflite b/sd-card/config/dig-class100-0165_s2_q.tflite
new file mode 100644
index 000000000..4dcc02d1d
Binary files /dev/null and b/sd-card/config/dig-class100-0165_s2_q.tflite differ
diff --git a/sd-card/config/dig-class100_0160_s2_q.tflite b/sd-card/config/dig-class100_0160_s2_q.tflite
deleted file mode 100644
index a1769322b..000000000
Binary files a/sd-card/config/dig-class100_0160_s2_q.tflite and /dev/null differ
diff --git a/sd-card/config/dig-cont_0611_s3.tflite b/sd-card/config/dig-cont_0611_s3.tflite
deleted file mode 100644
index 0a2314a56..000000000
Binary files a/sd-card/config/dig-cont_0611_s3.tflite and /dev/null differ
diff --git a/sd-card/config/dig-cont_0620_s3_q.tflite b/sd-card/config/dig-cont_0620_s3_q.tflite
new file mode 100644
index 000000000..95932c748
Binary files /dev/null and b/sd-card/config/dig-cont_0620_s3_q.tflite differ
diff --git a/sd-card/html/Flowstate_initialization.jpg b/sd-card/html/Flowstate_initialization.jpg
index b490fc47f..54d9ccfd5 100644
Binary files a/sd-card/html/Flowstate_initialization.jpg and b/sd-card/html/Flowstate_initialization.jpg differ
diff --git a/sd-card/html/Flowstate_initialization_delayed.jpg b/sd-card/html/Flowstate_initialization_delayed.jpg
index 4be8f74f2..bce3d2c5c 100644
Binary files a/sd-card/html/Flowstate_initialization_delayed.jpg and b/sd-card/html/Flowstate_initialization_delayed.jpg differ
diff --git a/sd-card/html/Flowstate_take_image.jpg b/sd-card/html/Flowstate_take_image.jpg
index dbc4feeed..8ce51e3e3 100644
Binary files a/sd-card/html/Flowstate_take_image.jpg and b/sd-card/html/Flowstate_take_image.jpg differ
diff --git a/sd-card/html/backup.html b/sd-card/html/backup.html
index 8e04bc5ff..04af87f36 100644
--- a/sd-card/html/backup.html
+++ b/sd-card/html/backup.html
@@ -1,42 +1,41 @@
-
+
-
-Backup/Restore Configuration
-
-
-
+ .button {
+ padding: 5px 10px;
+ width: 205px;
+ font-size: 16px;
+ }
+
-
Backup Configuration
-
With the following action the config folder on the SD-card gets zipped and provided as a download.
diff --git a/sd-card/html/common.js b/sd-card/html/common.js
index 66b3992c0..20d010103 100644
--- a/sd-card/html/common.js
+++ b/sd-card/html/common.js
@@ -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.23";
+var domainname_for_testing = "192.168.1.151";
/* Returns the domainname with prepended protocol.
@@ -13,7 +13,7 @@ function getDomainname(){
)
{
- console.log("Using pre-defined domainname for testing: " + domainname_for_testing);
+ //console.log("Using pre-defined domainname for testing: " + domainname_for_testing);
domainname = "http://" + domainname_for_testing
}
else
@@ -139,8 +139,8 @@ function compareVersions() {
console.log("FW Hash: " + fWGitHash + ", Web UI Hash: " + webUiHash);
if (fWGitHash != webUiHash) {
- firework.launch("The Version of the Web Interface (" + webUiHash +
- ") does not match the Firmware Version (" +
+ firework.launch("The version of the web interface (" + webUiHash +
+ ") does not match the firmware version (" +
fWGitHash + ")! It is suggested to keep them on the same version!", 'warning', 30000);
}
}
diff --git a/sd-card/html/data.html b/sd-card/html/data.html
index a592241cc..09f9885b0 100644
--- a/sd-card/html/data.html
+++ b/sd-card/html/data.html
@@ -1,17 +1,26 @@
-
+
+
+ Data Viewer
+
+
-
After saving the Reference Marks, you can define the digit resp. analog ROI's.
- Only after those steps a reboot is required.
-
-
-
-
-
-
+
Alignment Marker
+
+ CLICK HERE for usage description. More infos in documentation:
+ Alignment
+
+
+ Two alignment marker with clear contour and proper contrast are needed to identify unique "fix points" on the image.
+ The marker area should be not be part of the variable area of ROI evaluation. Please find more information in documenation:
+ Alignment
+
+
+ Select an alignment marker area using drag and dop feature by mouse operation or by manually entering the coordinates and sizes in the fields below the image.
+ After you selected a suitable first alignment marker area, push the "Update Marker" button. Switch to second alignment marker with "Marker"
+ and repeat the procedure.
+
+
+ After definition of both alignment marker is completed don't forget to save with the "Save New Marker" button!
+ NOTE: There is no need to perform a reboot after every saving or step. It's sufficient to reboot after all configuration steps
+ (reference image, alignment, ROI configuration) are completed to activate new configuration.
+
+
+
+
+
+
+
+
-
Select Reference:
+
Marker:
-
Storage Path/Name:
+
Filename:
x:
dx:
-
+
y:
dy:
-
Original Image:
-
Reference Image:
-
+
Selected Image Area:
+
Resulting Marker:
+
-
-
-
-
-
-
-
-
-
Proceed to update the digit resp. analog ROI's when you are done.
+
+
-
+
+
Reference Image:
+
+
+
+
+
+
+
+
+
@@ -130,10 +164,15 @@
Alignment Marks
}
function SaveToConfig(){
- WriteConfigININew();
- UpdateConfigReference(domainname)
- SaveConfigToServer(domainname);
- firework.launch('Reference Marks got updated. The change will get applied after the next reboot!', 'success', 5000);
+ if (confirm("Are you sure you want to save the new alignment marker configuration?")) {
+ WriteConfigININew();
+ UpdateConfigReference(domainname)
+ SaveConfigToServer(domainname);
+ document.getElementById("savemarker").disabled = true;
+ document.getElementById("enhancecontrast").disabled = true;
+
+ firework.launch('Alignment marker saved. They will get applied after next reboot', 'success', 5000);
+ }
}
function EnhanceContrast(){
@@ -146,6 +185,7 @@
+
+ CLICK HERE for usage description. More infos in documentation:
+ ROI Configuration
+
+
+ Region Of Interest (ROI) for analog pointer counter can be defined on this page. If no analog pointer counter need to be
+ processed, disable analog pointer counter processing by deselecting "Analog ROI Processing".
+
+
+ By default one number sequence (a number seqence contains of 1-x digit ROIs + 1-x analog counter ROIs which are processed together) is
+ predefined and already selected in the drop down "Number Sequence". If you need more than one number sequence additional
+ one's can be added with the buttons next to the drop down. Each number sequence will be processed separately.
+
+
+ Using drag and drop by mouse of by manually entering the parameters into the given fields the analog ROIs can be positined to the analog pointer
+ counters on the reference image. To have proper ROI definition please check the documentation:
+ ROI Configuration. It's very important to be
+ really precise to have reliable processing. With the drop down "ROI" you can change between the different ROIs in the selected
+ number sequence. To create new ROIs use "New ROI".
+
+
+ The order of the ROIs defines the position (and therefore the multiplication factor) within the reading sequence. The position
+ in the number sequence can be changed with the buttons "Move ROI Lower" and "Move ROI Higher". The multiplication factor which is
+ shown below the ROI drop down is the multiplication factor of pure position/order in number sequence and the factor right-hand side to this is
+ the additionally corrected by decimal shift setting (configuration, expert parameter, default: 0).
+
+
+ After definition of digit ROIs is completed don't forget to save with the "Save Config" button!
+ NOTE: There is no need to perform a reboot after every saving or step. It's sufficient to reboot after all configuration steps
+ (reference image, alignment, ROI configuration) are completed to activate new configuration.
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- Number:
+
+
+
+
+
+
+
+
+
+
Number Sequence:
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ROI:
+
+
+
+
+
+
+
+
+
Multiplier:
+ (only based on order)
+
+
Multiplier:
+ (order + decimal shift: )
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
x:
-
Δx:
-
-
-
-
y:
-
Δy:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
x:
+
Δx:
+
+
+
+
y:
+
Δy:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Reference Image:
+
+
+
+
+
+
+
@@ -158,16 +237,15 @@
Analog ROI's
lockSizes = false;
domainname = getDomainname();
-
-function doReboot() {
- if (confirm("Are you sure you want to reboot? Did you save your changes?")) {
- var stringota = getDomainname() + "/reboot";
- window.location = stringota;
- window.location.href = stringota;
- window.location.assign(stringota);
- window.location.replace(stringota);
+ function doReboot() {
+ if (confirm("Are you sure you want to reboot? Did you save your changes?")) {
+ var stringota = getDomainname() + "/reboot";
+ window.location = stringota;
+ window.location.href = stringota;
+ window.location.assign(stringota);
+ window.location.replace(stringota);
+ }
}
-}
function EnDisableAnalog() {
isEnabled = document.getElementById("Category_Analog_enabled").checked;
@@ -186,9 +264,9 @@
}
function deleteROI(){
+ if (!confirm("Delete the selected ROI?")) {
+ return; //break out of the function early because prompt was aborted
+ }
+
ROIInfo.splice(aktindex, 1);
if (aktindex > ROIInfo.length - 1){
aktindex = ROIInfo.length - 1;
@@ -220,18 +302,21 @@
Analog ROI's
draw();
}
-function newROI(){
+function newROI() {
var sel = document.getElementById("Numbers_value1");
var _number= sel.options[sel.selectedIndex].text;
sel = document.getElementById("index");
var _roialt= sel.options[sel.selectedIndex].text;
- var _roinew = prompt("Please enter name of new ROI", "name");
+ var _roinew = prompt("Please enter a name for the new ROI", "name");
+ if (_roinew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
if (ROIInfo.length > 0)
- erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 1, 1, ROIInfo[aktindex]["dx"], ROIInfo[aktindex]["dy"], ROIInfo[aktindex]["CCW"]=="true");
+ erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 15, 30, ROIInfo[aktindex]["dx"], ROIInfo[aktindex]["dy"], ROIInfo[aktindex]["CCW"]=="true");
else
- erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 1, 1, 30, 30, false);
+ erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 15, 30, 30, 30, false);
if (erg != "")
firework.launch(erg, 'danger', 30000);
@@ -275,7 +360,9 @@
var left = box.left + scrollLeft - clientLeft;
return { top: Math.round(top), left: Math.round(left) };
}
-
-
+
+
+ /* hash #description open the details part of the page */
+ function openDescription() {
+ if(window.location.hash) {
+ var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
+ if(hash == 'description')
+ document.getElementById("desc_details").open = true;
+ }
+ }
+
function init() {
+ openDescription();
domainname = getDomainname();
canvas.addEventListener('mousedown', mouseDown, false);
canvas.addEventListener('mouseup', mouseUp, false);
@@ -440,11 +613,12 @@
Analog ROI's
console.log("Not all ROI have the same dX and dY, unticking the sync checkbox!");
}
+ document.getElementById("saveroi").disabled = true;
drawImage();
draw();
}
-
+
function drawImage(){
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
@@ -483,10 +657,13 @@
Analog ROI's
function renameNumber(){
var sel = document.getElementById("Numbers_value1");
- var _delte= sel.options[sel.selectedIndex].text;
- var _numbernew = prompt("Please enter new name", _delte);
+ var _delete= sel.options[sel.selectedIndex].text;
+ var _numbernew = prompt("Please enter a new name for the selected number sequence", _delete);
+ if (_numbernew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
- erg = RenameNUMBER(_delte, _numbernew);
+ erg = RenameNUMBER(_delete, _numbernew);
if (erg != "")
firework.launch(erg, 'danger', 30000);
else
@@ -494,7 +671,10 @@
Analog ROI's
}
function newNumber(){
- var _numbernew = prompt("Please enter name of new number", "name");
+ var _numbernew = prompt("Please enter a name for the new number sequence", "name");
+ if (_numbernew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
erg = CreateNUMBER(_numbernew);
if (erg != "")
@@ -505,10 +685,13 @@
Analog ROI's
function removeNumber(){
- if (confirm("This will remove the number complete (analog and digital).\nIf you only want to remove the digital ROIs, please use \"Delete ROIs\".\nDo you want to proceed?")) {
+ if (confirm("The entire number sequence will be removed (digit + analog parts). " +
+ "To remove single ROI of the number sequence, use \"Delete ROI\" instead.\n" +
+ "Do you really want to proceed?"))
+ {
var sel = document.getElementById("Numbers_value1");
- var _delte= sel.options[sel.selectedIndex].text;
- erg = DeleteNUMBER(_delte);
+ var _delete= sel.options[sel.selectedIndex].text;
+ erg = DeleteNUMBER(_delete);
if (erg != "")
firework.launch(erg, 'danger', 30000);
UpdateNUMBERS();
@@ -576,8 +759,12 @@
sel = document.getElementById("index");
var _roialt= sel.options[sel.selectedIndex].text;
-
- var _roinew = prompt("Please enter new name", _roialt);
+ var _roinew = prompt("Please enter a new name for the selected ROI", _roialt);
+ if (_roinew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
erg = RenameROI(_number, "analog", _roialt, _roinew);
if (erg != "")
@@ -742,13 +940,15 @@
+
+ CLICK HERE for usage description. More infos in documentation:
+ Parameter
+
+
+ This page lists all available configuration parameters of the device.
+ The description of each parameter can be shown by hovering over or by clicking the icon.
+
+
+ The page gets opened with the default view which should be sufficient for regular configuration tasks. Enabling the "Expert View"
+ some expert parameters (light red background color) will be added to the parameter list. Additionally the button "Edit "Config.ini" File"
+ to edit the underlaying configuration file (config.ini) manually is now shown on top of the page. This function should be only used for special cases.
+
+
+ Sections (entire functionality) or single parameters having a checkbox can be enabled or disabled.
+ Disabling a complete section results in a disabled functionality. Whenever only a single parameter of a section is disabled
+ the hard-coded default value is used for the disabled parameter.
+
+
+ Don't forget to save the changes with the button "Save Config" at the bottom of this page.
+
+
The discovery topics and the static topics (IP, MAC, Hostname, Interval, ...) only get sent on startup.
- To send them again, you can call the following URL: http://<IP>/mqtt_publish_discovery
+
+
+
+ Homeassistant Discovery (using MQTT)
+ If activated, the discovery topics gets automatically scheduled to sent once after device startup during state "Publish to MQTT".
+ To schedule a retransmission: Use "Manual Control > Resend HA Discovery" or call REST API:
+ http://<IP>/mqtt_publish_discovery
-
-
-
+
+
+
+
@@ -637,13 +787,14 @@
The discovery topics and the static topics (IP, MAC, Hostname, Interval, ...
By default GPIO4 is used for the built-in flash LED! If you enable the GPIO Settings,
- you have to explicitely enable it again on GPIO4 or on GPIO12 with an external LED!
+ IMPORTANT NOTE:
+ If you'd like to use the built-in flash LED in parallel with other GPIO functionality,
+ you have to explicitely activate the "built-in LED flash light" option on GPIO4. The light
+ intensity control (PWM) of the LED flash light is not functional anymore (only 100%).
+
By default GPIO4 is used for the built-in flash LED! If you enable the GPIO
$TOOLTIP_System_TimeServer
+
@@ -1352,14 +1595,15 @@
By default GPIO4 is used for the built-in flash LED! If you enable the GPIO
$TOOLTIP_System_Hostname
-
- dBm
+ dBm
$TOOLTIP_System_RSSIThreshold
@@ -1380,20 +1624,14 @@
By default GPIO4 is used for the built-in flash LED! If you enable the GPIO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -1410,13 +1648,6 @@
By default GPIO4 is used for the built-in flash LED! If you enable the GPIO
function LoadConfigNeu() {
- var isInitialSetup = getParameterByName('InitialSetup');
- if (isInitialSetup === 'true')
- {
- document.getElementById("reboot").style.display = "none";
- }
-
-
domainname = getDomainname();
if (!loadConfig(domainname)) {
firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
@@ -1434,42 +1665,43 @@
By default GPIO4 is used for the built-in flash LED! If you enable the GPIO
document.getElementById("divall").style.display = '';
}
+
function InitIndivParameter()
{
- NUMBERS = getNUMBERInfo();
+ NUMBERS = getNUMBERInfo();
var _index = document.getElementById("Numbers_value1");
while (_index.length)
_index.remove(0);
- var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
+ var _indexInflux = document.getElementById("NumbersInfluxDBv2_value1");
while (_indexInflux.length)
- _indexInflux.remove(0);
+ _indexInflux.remove(0);
- var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
+ var _indexInfluxv1 = document.getElementById("NumbersInfluxDB_value1");
while (_indexInflux.length)
- _indexInfluxv1.remove(0);
+ _indexInfluxv1.remove(0);
- for (var i = 0; i < NUMBERS.length; ++i){
- var option = document.createElement("option");
+ 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");
+ var optionInflux = document.createElement("option");
optionInflux.text = NUMBERS[i]["name"];
optionInflux.value = i;
- _indexInflux.add(optionInflux);
+ _indexInflux.add(optionInflux);
- var optionInfluxv1 = document.createElement("option");
+ var optionInfluxv1 = document.createElement("option");
optionInfluxv1.text = NUMBERS[i]["name"];
optionInfluxv1.value = i;
- _indexInfluxv1.add(optionInfluxv1);
+ _indexInfluxv1.add(optionInfluxv1);
- }
+ }
_index.selectedIndex = 0;
- _indexInflux.selectedIndex = 0;
- _indexInfluxv1.selectedIndex = 0;
+ _indexInflux.selectedIndex = 0;
+ _indexInfluxv1.selectedIndex = 0;
}
@@ -1478,418 +1710,438 @@
By default GPIO4 is used for the built-in flash LED! If you enable the GPIO
var text = list_tflite[i].replace("/config/", "");
if (list_tflite[i].includes("/dig")) { // Its a digital file, only show in the digital list box
- optionDig.text = text;
- optionDig.value = list_tflite[i];
- _indexDig.add(optionDig);
+ optionDig.text = text;
+ optionDig.value = list_tflite[i];
+ _indexDig.add(optionDig);
}
else if (list_tflite[i].includes("/ana")) { // Its a digital file, only show in the analog list box
- optionAna.text = text;
- optionAna.value = list_tflite[i];
- _indexAna.add(optionAna);
+ optionAna.text = text;
+ optionAna.value = list_tflite[i];
+ _indexAna.add(optionAna);
}
else { // all other files, show in both list boxes
- optionDig.text = text;
- optionDig.value = list_tflite[i];
- _indexDig.add(optionDig);
-
- optionAna.text = text;
- optionAna.value = list_tflite[i];
- _indexAna.add(optionAna);
+ optionDig.text = text;
+ optionDig.value = list_tflite[i];
+ _indexDig.add(optionDig);
+
+ optionAna.text = text;
+ optionAna.value = list_tflite[i];
+ _indexAna.add(optionAna);
}
}
@@ -1923,241 +2175,265 @@
+
+ CLICK HERE for usage description. More infos in documentation:
+ ROI Configuration
+
+
+ Region Of Interest (ROI) for digit numbers can be defined on this page. If no digit numbers need to be processed,
+ disable digit processing by deselecting "Digit ROI Processing".
+
+
+ By default one number sequence (a number seqence contains of 1-x digit ROIs + 1-x analog counter ROIs which are processed together) is
+ predefined and already selected in the drop down "Number sequence". If you need more than one number sequence additional
+ one's can be added with the buttons next to the drop down. Each number sequence will be processed separately.
+
+
+ Using drag and drop by mouse of by manually entering the parameters into the given fields the digit ROIs can be positined to the digit numbers
+ on the reference image. To have proper ROI definition please check the documentation:
+ ROI Configuration. It's very important to be
+ really precise to have reliable processing. With the drop down "ROI" you can change between the different ROIs in the selected
+ number sequence. To create new ROIs use "New ROI".
+
+
+ The order of the ROIs defines the position (and therefore the multiplication factor) within the reading sequence. The position
+ in the number sequence can be changed with the buttons "Move ROI Lower" and "Move ROI Higher". The multiplication factor which is
+ shown below the ROI drop down is the multiplication factor of pure position/order in number sequence and the factor right-hand side to this is
+ the additionally corrected by decimal shift setting (configuration, expert parameter, default: 0).
+
+
+ After definition of digit ROIs is completed don't forget to save with the "Save Config" button!
+ NOTE: There is no need to perform a reboot after every saving or step. It's sufficient to reboot after all configuration steps
+ (reference image, alignment, ROI configuration) are completed to activate new configuration.
+
+
+
+
+
+
+
+
-
After saving the digit ROI's, you can define the analog ROI's if your meter has analog counters.
- Only after those steps a reboot is required.
-
-
-
-
-
-
-
-
-
-
- Number:
+
+
+
+
+
+
+
+
+
Number Sequence:
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ROI:
+
+
+
+
+
+
+
+
+
Multiplier:
+ (only based on order)
+
+
Multiplier:
+ (order + decimal shift: )
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
x:
-
Δx:
-
-
-
-
y:
-
Δy:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
x:
+
Δx:
+
+
+
+
y:
+
Δy:
+
+
+
+
+
+
+
+
-
-
+
-
-
-
Proceed to update the analog ROI's when you are done or reboot if there are no analogue counters.
}
function deleteROI(){
+ if (!confirm("Delete the selected ROI?")) {
+ return; //break out of the function early because prompt was aborted
+ }
+
ROIInfo.splice(aktindex, 1);
if (aktindex > ROIInfo.length - 1){
aktindex = ROIInfo.length - 1;
@@ -222,7 +302,10 @@
Digit ROI's
sel = document.getElementById("index");
var _roialt= sel.options[sel.selectedIndex].text;
- var _roinew = prompt("Please enter name of new ROI", "name");
+ var _roinew = prompt("Please enter a name for the new ROI", "name");
+ if (_roinew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
if (ROIInfo.length > 0) {
if (ROIInfo.length > 1) {
@@ -232,7 +315,7 @@
valuemanualchangedspace();
if (!lockSizes) {
- firework.launch("For best results it is in most cases advised to keep the y, Δx and Δy identical!", 'warning', 10000);
+ firework.launch("In most cases it's advised to keep the y, Δx and Δy identical!", 'warning', 10000);
}
}
@@ -296,11 +379,51 @@
Digit ROI's
}
function SaveToConfig(){
-// _zwcat = getConfigCategory();
- cofcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
- WriteConfigININew();
- SaveConfigToServer(domainname);
- firework.launch('Configuration got updated. It will get applied after the next reboot!', 'success', 5000);
+ if (confirm("Are you sure you want to save the new digit ROI configuration?")) {
+ // _zwcat = getConfigCategory();
+ cofcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
+ WriteConfigININew();
+ SaveConfigToServer(domainname);
+ UpdateROIs();
+ document.getElementById("saveroi").disabled = true;
+
+ firework.launch('Configuration saved. It will get applied after next reboot', 'success', 5000);
+ }
+}
+
+
+function ShowMultiplier()
+{
+ var decimalShift = 0;
+ var multiplier;
+ var multiplier_decshift;
+ var fixedDecimals_decshift;
+ var NumberInfo = getNUMBERInfo();
+
+ var sel = document.getElementById("Numbers_value1");
+ var _number= sel.options[sel.selectedIndex].text;
+ document.getElementById("decimalShift").value = 0;
+ for (var i = 0; i < NumberInfo.length; ++i) {
+ if (NumberInfo[i]["name"] == _number) {
+ if (NumberInfo[i]["PostProcessing"]["DecimalShift"]["enabled"]) {
+ decimalShift = NumberInfo[i]["PostProcessing"]["DecimalShift"]["value1"];
+ document.getElementById("decimalShift").value = decimalShift;
+ }
+ }
+ }
+
+ multiplier = ROIInfo.length - 1 - aktindex;
+ multiplier_decshift = fixedDecimals_decshift = multiplier + Number(decimalShift);
+
+ if (multiplier_decshift > 0)
+ fixedDecimals_decshift = 0;
+
+ if (fixedDecimals_decshift < 0) {
+ fixedDecimals_decshift = -1*fixedDecimals_decshift;
+ }
+
+ document.getElementById("multiplier").value="x" + Number(10 ** multiplier).toFixed(0);
+ document.getElementById("multiplier_decshift").value="x" + Number(10 ** multiplier_decshift).toFixed(fixedDecimals_decshift);
}
@@ -316,19 +439,28 @@
Digit ROI's
{
document.getElementById("Category_Digits_enabled").checked = false;
EnDisableDigits();
- firework.launch('Digital ROIs are disabled - please enable first (Check box top left)', 'warning', 10000);
+ firework.launch('Digit ROI processing is disabled. Activate with checkbox if needed', 'warning', 10000);
return;
}
if (ROIInfo.length == 0){
- firework.launch('There are no ROIs defined. Please first create a new ROI ("New ROIs ...")', 'danger', 10000);
+ firework.launch('No digit ROIs defined in selected number sequence', 'warning', 10000);
document.getElementById("newROI").disabled = false;
document.getElementById("deleteROI").disabled = true;
- document.getElementById("index").disabled = true;
- document.getElementById("saveroi").disabled = true;
document.getElementById("renameROI").disabled = true;
+ document.getElementById("index").disabled = true;
+ document.getElementById("multiplier").style.display = "none";
+ document.getElementById("multiplier_decshift").style.display = "none";
+ document.getElementById("refx").disabled = true;
+ document.getElementById("refdx").disabled = true;
+ document.getElementById("refy").disabled = true;
+ document.getElementById("refdy").disabled = true;
+ document.getElementById("lockSizes").disabled = true;
+ document.getElementById("lockAspectRatio").disabled = true;
+ document.getElementById("lockSpaceEquidistant").disabled = true;
document.getElementById("moveNext").disabled = true;
document.getElementById("movePrevious").disabled = true;
+ document.getElementById("saveroi").disabled = false;
return;
}
else
@@ -337,6 +469,15 @@
function renameNumber(){
var sel = document.getElementById("Numbers_value1");
- var _delte= sel.options[sel.selectedIndex].text;
- var _numbernew = prompt("Please enter new name", _delte);
+ var _delete= sel.options[sel.selectedIndex].text;
+ var _numbernew = prompt("Please enter a new name for the selected number sequence", _delete);
+ if (_numbernew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
- erg = RenameNUMBER(_delte, _numbernew);
+ erg = RenameNUMBER(_delete, _numbernew);
if (erg != "")
firework.launch(erg, 'danger', 30000);
else
@@ -534,21 +694,27 @@
Digit ROI's
}
function newNumber(){
- var _numbernew = prompt("Please enter name of new number", "name");
+ var _numbernew = prompt("Please enter a name for the new number sequence", "name");
+ if (_numbernew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
erg = CreateNUMBER(_numbernew);
if (erg != "")
- firework.launch(erg, 'danger', 30000);
+ firework.launch(erg, 'danger', 30000);
else
UpdateNUMBERS(_numbernew);
}
function removeNumber(){
- if (confirm("This will remove the number complete (analog and digital).\nIf you only want to remove the digital ROIs, please use \"Delete ROIs\".\nDo you want to proceed?")) {
+ if (confirm("The entire number sequence will be removed (digit + analog parts). " +
+ "To remove single ROI of the number sequence, use \"Delete ROI\" instead.\n" +
+ "Do you really want to proceed?"))
+ {
var sel = document.getElementById("Numbers_value1");
- var _delte= sel.options[sel.selectedIndex].text;
- erg = DeleteNUMBER(_delte);
+ var _delete= sel.options[sel.selectedIndex].text;
+ erg = DeleteNUMBER(_delete);
if (erg != "")
firework.launch(erg, 'danger', 30000);
UpdateNUMBERS();
@@ -755,6 +921,7 @@
sel = document.getElementById("index");
var _roialt= sel.options[sel.selectedIndex].text;
-
- var _roinew = prompt("Please enter new name", _roialt);
+ var _roinew = prompt("Please enter a new name for the selected ROI", _roialt);
+ if (_roinew === null) {
+ return; //break out of the function early because prompt was aborted
+ }
erg = RenameROI(_number, "digit", _roialt, _roinew);
if (erg != "")
@@ -833,6 +1003,7 @@
Digit ROI's
function numberChanged()
{
+ aktindex = 0;
UpdateROIs();
}
diff --git a/sd-card/html/edit_explain_0.html b/sd-card/html/edit_explain_0.html
index 64aea8b10..c2f121297 100644
--- a/sd-card/html/edit_explain_0.html
+++ b/sd-card/html/edit_explain_0.html
@@ -1,10 +1,8 @@
-
+
-
AI on the edge
-
-
+
+
+
+
+
+
+
+
+
Step 7 / 7: Initial setup completed!
+
+
+ Congratulations! You have completed the initial setup and you are now ready to restart to the regular operation mode!
+
+
+ Once you push the button below, the setup mode will be completed and the device will be automatically restart to regular web interface.
+ If configuration is error free, the device will automatically start with first processing. It will take some time until you get the first reading.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sd-card/html/edit_explain_6.html b/sd-card/html/edit_explain_7_abort.html
similarity index 50%
rename from sd-card/html/edit_explain_6.html
rename to sd-card/html/edit_explain_7_abort.html
index 9af523025..987272b51 100644
--- a/sd-card/html/edit_explain_6.html
+++ b/sd-card/html/edit_explain_7_abort.html
@@ -1,10 +1,8 @@
-
+
-
AI on the edge
-
-
+
-
-
-
+ Reference Image
+
+
+
+
+
+
+
After saving a new Reference Image, make sure to update the Alignment Marks and then
- the digit resp. analog ROI's.
- Only after those steps a reboot is required.
-
-
-
-
-
-
-
-
-
-
-
- LEDIntensity:
-
-
-
-
-
-
-
-
- Brightness:
-
-
-
-
-
-
-
Degrees
-
- Contrast
-
-
-
-
-
-
Degrees
-
- Saturation
-
-
-
-
-
+
+ CLICK HERE for usage description. More infos in documentation:
+ Reference Image
+
+
+ The reference image is the base image on which the alignment markers, digit ROIs and anlog ROIs will be defined.
+
+
+ Firstly the actual saved reference image is shown. If you start with the setup from scratch a default image is shown as placeholder.
+ Use the button "Create New Reference" to start creation of your own reference image. After selecting the button a new image will be taken
+ all configured parameter will be applied to the shown image. With the button "Update Image" you can update the image again (still all parameter
+ get applied to the new image).
+
+
+ To have reliable evaluation processing a properly horizontal aligned evaluation area is mandatory. Using the parameters "Rotation angle" and
+ "Rotation angle (Fine-tune)" the image can be rotated in both directions. The resulting rotation anlge is used to prerotate the image before
+ the alignment algorithm is processed to compensate only small misalignments. Further information can be found in documenation:
+ Reference Image
+
+
+ After setting up your reference image don't forget to save with the "Save New Reference" button!
+ NOTE: There is no need to perform a reboot after every saving or step. It's sufficient to reboot after all configuration steps
+ (reference image, alignment, ROI configuration) are completed to activate new configuration.
+
-
diff --git a/sd-card/html/explain_1.html b/sd-card/html/explain_1.html
index 0a15e9db9..da6785b08 100644
--- a/sd-card/html/explain_1.html
+++ b/sd-card/html/explain_1.html
@@ -1,34 +1,33 @@
-
+
+
-
AI on the edge
-
-
+
-
Step 1: Define a Reference Image
-The reference image is the base to define the digits, counters and references positions.
-
- Firstly you see the default image. Use the Button "Create New Reference" to start to create your own reference image.
- 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.
-
-
- Don't forget to save your changes with the "Save" button!
-
+
Step 1 / 7: Adjust Focus And Verify Flashlight
+ Firstly you have find a proper mounting position and potentially have to adjust the focus of the camera lens to get a sharp and crisp image.
+ This live stream with flashlight on could be helpful for this task. More details about adjusting the camera lens can be found here:
+ Focus Adjustment
+ Additionally it should be verfied that the flashlight is not creating any distrubing reflection in the processing relevant areas.
+ Beside using the built-in internal flash LED it's also possible to attach additional external LEDs to the device to have more possiblities
+ to get proper light condition. Please read the documentation if you'd like to use extenal LEDs:
+ Installation Of External LEDs
+
+ NOTE: The flashlight indensity is set to default (50%) for initial verfication in this step and can be modified in next step. After modification
+ you can come back to this step if you'd like to test with adjusted light intensity.
+ The live stream can also be called at any time also after setup mode is completed on regular web interface.
+
diff --git a/sd-card/html/explain_2.html b/sd-card/html/explain_2.html
index 76812db63..8187889f0 100644
--- a/sd-card/html/explain_2.html
+++ b/sd-card/html/explain_2.html
@@ -1,34 +1,21 @@
-
+
+
-
AI on the edge
-
-
+
-
Step 2: Define two Alignment Marks
-Two opposite alignment marks are needed to identify unique fix points on the image.
-
- Mark the reference by drag and dop with the mouse or with the coordinates and push "Update Reference".
-
- You can switch between the two reference with "Select Reference".
-
-
- Don't forget to save your changes with the "Save" button!
-
+
Step 2 / 7: Create A Reference Image
diff --git a/sd-card/html/explain_3.html b/sd-card/html/explain_3.html
index 8742a8ac9..860cae34f 100644
--- a/sd-card/html/explain_3.html
+++ b/sd-card/html/explain_3.html
@@ -1,36 +1,21 @@
-
+
+
-
AI on the edge
-
-
+
-
Step 3: Define ROI's for your Digits
-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 "Number" selector. There you can also define new numbers.
-
- With the drop down menue "ROI x" you can change between the different digits. Mark them with the mouse or the coordinates.
-
- To create new ROIs use "New ROIs". The order of the ROIs defines the positon within the reading.
- You can change it with "move Next" / "move Previous".
-
-
- Don't forget to save your changes with the "Save" button!
-
+
Step 3 / 7: Definement Of Alignment Marker
diff --git a/sd-card/html/explain_4.html b/sd-card/html/explain_4.html
index 0fbb9e544..1df0c15ad 100644
--- a/sd-card/html/explain_4.html
+++ b/sd-card/html/explain_4.html
@@ -1,35 +1,21 @@
-
+
+
-
AI on the edge
-
-
+
-
Step 4: Define ROI's for your Analog Counters
-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 "Number" selector. There you can also define new numbers. If you do not have analog counters delete all ROIs.
-
- With the drop down menue "ROI x" you can change between the different counters. Mark them with the mouse or the coordinates.
-
- To create new ROIs use "New ROIs". The order of the ROIs defines the positon within the reading.
- You can change it with "move Next" / "move Previous".
-
-
- Don't forget to save your changes with the "Save" button!
-
+
Step 4 / 7: Configuration Of ROIs For Digit Numbers
diff --git a/sd-card/html/explain_5.html b/sd-card/html/explain_5.html
index 4c1ddd631..2610fa465 100644
--- a/sd-card/html/explain_5.html
+++ b/sd-card/html/explain_5.html
@@ -1,31 +1,21 @@
-
+
+
-
AI on the edge
-
-
+
-
-
Step 5: General Configuration Settings
-
Here you can define additional settings. The default settings should fit for a normal/initial setup.
-
You will also be able to change them later, so don't worry if you do not understand the parameters yet!
-
-
- Don't forget to save your changes with the "Save" button!
-
+
Step 5 / 7: Configuration Of ROIs For Analog Counters
-
+
\ No newline at end of file
diff --git a/sd-card/html/explain_6.html b/sd-card/html/explain_6.html
index 7fbc484a4..29020f5ea 100644
--- a/sd-card/html/explain_6.html
+++ b/sd-card/html/explain_6.html
@@ -1 +1,23 @@
-
\ No newline at end of file
+
+
+
+
+AI on the edge
+
+
+
+
+
+
+
+
Step 6 / 7: Configuration Page: List Of All Parameters
+
+ NOTE: All parameter can be edited later in the regular web interface. So don't worry if you do not understand the parameters yet!
+
+
+
diff --git a/sd-card/html/explain_7.html b/sd-card/html/explain_7.html
new file mode 100644
index 000000000..7fbc484a4
--- /dev/null
+++ b/sd-card/html/explain_7.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/sd-card/html/file_server.html b/sd-card/html/file_server.html
index 51cf37c5a..591892667 100644
--- a/sd-card/html/file_server.html
+++ b/sd-card/html/file_server.html
@@ -1,9 +1,15 @@
-
+
+
-
-
\ No newline at end of file
diff --git a/sd-card/html/timezones.html b/sd-card/html/timezones.html
index 90cd52494..410c84ced 100644
--- a/sd-card/html/timezones.html
+++ b/sd-card/html/timezones.html
@@ -1,5 +1,5 @@
-
+