This commit is contained in:
CaCO3
2023-02-21 01:39:50 +01:00
parent c098a63849
commit be7cd69ee7
12 changed files with 254 additions and 346 deletions

33
docs/Alignment.md Normal file
View File

@@ -0,0 +1,33 @@
# Alignment References
The alignment references are used in every round to re-align the taken image to the reference coordinates.
Two alignment structures must be defined and the taken image then in each round is shifted and rotated according to their position
with the target to be in exactly the same position as the reference image.
!!! Note
The alignment structures needs to be unique and have a good contrast.
It is advised to have them as far apart as possible.
## Precondition
Please make sure to have setup your camera properly and taken a good [Reference Image](../Reference-Image).
## Define two Reference Images
![](img/initial_setup_2_alignment_marks.jpg){: style="width:500px"}
You can switch between this two marks with `(1)`.
Then define the reference area in the image by either directly drag and drop with the mouse or use the input boxes below.
To apply the currently marked image part you need to push `"Update Reference" (2)`.
In some cases it might be useful to use a reference with a higher contrast. This can be achieved by pushing `Enhance Contrast" (3)`.
The result will be calculated on the ESP32 - so be a bit patient, before you see it active.
To save push `"Save to config.ini" (4)`.
!!! Note
A reboot is not required at this point of time.
As next you should define the [Digit and Analog ROIs](ROI-Configuration.md).

View File

@@ -1,74 +1,63 @@
# Configuration
# Graphical Configuration
Most of the settings can be modified on the Settings page:
!!! Warning
This page overlaps [Graphical-Configuration](../Graphical-Configuration). They should be merged to one page!
<img src="../img/config_s1_access.jpg" width="600" align="middle">
It can be reached via the menu `Settings > Configuration`.
Most of the settings can be modified with the help of a web based [graphical user interface](Graphical-configuration). This is hosted through the web server on the ESP32.
!!! Note
- To activate the changes, the device needs to be restarted after saving the changes.
- Most of the commands need processing on the ESP32 device. This is not very fast - so please be patient.
More configuration parameters can be edited by hand in the `config.ini` and corresponding files in the `/config` directory on the SD-card.
All parameters are documented on the [Parameters](../Parameters) page and as tooltips on the config page.
## Expert Parameters
Some parameters are treated as **Expert Parameters** and are hidden by default.
Tick the checkbox in the top left corner to enable them:
![](../img/expert-parameters.png)
If you where using the Version 1 of the water meter you can easily transfer the configuration to the new system by following the steps in this [migration description](outdated--Migrate-Old-Config-To-New-Config.md)
The **Expert Parameters** then will be shown with a red background:
![](../img/expert-parameters2.png)
## Manual Editing of the Config File
Even more configuration parameters can be edited manually in the `config.ini`:
![](../img/manual-config-editing.png)
## Processing / Config.ini principle
To edit the `config.ini` file directly, click on the `Edit Config.ini directly` button.
## Background Information
!!! Note
You do not need to understand this!
But you might be interested in it.
The principle is very simple and can most easily be described as a flow of processing steps. Each step has a dedicated parameter description in the ``config.ini``, which is indicated by brackets ```[name_of_step]```. The steps are processed in the order written in the config file. That means, that you first have to describe the image taking, then the aligning and cutting and only after that you can start to config a neural network. The last step is the post processing.
### Processing steps - Overview
In the following you get a short overview over the available steps. This order is also the suggested order for the processing flow. Single steps can be left out, if not needed (e.g. omit the analog part, if only digits are present)
#### 1. ``[MakeImage]``
* This steps parametrises the taking of the image by the ESP32-CAM. Size, quality and storage for logging and debugging can be set.
#### 1. ``[TakeImage]``
This steps parametrises the taking of the image by the ESP32-CAM. Size, quality and storage for logging and debugging can be set.
#### 2. ``[Alignment]``
* Image preprocessing, including image alignment with reference images
Image preprocessing, including image alignment with reference images
#### 3. ``[Digits]``
* Neural network evaluation of an image for digits. The neural network is defined by a tflite formatted file and the output is a number between 0 .. 9 or NaN (if image is not unique enough)
Neural network evaluation of an image for digits. The neural network is defined by a tflite formatted file and the output is a number between 0 .. 9 or NaN (if image is not unique enough)
#### 4. ``[Analog]``
- Neural network evaluation of analog counter. The neural network is defined by a tflite formatted file and the output is a number between 0.0 .. 9.9, representing the position of the pointer.
Neural network evaluation of analog counter. The neural network is defined by a tflite formatted file and the output is a number between 0.0 .. 9.9, representing the position of the pointer.
#### 5. ``[PostProcessing]``
- Summarized the individually converted pictures to the overall result. It also implements some error corrections and consistency checks to filter wrong reading.
Summarized the individually converted pictures to the overall result. It also implements some error corrections and consistency checks to filter wrong reading.
#### 6. ``[MQTT]``
- Transfer of the readings to a MQTT server.
Transfer of the readings to a MQTT server.
#### 7. ``[AutoTimer]``
- Configuration of the automated flow start at the start up of the ESP32.
Configuration of the automated flow start at the start up of the ESP32.
#### 8. ``[Debug]``
- Configuration for debugging details
#### 9. ``[Ende]``
- No meaning, just an additional indication, that the configuration is finished.
**A detailed parameter description can be found here: [[Configuration Parameter Details]].**
## Graphical configuration interface
It is recommended to do the configuration of the alignment structures and ROIs through the graphical user interface. A step by step instruction can be found here: [[Graphical Configuration]]
## Background for Image Alignment
Details on the image recognition flow can be found in the other project here: https://github.com/jomjol/water-meter-system-complete/blob/master/images/Alignment_procedure_draft.pdf
The ```config.ini``` here has the same functionality and options, but a slightly different syntax due to a own written ini-parser is used. Migration see [here](outdated--Migrate-Old-Config-To-New-Config.md).
Configuration for debugging details

View File

@@ -1,20 +1,7 @@
# Graphical Configuration
!!! Warning
This page overlaps [Configuration](../Configuration). They should be merged to one page!
### **General remark:**
- to activate the changes, currently the device needs a restart after saving the changes.
- partially the commands needs processing on the ESP32 device. This is not very fast - so please be patient.
## Access to the graphical user interface
The graphical configuration mode can be reached via the "Edit Configuration" button in the main menu (`/index.html`):
* <img src="img/config_s1_access.jpg" width="600" align="middle">
!!! ERROR
This page is outdated!
## Overview function
@@ -37,8 +24,7 @@ This is a text editor for the config.ini. Changes committed with the button on t
* <img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/config_s2_edit_config.jpg" width="600" align="middle">
Details see [Configuration-Parameter-Details](../Configuration-Parameter-Details).
Details see [Parameters](../Parameters).
### 2a. Create Reference Image
@@ -98,9 +84,6 @@ In order to have a good recognition, the active ROI has two rectangles for align
* The line in the middle should go through the middle of the number (in case it is not moving in or out)
To save the result push "Save all to config.ini" (4).
To save the result push `"Save all to config.ini" (4)`.
**:bangbang: Attention:** Currently you have to reboot the ESP32 to take the changes in the `config.ini` to take place.
This steps are running on the ESP32 directly. So be patient with the results.
A reboot is required to apply the changed configuration!

View File

@@ -1,51 +1,125 @@
# ROI (Region of Interest)
General remark:
> You are using a neural network approach which is trained to fit as many different type of meters as possible. The accuracy will never be 100%. It is normal to see a missing reading once in a while. There there are several precautions to detect this. For details see the section `PostProcessing` on the configuration page.
!!! Notes
You are using a neural network approach which is trained to fit as many different type of meters as possible.
The accuracy will never be 100%. It is normal to see a missing reading once in a while.
There are several precautions to detect this. For details see the section `PostProcessing` on the configuration page.
The most critical settings for accurate detection are:
The most critical components for an accurate detection are:
1. Correct setting of the **R**egions **O**f **I**nterest (ROIs) for detection of the image.
> This must be done manually for each meter!
2. Number type is part of the training set.
> Have a look on the [Digital Counters](https://jomjol.github.io/neural-network-digital-counter-readout/) resp. [Analog Needles](https://jomjol.github.io/neural-network-analog-needle-readout) to check if your types are contained. If your number types are **not** contained, you should take the effort to record them so we can add them to the training data. See: [Learn models with your own images](../Learn-models-with-your-own-images) on how to create new input.
_____
**This must be done manually for each device/installation!**
## Correct Setup of ROI
Please proceed in the following order!
2. Well trained Models.
Don't forget to save after each step!
Have a look on the [Digital Counters](https://jomjol.github.io/neural-network-digital-counter-readout/) resp. [Analog Needles](https://jomjol.github.io/neural-network-analog-needle-readout) to check if your types are contained. If your number types are **not** contained, you should take the effort to record them so we can add them to the training data. See [Collect images to improve the models](../Learn-models-with-your-own-images) on how to collect new training data.
### Image Sharpness
Ensure a sharp image of the camera by adjusting the focal length of the ESP OV2640 camera. **Adjust the focus for the clearest possible image!**
In order to use it for reading a meter, the focal-length of the OV2640 camera has to be manipulated, as by default it only results in sharp image for distance bigger than ~40cm, causing the image of the water meter to be too small for automated readout processing.
## Precondition
Please make sure to have:
**ATTENTION:** this modification will void any warranty, as the sealing of the lens objective is broken!
1. Setup your camera properly and taken a good [Reference Image](../Reference-Image).
1. Selected good [Alignment References](../Alignment).
**ATTENTION:** This modification will render the camera unsuitable for general, web-cam type applications unless the focal length is changed back to the original setting.
![](img/focus_adjustment.jpg)
## Define the ROIs
For each digit or analog pointer, a ROI must be defined.
Remove the fixing glue of the OV2640 lens with a sharp knife. After this you can screw the lens in and out. Rotating it by about a quarter of a turn counterclockwise results in a focus plane of about 10cm. You need to figure out your best setting with a little bit of trial and error for your specific environment.
You can even have multiple independent **Numbers** (eg. electerical meters mostly have 2 numbers for the high and low tariff).
### Horizontal Alignment
Ensure an **exact horizontal alignment** of the number via the alignment / reference setup:
Depending if you have only one of those types, you can `enable/disable (1)` it on the top left corner:
| :heavy_check_mark: Okay | :x: Not Okay |
| ------------------------------ | ---------------------------------- |
| ![](img/alignment_okay.jpg) | ![](img/alignment_not_okay.jpg) |
![](img/initial_setup_3_rois.jpg){: style="width:500px"}
### Correct Size for ROI
Choose the right size of the ROI:
> The configuration of ROIs differs a bit on the model you choose. Below you find the differences between the different AI models. Pick the one you think fits best your purpose. If you don't get to good result, try another model.
You can switch between the ROIs with the `Drop down box (2)`. If you need additional ROIs or delete them you can do this with the `control at (2)`.
### Model Selection
#### dig-class11 Configuration
dig-class11 - Models recognize the **complete digit only**. Here it is not relevant if the ROI fits the Border of the digit window.
!!! Warning
The order of the ROIs defines how the individual digits are combined to the total number. The first ROI is the digit with the highest order (left side), then the second and so on. You can control the order in the selector tab and change it with the buttons `"move Next"` or `"move Previous"`.
For this model, there should be a border of 20% of the image size around the number itself. This border is shown in the ROI setup image by the inner thinner rectangle. This rectangle should fit perfectly around the number when the number has not started to rotate to the next position:
TODO rework
As for the reference images you can change position, size and name of the ROI in the text fields or define them via drag and drop through the mouse button.
In most cases the digits are ordered in a equidistantly and have the same size, you can synchronize them with the `control in (4)`.
Don' t forget to save the settings with "Save" and do not reboot at this stage.
### Detail for ROI configuration - Analog Meters
For analog meters the ROI setting is rather straight forward as the meter is usually quadratic with a clear center. The circle should exactly fit to the outer size of the meter and the cross should be in the middle.
Here is an example with the details for the ROI "ana1":
![](img/initial_setup_3_analog_example.jpg){: style="width:500px"}
### Detail for ROI configuration - Digital Meters
For the digital meters it is a little bit more complicated, as there are different options of digital models, that you can choose.
1. Digital meter, that only recognized full digits (0, 1, 2, 3, ... 9) - Naming: `dig-class11-....tfl`
**Advantage:** broad variety of types included in the training
**Disadvantage:** partially rotated numbers cannot be detected
2. Model with sub-digit resolution (0.0, 0.1, 0.2, .... 9.8, 9.9) - Naming: `dig-cont-....tfl` or `dig-class100-....tfl`
**Advantage:** partial numbers can be detected and a better post processing is possible
**Disadvantage:** only limited types of meter types are trained due to the high effort for the training data
Details and the corresponding "perfect" setting is explained here: [Details ROI Configuration](https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/)
For a first run you can choose the following general settings:
* There is an inner and an outer frame for the ROIs.
* Make the inner frame exactly the size of the number.
| |Example 1|Example 2|
|---|---|---|
| :heavy_check_mark: **Okay** | ![](img/cont_img_ok.png){: style="width:80px"} | ![](img/wb_okay.jpg){: style="width:80px"} |
| :x: **Not** Okay | ![](img/bw_not_okay_small.jpg){: style="width:80px"} | ![](img/wb_not_okay_small.jpg){: style="width:80px"} |
| :x: **Not** Okay | ![](img/bw_not_okay_big.jpg){: style="width:80px"}| ![](img/wb_not_okay_big.jpg){: style="width:80px"}|
## Correct Size for ROI
Choose the right size of the ROI.
The configuration of ROIs differs a bit on the selected model.
If you are in the initial setup, the model will be selectable in the next step. By default it is a `dig-cont` resp. `ana-cont` model.
In [Model Selection](../Choosing-the-Model) you find the differences between the different available models. Pick the one you think fits best your purpose. If you don't get to good result, try another model.
Here we only show the different configuration of the ROIs.
## Digit Model Selection
### dig-class11 Configuration
`dig-class11` - Models recognize the **complete digit only**. Here it is not relevant if the ROI fits the Border of the digit window.
For this model, there should be a border of `20%` of the image size around the number itself. This border is shown in the ROI setup image by the inner thinner rectangle. This rectangle should fit perfectly around the number when the number has not started to rotate to the next position:
<img width="300px" src=../img/ROI_drawing.jpg>
@@ -56,15 +130,14 @@ For this model, there should be a border of 20% of the image size around the num
| :x: **Not** Okay | ![](img/bw_not_okay_big.jpg) | ![](img/wb_not_okay_big.jpg) |
If you have perfect alignment you and are not getting satisfying results, most probably your numbers are not part of the training data yet. Read on [Learn models with your own images](../Learn-models-with-your-own-images) how to add your meter's type of numbers to the training set.
If you have perfect alignment and still are not getting satisfying results, most probably your numbers are not part of the training data yet. See [Collect images to improve the models](../Learn-models-with-your-own-images) on how to collect new training data.
#### dig-class100 / dig-cont Configuration
### dig-class100 / dig-cont Configuration
These models recognize the tenths (fractions) between the numbers. This model requires a different ROI setup; the height must be set differently and more accurately.
First, the width can be set as for dig-class11, i.e. 20% margin left and right.
First, the width can be set as for `dig-class11`, i.e. `20%` margin left and right.
<img width="455" alt="ROI-setup" src="https://user-images.githubusercontent.com/412645/199028748-c48ef5bb-a8d4-4c77-9faf-763e6cf77351.png">
@@ -79,3 +152,11 @@ Here an example:
| ------------ | --------------------------------- |
| :heavy_check_mark: **Okay** | <img width="125" alt="dig-class100_OK" src="https://user-images.githubusercontent.com/412645/199028380-7623776e-59b9-4356-ab55-3852253609df.png"> |
| :x: **Not** Okay | <img width="125" alt="dig-class100_NOK" src="https://user-images.githubusercontent.com/412645/199028469-3a69ed31-e5c9-4038-a8dc-6d44a42437ed.png"> |
### Analog Model Selection
Proceed the same way as with the Digit Model Selection.
### Saving
To save push `"Save`.
A reboot is required to apply the changed configuration!

57
docs/Reference-Image.md Normal file
View File

@@ -0,0 +1,57 @@
# Reference Image
!!! Note
The Reference Image is the basis for the coordinate system of the ROIs. Therefore it is very important, to have a well aligned image, that is not rotated.
At first an example image is shown.
To define a new reference image push the button `"Create new Reference" (2)` and afterwards `"Take Image" (2)`. It might take some seconds for processing, then your actual camera image should be shown.
Then play with the provided parameters to get a good result.
![](img/initial_setup_1_reference_image.jpg){: style="width:500px"}
## Focus
This is the first time, where you have access to the camera image. It most likely is out of focus and not sharp!
Ensure a sharp image of the camera by adjusting the focal length of the ESP OV2640 camera.
!!! Note
Try to adjust the focus for the clearest possible image!
In order to use it for reading a meter, the focal-length of the OV2640 camera has to be manipulated.
By default it only results in sharp image for distance bigger than around `~40cm` which is not ideal for our purpose.
Therefore you need to remove the fixing glue of the OV2640 lens with a sharp knife. After this you can rotate the lens in and out. Rotating it by about a quarter of a turn counterclockwise results in a focus plane shift of about 10cm. You need to figure out your best setting with a little bit of trial and error for your specific environment.
!!! Error
Be **very** carefully when rotating the lens. Best is to held the camera itself with one hand or a plier and rotate the lens with the other hand.
Make sure **not** to rotate the whole camera as this can damage the ribbon cable!
!!! Warning
This modification will void any warranty, as the sealing of the lens objective is broken!
!!! Warning
This modification will render the camera unsuitable for general, web-cam type applications unless the focal length is changed back to the original setting.
![](img/focus_adjustment.jpg)
## Correct Horizontal Alignment
Ensure an **exact horizontal alignment** of the number:
| :heavy_check_mark: Okay | :x: Not Okay |
| --------------------------- | ------------------------------- |
| ![](img/alignment_okay.jpg) | ![](img/alignment_not_okay.jpg) |
!!! Warning
Updating the reference image also means that all alignment images and ROIs needs to be configured again.
Therefore do this step later only with caution.
If everything is done, you can save the result with `"Update Reference Image" (4)`.
!!! Note
A reboot is not required at this point of time.
As next you should update the [Alignment References](Alignment.md).

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -4,108 +4,27 @@ After setting up the device (firmware, SD card, WLAN) the device will connect to
![](img/setup_initial_welcome.png){: style="width:500px"}
In the top you can navigate through 5 steps, that guide you through the necessary setup. All settings can be accessed also later in the normal operation mode (see below).
In the top you can navigate through 5 steps, that guide you through the necessary setup:
## 1. Reference Image
1. [Reference Image](Reference-Image.md)
1. [Alignment](Alignment.md)
1. [Digital ROIs](ROI-Configuration.md)
1. [Analog ROIs](ROI-Configuration.md) (Only required in case your meter has analoge pointers)
1. [General Settings](Configuration.md)
The reference image is the basis for the coordinate system of the ROIs. Therefore it is very important, to have a well aligned image, that is not rotated.
![](img/initial_setup_1_reference_image.jpg){: style="width:500px"}
At first the current image is shown. To define a new reference image push the button "Create new Reference" (2) and afterwards "Take Image" (2). It might take some seconds for processing, then your actual camera image should be shown.
**Attention:** This is the first time, where you have access to the camera image. It might not be sharp yet. This is the first thing to do according to the following instruction (**TBD**).
All settings can be accessed also later in the normal operation mode.
#### Correct Horizontal Alignment
Ensure an **exact horizontal alignment** of the number via the alignment / reference setup:
| :heavy_check_mark: Okay | :x: Not Okay |
| --------------------------- | ------------------------------- |
| ![](img/alignment_okay.jpg) | ![](img/alignment_not_okay.jpg) |
**:bangbang: Attention:** Updating the reference image, also means, that all alignment images and ROIs needs to be taught again. Therefore do this step later only with caution.
If everything is done, you can save the result with "Update Reference Image" (4). Please do not reboot at this stage, but go to the next section.
## 2. Alignment References
The alignment references are used to realign every taken image to the reference coordinates. Therefore two alignment structures are identified and the image is shifted and rotated according to their position with the target to be in exactly the same position as the reference image. The alignment structures needs to be unique and have a good contrast. You can switch between this two marks with (1).
![](img/initial_setup_2_alignment_marks.jpg){: style="width:500px"}
With the control in (3) position and size of the selected reference image. You can define the ROI in the image also directly via drag and drop with the mouse. To choose the currently marked image part you need to push "Update Reference" (2).
In some cases it might be useful to use a reference with a higher contrast. This can be achieved by pushing "Enhance Contrast" (3). The result will be calculated on the ESP32 - so be a bit patient, before you see it active.
To save the push finally "Save to config.ini" (4). Do not reboot at this stage, but proceed with the "next" button.
## 3./4. Define the ROIs for the number detection
Here the regions of interest for the digital and analog pointers are defined. As both are done identically, here as an example the digital images are shown.
### General usage
First of all, if you don't have that kind of numbers on you meter, you can disable it with the check box at the top (1).
![](img/initial_setup_3_rois.jpg){: style="width:500px"}
In contrast to the reference images, here there are more ROIs possible. You can switch between them with the drop down box (2). If you need additional ROIs or delete them you can do this with the control at (2).
**Attention:** The order of the ROIs defines, how the individual digits are combined to the total number. The first ROI is the digit with the highest order, then the second and so on. You can control the order in the selector tab and change it with the buttons "move Next" or "move Previous".
As for the reference images you can change position, size and name of the ROI in the text fields or define them via drag and drop through the mouse button.
In most cases the digits are ordered in a equidistantly and have the same size, you can synchronize them with the control in (4).
Don' t forget to save the settings with "Save" and do not reboot at this stage.
### Detail for ROI configuration - Analog Meters
For analog meters the ROI setting is rather straight forward as the meter is usually quadratic with a clear center. The circle should exactly fit to the outer size of the meter and the cross should be in the middle.
Here is an example with the details for the ROI "ana1":
![](img/initial_setup_3_analog_example.jpg){: style="width:500px"}
### Detail for ROI configuration - Digital Meters
For the digital meters it is a little bit more complicated, as there are different options of digital models, that you can choose.
1. Digital meter, that only recognized full digits (0, 1, 2, 3, ... 9) - Naming: `dig-class11-....tfl`
**Advantage:** broad variety of types included in the training
**Disadvantage:** partially rotated numbers cannot be detected
2. Model with sub-digit resolution (0.0, 0.1, 0.2, .... 9.8, 9.9) - Naming: `dig-cont-....tfl` or `dig-class100-....tfl`
**Advantage:** partial numbers can be detected and a better post processing is possible
**Disadvantage:** only limited types of meter types are trained due to the high effort for the training data
Details and the corresponding "perfect" setting is explained here: [Details ROI Configuration](https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/)
For a first run you can choose the following general settings:
* There is an inner and an outer frame for the ROIs.
* Make the inner frame exactly the size of the number.
| |Example 1|Example 2|
|---|---|---|
| :heavy_check_mark: **Okay** | ![](img/cont_img_ok.png){: style="width:80px"} | ![](img/wb_okay.jpg){: style="width:80px"} |
| :x: **Not** Okay | ![](img/bw_not_okay_small.jpg){: style="width:80px"} | ![](img/wb_not_okay_small.jpg){: style="width:80px"} |
| :x: **Not** Okay | ![](img/bw_not_okay_big.jpg){: style="width:80px"}| ![](img/wb_not_okay_big.jpg){: style="width:80px"}|
TODO rework
## 5. General Settings

View File

@@ -18,17 +18,19 @@ nav:
- Join a Discussion: https://github.com/jomjol/AI-on-the-edge-device/discussions
- Configuration:
- Reference-Image.md
- Alignment.md
- ROI-Configuration.md
- Configuration.md
- Choosing-the-Model.md
- Neural-Network-Types.md
- ota.md
- Parameters.md
- Advanced:
- Parameters.md
- Integration-Home-Assistant.md
- External-LED.md
- rolling-installation.md
- Configuration.md
- Watermeter-specific-analog---digital-transition.md
- collect-new-images.md
- Learn-models-with-your-own-images.md
@@ -57,8 +59,6 @@ nav:
- Old Pages (no longer maintained):
- outdated--Integrated-Functions.md
- outdated--Gasmeter-Log-Downloader.md
- outdated--Migrate-Old-Config-To-New-Config.md
- Assorted Pages:
# List all pages which are not covered by above list

View File

@@ -1,23 +0,0 @@
# Gas Meter Log Downloader
!!! Warning
This page no longer is maintained!
This small tool downloads the log files from your ESP32 and stores the last value of the day in an *.csv file.
To use this tool you need to **activate the debug log files** in your configuration (Configuration / Debug / Logfile). I go with 30 days of retention in days.
It downloads only the past log files (yesterday and older).
You can define the max. number of log files to download (beginning from newest [yesterday]).
I wrote this tool to get a chart of the daily gas consumption to optimize my gas powered heating.
**Variables to define by yourself:**
- **URL to Log file-Path on Device:** "http://ESP32-IP-Address/fileserver/log/message/"
- **Download Log files to:** enter a valid directory, e.g. "D:\Gaszaehler\Auswertung\Log-Downloads\"
- **Output CSV-File:** enter a valid directory, e.g. "D:\Gaszaehler\Auswertung\DailyValues.csv"
- **Download Log files from past # days:** enter the max. number of log files you want to download (<= your log files retention value in your device configuration)
Feel free to optimize and modify it.

View File

@@ -1,131 +0,0 @@
# Migration from water-meter „old“ to water-meter “AI-on-the-edge-device”
!!! Warning
This page no longer is maintained!
There are only some few steps necessary to migrate your old system to the new one.
Please follow the following steps:
#### 1. Follow the installation guide to flash the ESP32CAM and prepare a SD Card with the content of the master
#### 2. Save the following files from the old Docker system on your PC:
* Reference Points 1-3 (only 2 needed)
* `Config.ini`
#### 3. Copy Reference Points 1-3 onto the new water-meter system (Directory `/config`)
**Please note only two Reference Points are supported in the new system.**
#### 4. Open new `config.ini` File:
Insert from the old `Config.ini` file `[alignment]` and `[alignment.ref0]` and `[alignment.ref1]` section the two Ref x and y position and the `initial_rotation_angle= 123`into the new `Config.ini` File, e.g.:
###### Old:
```
[alignment.ref0]
image=./config/RB01_65x65.jpg
pos_x=28
pos_y=63
[alignment.ref1]
image=./config/RB02_50x35.jpg
pos_x=497
pos_y=127
[alignment]
initial_rotation_angle=180
```
###### New:
```
[Alignment]
InitalRotate=180
/config/RB01_65x65.jpg 28, 63
/config/RB02_50x35.jpg 497, 127
SearchFieldX = 20
SearchFieldY = 20
```
#### 5. Insert the old Digit Values into the new `Config.ini` File, e.g.:
###### Old:
```
[Digital_Digit.ziffer1]
pos_x=265
pos_y=117
dx=28
dy=51
[Digital_Digit.ziffer2]
pos_x=310
pos_y=117
dx=28
dy=51
[Digital_Digit.ziffer3]
pos_x=354
pos_y=117
dx=28
dy=51
[Digital_Digit.ziffer4]
pos_x=399
pos_y=117
dx=28
dy=51
[Digital_Digit.ziffer5]
pos_x=445
pos_y=115
dx=28
dy=51
```
###### New:
```
[Digits]
Model=/config/dig0630s3.tflite
;LogImageLocation = /log/digit
ModelInputSize 20, 32
digit1, 265, 117, 28, 51
digit2, 310, 117, 28, 51
digit3, 354, 117, 28, 51
digit4, 399, 117, 28, 51
digit5, 445, 115, 28, 51
```
#### 6. Make sure that you have the same quality and size settings as in your old `Config.ini`
In the old configuration this was coded in the html-string for the image source:
###### Old:
```
URLImageSource=http://IP-ADRESS/capture_with_flashlight?quality=5&size=VGA
```
Default was Quality=5 and VGA.
###### New:
```
ImageQuality = 5
ImageSize = VGA
```
#### 7. Repeat the same for the analog section
#### 8. Insert your SSID and Password into the new wlan.ini File
#### 9. Compare and edit [ConsistencyCheck] Section with new [PostProcessing] Section
#### 10. Save new config.ini File in the new System.
#### 11. Restart the system.
#### 12. After the first start set manually the PreValue in the new system