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:
+
-
-
-
-
+
+
+
+
+
Reference Image:
+
+
+
+
+
+
+
+
-
-
-
-
Proceed to update the digit resp. analog ROI's when you are done.
-
-
@@ -130,10 +164,15 @@ function ChangeSelection(){
}
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 @@ function EnhanceContrast(){
enhanceCon = true;
if (MakeContrastImageZW(refInfo[aktindex], enhanceCon, domainname)) {
UpdateReference();
+ document.getElementById("enhancecontrast").disabled = true;
}
}
@@ -174,7 +214,6 @@ function UpdateReference(){
document.getElementById("refy").value = refInfo[aktindex]["y"];
rect.startX = document.getElementById("refx").value;
rect.startY = document.getElementById("refy").value;
- document.getElementById("enhancecontrast").disabled = true;
draw();
}
@@ -215,14 +254,27 @@ function dataURLtoBlob(dataurl) {
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() {
+ function init() {
+ openDescription();
domainname = getDomainname();
loadConfig(domainname);
ParseConfig();
param = getConfigParameters();
+ document.getElementById("savemarker").disabled = true;
+ document.getElementById("enhancecontrast").disabled = true;
+
canvas.addEventListener('mousedown', mouseDown, false);
canvas.addEventListener('mouseup', mouseUp, false);
canvas.addEventListener('mousemove', mouseMove, false);
@@ -235,6 +287,8 @@ function dataURLtoBlob(dataurl) {
drawImage();
}
+
+
function drawImage(){
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
@@ -254,6 +308,7 @@ function dataURLtoBlob(dataurl) {
if (MakeRefZW(refInfo[aktindex], domainname)) {
UpdateReference();
document.getElementById("enhancecontrast").disabled = false;
+ document.getElementById("savemarker").disabled = false;
}
}
diff --git a/sd-card/html/edit_analog.html b/sd-card/html/edit_analog.html
index d1641370..a3993d78 100644
--- a/sd-card/html/edit_analog.html
+++ b/sd-card/html/edit_analog.html
@@ -1,142 +1,221 @@
-
+
-
-
-Analog ROI's
+
+ Analog ROI
-
+
+
+
+
-#div2{
- background-color:#777;
- margin-bottom:20px;
-}
-.disabledDiv {
- pointer-events: none;
- opacity: 0.4;
-}
-
-
-
-
-
+
+ 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:
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
x:
-
Δx:
-
-
-
-
y:
-
Δy:
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Number Sequence:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ROI:
+
+
+
+
+
+
+
+
+
Multiplier:
+ (only based on order)
+
+
Multiplier:
+ (order + decimal shift: )
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
x:
+
Δx:
+
+
+
+
y:
+
Δy:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Reference Image:
+
+
+
+
+
+
+
@@ -158,16 +237,15 @@ th, td {
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 EnDisableAnalog() {
sah1(document.getElementById("div1"), !isEnabled);
-
cofcat["Analog"]["enabled"] = isEnabled;
-
+ document.getElementById("saveroi").disabled = false;
+
if (isEnabled)
{
UpdateROIs();
@@ -212,6 +290,10 @@ function onNameChange(){
}
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 @@ function deleteROI(){
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 @@ function changeCCW(){
ROIInfo[aktindex]["CCW"] = "true";
else
ROIInfo[aktindex]["CCW"] = "false";
- UpdateROIs();
+
+ UpdateROIs();
+
}
function ChangeSelection(){
@@ -285,11 +372,47 @@ function ChangeSelection(){
}
function SaveToConfig(){
-// _zwcat = getConfigCategory();
- cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_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 analog ROI configuration?")) {
+ //_zwcat = getConfigCategory();
+ cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_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 = multiplier_decshift = aktindex+1-Number(decimalShift);
+ var fixedDecimals = fixedDecimals_decshift = aktindex+1;
+ var NumberInfo = getNUMBERInfo();
+
+ var sel = document.getElementById("Numbers_value1");
+ var _number= sel.options[sel.selectedIndex].text;
+ var NumbersIndex = 0;
+ for (var i = 0; i < NumberInfo.length; ++i)
+ if (NumberInfo[i]["name"] == _number)
+ NumbersIndex = i;
+
+ if (NumberInfo[NumbersIndex]["PostProcessing"]["DecimalShift"]["enabled"]) {
+ decimalShift = NumberInfo[NumbersIndex]["PostProcessing"]["DecimalShift"]["value1"];
+ document.getElementById("decimalShift").value=decimalShift;
+ multiplier_decshift = aktindex+1-Number(decimalShift);
+ fixedDecimals_decshift = fixedDecimals_decshift-Number(decimalShift); // set to fixed decimals to avoid rounding issues
+
+ if (fixedDecimals_decshift < 0)
+ fixedDecimals_decshift = 0;
+ }
+ else {
+ document.getElementById("decimalShift").value=0;
+ }
+
+ document.getElementById("multiplier").value="x" + Number(10 ** (-1*multiplier)).toFixed(fixedDecimals);
+ document.getElementById("multiplier_decshift").value="x" + Number(10 ** (-1*multiplier_decshift)).toFixed(fixedDecimals_decshift);
}
@@ -305,19 +428,28 @@ function UpdateROIs(_sel){
{
document.getElementById("Category_Analog_enabled").checked = false;
EnDisableAnalog();
- firework.launch('Analog ROIs are disabled - please enable first (Check box top left)', 'warning', 10000);
+ firework.launch('Analog 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 analog 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("CCW").disabled = true;
document.getElementById("moveNext").disabled = true;
document.getElementById("movePrevious").disabled = true;
+ document.getElementById("saveroi").disabled = false;
return;
}
else
@@ -326,6 +458,15 @@ function UpdateROIs(_sel){
document.getElementById("deleteROI").disabled = false;
document.getElementById("renameROI").disabled = false;
document.getElementById("index").disabled = false;
+ document.getElementById("multiplier").style.display = "";
+ document.getElementById("multiplier_decshift").style.display = "";
+ document.getElementById("refx").disabled = false;
+ document.getElementById("refdx").disabled = false;
+ document.getElementById("refy").disabled = false;
+ document.getElementById("refdy").disabled = false;
+ document.getElementById("lockSizes").disabled = false;
+ document.getElementById("lockAspectRatio").disabled = false;
+ document.getElementById("CCW").disabled = false;
document.getElementById("saveroi").disabled = false;
}
@@ -335,7 +476,7 @@ function UpdateROIs(_sel){
}
if (aktindex > ROIInfo.length)
- aktindex = ROIInfo.length;
+ aktindex = ROIInfo.length-1;
for (var i = 0; i < ROIInfo.length; ++i){
var option = document.createElement("option");
@@ -358,7 +499,9 @@ function UpdateROIs(_sel){
document.getElementById("moveNext").disabled = false;
if (aktindex == (ROIInfo.length-1)){
document.getElementById("moveNext").disabled = true;
- }
+ }
+
+ ShowMultiplier();
document.getElementById("lockAspectRatio").checked = lockAspectRatio;
document.getElementById("lockSizes").checked = lockSizes;
@@ -373,8 +516,7 @@ function UpdateROIs(_sel){
rect.startY = ROIInfo[aktindex]["y"];
rect.w = ROIInfo[aktindex]["dx"];
rect.h = ROIInfo[aktindex]["dy"];
- draw();
-
+ draw();
}
function loadCanvas(dataURL) {
@@ -404,10 +546,20 @@ function UpdateROIs(_sel){
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 +592,12 @@ function UpdateROIs(_sel){
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 +636,13 @@ function UpdateNUMBERS(_sel){
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 +650,10 @@ function renameNumber(){
}
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 +664,13 @@ function newNumber(){
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 +738,12 @@ function drawTextBG(context, txt, x, y, padding) {
var dx = parseInt(ROIInfo[_nb].dx) + parseInt(lw);
var dy = parseInt(ROIInfo[_nb].dy) + parseInt(lw);
context.strokeRect(x0, y0, dx, dy);
- drawTextBG(context, ROIInfo[_nb]["name"], x0+dx/2-0.5, y0-13, 5);
-
+
+ if (ROIInfo[_nb]["CCW"] != "true")
+ drawTextBG(context, ROIInfo[_nb]["name"], x0+dx/2-0.5, y0-13, 5);
+ else
+ drawTextBG(context, ROIInfo[_nb]["name"]+" (CCW)", x0+dx/2-0.5, y0-13, 5);
+
lw = 1;
var x0 = parseInt(ROIInfo[_nb].x) - parseInt(lw/2);
var y0 = parseInt(ROIInfo[_nb].y) - parseInt(lw/2);
@@ -602,8 +768,13 @@ function drawTextBG(context, txt, x, y, padding) {
var y0 = parseInt(rect.startY) - parseInt(lw/2);
var dx = parseInt(rect.w) + parseInt(lw);
var dy = parseInt(rect.h) + parseInt(lw);
- context.strokeRect(x0, y0, dx, dy);
- drawTextBG(context, ROIInfo[aktindex]["name"], x0+dx/2, y0-11, 5);
+ context.strokeRect(x0, y0, dx, dy);
+
+ if (ROIInfo[aktindex]["CCW"] != "true")
+ drawTextBG(context, ROIInfo[aktindex]["name"], x0+dx/2, y0-11, 5);
+ else
+ drawTextBG(context, ROIInfo[aktindex]["name"] + " (CCW)", x0+dx/2, y0-11, 5);
+
context.lineWidth = 1;
context.beginPath();
context.arc(x0+dx/2, y0+dy/2, dx/2, 0, 2 * Math.PI);
@@ -706,6 +877,7 @@ function drawTextBG(context, txt, x, y, padding) {
rect.startY = document.getElementById("refy").value;
draw();
}
+ document.getElementById("saveroi").disabled = false;
}
function valuemanualchangeddx(){
@@ -721,6 +893,7 @@ function drawTextBG(context, txt, x, y, padding) {
rect.startY = document.getElementById("refy").value;
draw();
}
+ document.getElementById("saveroi").disabled = false;
}
@@ -730,8 +903,10 @@ function drawTextBG(context, txt, x, y, padding) {
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 +917,15 @@ function drawTextBG(context, txt, x, y, padding) {
function numberChanged()
{
+ aktindex = 0;
UpdateROIs();
}
-
init();
+
+
diff --git a/sd-card/html/edit_check.html b/sd-card/html/edit_check.html
deleted file mode 100644
index 27ca5012..00000000
--- a/sd-card/html/edit_check.html
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
-
-Check
-
-
-
-
-
-
-
-
-
Result:
-
-
-
-
-
-
-
-
-
-
-
-
- Takes up to 2 Minutes!
-
- Digits and Analog recognition not yet implemented.
-
+
+ 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.
+
+
+
+
-
-
-
- Parameter
-
-
- Value
-
-
- Documentation
-
-
+
-
-
TakeImage
+
+
+
+
+
+
+
+
+
+
Configuration View
-
+
+
+
+
+
+
+
+
+
+
+
Take Image
+
+
+
+
+
-
+
$TOOLTIP_TakeImage_RawImagesLocation
+
-
+
- Days
+ Days
$TOOLTIP_TakeImage_RawImagesRetention
-
+
+
@@ -172,25 +264,31 @@ textarea {
$TOOLTIP_TakeImage_Demo
+
Wait Before Taking Picture
- Seconds
+ Seconds
$TOOLTIP_TakeImage_WaitBeforeTakingPicture
+
Image Quality
-
+
$TOOLTIP_TakeImage_ImageQuality
+
Image Size
@@ -209,7 +307,9 @@ textarea {
LED Intensity
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 @@ textarea {
$TOOLTIP_MQTT_HomeassistantDiscovery
-
-
+
+
+
-
+
@@ -661,34 +812,38 @@ textarea {
-
-
+
+
+
-
For InfluxDB v2.x see below [InfluxDBv2]
+
-
-
+
+
+
-
+
$TOOLTIP_InfluxDB_Uri
-
+
+
-
+
$TOOLTIP_InfluxDB_Database
-
+
+
@@ -698,7 +853,8 @@ textarea {
$TOOLTIP_InfluxDB_user
-
+
+
@@ -708,66 +864,71 @@ textarea {
$TOOLTIP_InfluxDB_password
-
-
-
- InfluxDB Individual Parameters:
-
-
+
+
+
+ Parameter per number sequence:
+
+
-
-
+
+
+
-
+
$TOOLTIP_InfluxDB_NUMBER.Measurement
-
-
+
+
+
-
+
$TOOLTIP_InfluxDB_NUMBER.Field
-
-
-
-
+
+
+
-
For InfluxDB v1.x see above [InfluxDBv1]
+
-
-
+
+
+
-
+
$TOOLTIP_InfluxDBv2_Uri
-
+
+
-
+
$TOOLTIP_InfluxDBv2_Database
-
+
+
@@ -777,7 +938,8 @@ textarea {
$TOOLTIP_InfluxDBv2_Org
-
+
+
@@ -787,51 +949,52 @@ textarea {
$TOOLTIP_InfluxDBv2_Token
-
-
-
- InfluxDB v2 Individual Parameters:
-
-
+
+
+
+ Parameter per number sequence:
+
+
-
-
+
+
+
-
+
$TOOLTIP_InfluxDBv2_NUMBER.Measurement
-
-
+
+
+
-
+
$TOOLTIP_InfluxDBv2_NUMBER.Field
-
-
+
+
+
+
-
-
-
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%).
+
+
+ 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.
-
-
+
+
+
+
+
+
+
+
Reference Image:
+
+
+
+
+
+
@@ -183,6 +258,7 @@ function EnDisableDigits() {
sah1(document.getElementById("div1"), !isEnabled);
cofcat["Digits"]["enabled"] = isEnabled;
+ document.getElementById("saveroi").disabled = false;
if (isEnabled)
{
@@ -208,6 +284,10 @@ function onNameChange(){
}
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 @@ function newROI() {
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 @@ function newROI() {
parseInt(ROIInfo[sel.selectedIndex].y), ROIInfo[aktindex]["dx"], ROIInfo[aktindex]["dy"], 0);
}
else
- erg = CreateROI(_number, "digit", sel.selectedIndex, _roinew, 1, 1, 30, 51, 0);
+ erg = CreateROI(_number, "digit", sel.selectedIndex, _roinew, 15, 30, 30, 51, 0);
if (erg != "")
firework.launch(erg, 'danger', 30000);
@@ -274,7 +357,7 @@ function changelockSizes(){
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,56 @@ function ChangeSelection(){
}
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 negShift = false;
+ var multiplier = multiplier_decshift = ROIInfo.length-1-aktindex;
+ var fixedDecimals_decshift = ROIInfo.length-1-aktindex;
+ var NumberInfo = getNUMBERInfo();
+
+ var sel = document.getElementById("Numbers_value1");
+ var _number= sel.options[sel.selectedIndex].text;
+ var NumbersIndex = 0;
+ for (var i = 0; i < NumberInfo.length; ++i)
+ if (NumberInfo[i]["name"] == _number)
+ NumbersIndex = i;
+
+ if (NumberInfo[NumbersIndex]["PostProcessing"]["DecimalShift"]["enabled"]) {
+ decimalShift = NumberInfo[NumbersIndex]["PostProcessing"]["DecimalShift"]["value1"];
+ document.getElementById("decimalShift").value=decimalShift;
+ multiplier_decshift = multiplier_decshift+Number(decimalShift);
+ fixedDecimals_decshift = fixedDecimals_decshift+Number(decimalShift); // set to fixed decimals to avoid rounding issues
+
+ if (fixedDecimals_decshift < 0) {
+ negShift = true
+ fixedDecimals_decshift = -1*fixedDecimals_decshift;
+ }
+ }
+ else {
+ document.getElementById("decimalShift").value=0;
+ }
+
+ if (!negShift) {
+ document.getElementById("multiplier").value="x" + Number(10 ** multiplier).toFixed(0);
+ document.getElementById("multiplier_decshift").value="x" + Number(10 ** multiplier_decshift).toFixed(0);
+ }
+ else {
+ 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 +444,28 @@ function UpdateROIs(_sel){
{
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 +474,15 @@ function UpdateROIs(_sel){
document.getElementById("deleteROI").disabled = false;
document.getElementById("renameROI").disabled = false;
document.getElementById("index").disabled = false;
+ document.getElementById("multiplier").style.display = "";
+ document.getElementById("multiplier_decshift").style.display = "";
+ document.getElementById("refx").disabled = false;
+ document.getElementById("refdx").disabled = false;
+ document.getElementById("refy").disabled = false;
+ document.getElementById("refdy").disabled = false;
+ document.getElementById("lockSizes").disabled = false;
+ document.getElementById("lockAspectRatio").disabled = false;
+ document.getElementById("lockSpaceEquidistant").disabled = false;
document.getElementById("saveroi").disabled = false;
}
@@ -346,7 +492,7 @@ function UpdateROIs(_sel){
}
if (aktindex > ROIInfo.length)
- aktindex = ROIInfo.length;
+ aktindex = ROIInfo.length-1;
for (var i = 0; i < ROIInfo.length; ++i){
var option = document.createElement("option");
@@ -369,7 +515,9 @@ function UpdateROIs(_sel){
document.getElementById("moveNext").disabled = false;
if (aktindex == (ROIInfo.length-1)){
document.getElementById("moveNext").disabled = true;
- }
+ }
+
+ ShowMultiplier();
document.getElementById("lockAspectRatio").checked = lockAspectRatio;
document.getElementById("lockSizes").checked = lockSizes;
@@ -390,7 +538,7 @@ function UpdateROIs(_sel){
rect.startY = ROIInfo[aktindex]["y"];
rect.w = ROIInfo[aktindex]["dx"];
rect.h = ROIInfo[aktindex]["dy"];
- draw();
+ draw();
}
function loadCanvas(dataURL) {
@@ -420,8 +568,20 @@ function UpdateROIs(_sel){
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);
@@ -481,6 +641,8 @@ function UpdateROIs(_sel){
document.getElementById("space").value = space;
}
+ document.getElementById("saveroi").disabled = true;
+
drawImage();
draw();
}
@@ -523,10 +685,13 @@ function UpdateNUMBERS(_sel){
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 +699,27 @@ function renameNumber(){
}
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 +926,7 @@ function draw() {
}
draw();
}
+ document.getElementById("saveroi").disabled = false;
}
function valuemanualchangeddx(){
@@ -780,6 +952,7 @@ function draw() {
draw();
}
+ document.getElementById("saveroi").disabled = false;
}
function valuemanualchangedspace(){
@@ -821,8 +994,10 @@ function draw() {
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 +1008,7 @@ function draw() {
function numberChanged()
{
+ aktindex = 0;
UpdateROIs();
}
diff --git a/sd-card/html/edit_explain_0.html b/sd-card/html/edit_explain_0.html
index 64aea8b1..c2f12129 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.
+
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.
+
+ 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 all configured parameter
+ will be applied to the shown image. With the button "Update Image" you can update the image (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.
+
@@ -102,7 +177,6 @@ table {
-
diff --git a/sd-card/html/explain_1.html b/sd-card/html/explain_1.html
index 0a15e9db..da6785b0 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 76812db6..8187889f 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 8742a8ac..860cae34 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 0fbb9e54..1df0c15a 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 4c1ddd63..2610fa46 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 7fbc484a..29020f5e 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 00000000..7fbc484a
--- /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 51cf37c5..59189266 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 90cd5249..410c84ce 100644
--- a/sd-card/html/timezones.html
+++ b/sd-card/html/timezones.html
@@ -1,5 +1,5 @@
-
+