Compare commits

...

17 Commits

Author SHA1 Message Date
SybexXx
4a76bc3eb3 Update platformio.ini 2025-06-11 05:45:35 +02:00
SybexXx
51416b1358 Update Helper.cpp 2025-06-11 05:45:04 +02:00
Bruns8234
c320e4c921 Update SDCard Manufacturer List (#3730)
Update 1 and added 5 entries
2025-05-05 23:55:10 +02:00
CaCO3
43b29f3408 clarify the parameter prefix (#3717)
Co-authored-by: CaCO3 <caco@ruinelli.ch>
2025-04-23 00:01:37 +02:00
SybexX
b1c65c0a71 Update MeterType.md 2025-04-20 22:03:40 +02:00
CaCO3
00091fc3f9 Update NUMBER.ChangeRateThreshold.md 2025-04-16 23:31:19 +02:00
CaCO3
69a43fb068 Update reply-bot.yaml 2025-04-16 20:43:49 +02:00
CaCO3
82f28cb5bc Fix webinstaller update (#3697)
* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml
2025-04-09 23:43:50 +02:00
Frank Haverland
34818c0dc1 new model dig-class100-0180-s2-q (#3684)
* new model dig-class100-0180-s2-q

Model updated to Tensorflow 2.17
new images, now 24300

* Revert "new model dig-class100-0180-s2-q"

This reverts commit 7ac771e4b6.

* new model
2025-04-08 20:22:24 +02:00
jomjol
0b3a6e1057 Update tflite (#3687) 2025-04-06 09:45:48 +02:00
CaCO3
f06ef7b80e remove msg_id in the log, it is of no use (#3678) 2025-03-30 20:58:20 +02:00
Erik
962a674058 Refine Home Assistant MQTT Auto Discovery (#3659)
Add a proper device_class (duration) to "uptime"
2025-03-29 13:28:23 +01:00
SybexX
c57cd83948 Update README.md 2025-03-26 23:07:37 +01:00
The Random DIY
6991c41060 README updated with missed English translation (#3673)
* README updated with missed English translation

* Readme updated
2025-03-26 22:53:16 +01:00
SybexX
8bb274cd84 Merge pull request #3668 from nechry/main
Update NUMBER.ChangeRateThreshold.md
2025-03-24 03:19:41 +01:00
SybexX
168ec5b485 Update edit_config_template.html 2025-03-22 18:07:56 +01:00
Jean-François Auger
7a0a34e32e Update NUMBER.ChangeRateThreshold.md 2025-03-22 17:28:45 +01:00
25 changed files with 76 additions and 37 deletions

View File

@@ -1,6 +1,10 @@
name: Build and Pack
on: [push, pull_request]
on:
push:
pull_request:
release:
types: [released] # Only trigger on published releases (not drafts or pre-released)
jobs:
#########################################################################################
@@ -304,7 +308,7 @@ jobs:
prepare-release:
runs-on: ubuntu-latest
needs: [pack-for-update, pack-for-manual_setup, pack-for-remote_setup]
if: startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'release' # Only run when the trigger is a release
# Sets permissions of the GITHUB_TOKEN to allow updating the branches
permissions:
@@ -406,7 +410,7 @@ jobs:
#########################################################################################
# Make sure to also update update-webinstaller.yml!
update-web-installer:
if: github.event_name == 'release' && github.event.action == 'published' # Only run on release but not on prerelease
if: github.event_name == 'release' # Only run when the trigger is a release
needs: [prepare-release]
environment:
name: github-pages
@@ -444,13 +448,13 @@ jobs:
sed -i 's/$VERSION/${{ steps.last_release.outputs.tag_name }}/g' webinstaller/manifest.json
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: 'webinstaller'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3 # Note: v4 does not work!
uses: actions/deploy-pages@v4.0.5 # Note: v4 does not work!

View File

@@ -18,7 +18,7 @@ permissions:
jobs:
comment:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View File

@@ -4,7 +4,7 @@
```
git clone https://github.com/jomjol/AI-on-the-edge-device.git
cd AI-on-the-edge-device
git checkout rolling
git checkout main
git submodule update --init
```
@@ -12,10 +12,10 @@ git submodule update --init
```
cd /components/submodule-name (e.g. tflite-micro-example)
git checkout VERSION (e.g. HASH of latest tflite-micro-example build)
cd ../../ (auf Ebene von code)
cd ../../ (at the code level)
git submodule update --init
```
Evt. muss man vorher noch einige Verzeichnisse in compenents von Hand löschen, da sie beim checkout nicht gelöscht wurden (vor update -- init)
You may need to manually delete some directories in the 'components' folder beforehand, as they were not deleted during checkout (before update -- init)
## Build and Flash within terminal
See further down to build it within an IDE.
@@ -51,7 +51,7 @@ pio device monitor -p /dev/ttyUSB0
```
git clone https://github.com/jomjol/AI-on-the-edge-device.git
cd AI-on-the-edge-device
git checkout rolling
git checkout main
git submodule update --init
```

View File

@@ -31,7 +31,12 @@ extern "C"
#include "ClassLogFile.h"
#include "esp_vfs_fat.h"
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0))
#include "esp_private/sdmmc_common.h"
#else
#include "../sdmmc_common.h"
#endif
static const char *TAG = "HELPER";
@@ -806,11 +811,21 @@ struct SDCard_Manufacturer_database sd_database[] = {
.id = 0x03,
.manufacturer = "SanDisk",
},
{
.type = "sd",
.id = 0x05,
.manufacturer = "Lenovo",
},
{
.type = "sd",
.id = 0x08,
.manufacturer = "Silicon Power",
},
{
.type = "sd",
.id = 0x09,
.manufacturer = "ATP",
},
{
.type = "sd",
.id = 0x18,
@@ -894,7 +909,27 @@ struct SDCard_Manufacturer_database sd_database[] = {
{
.type = "sd",
.id = 0x89,
.manufacturer = "Unknown",
.manufacturer = "Netac",
},
{
.type = "sd",
.id = 0x9f,
.manufacturer = "Kingston/Kodak/Silicon Power",
},
{
.type = "sd",
.id = 0xad,
.manufacturer = "Amazon Basics/Lexar/OV",
},
{
.type = "sd",
.id = 0xdf,
.manufacturer = "Lenovo",
},
{
.type = "sd",
.id = 0xfe,
.manufacturer = "Bekit/Cloudisk/HP/Reletech",
},
};

View File

@@ -85,7 +85,7 @@ bool MQTTPublish(std::string _key, std::string _content, int qos, bool retained_
_content.append("..");
}
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Published topic: " + _key + ", content: " + _content + " (msg_id=" + std::to_string(msg_id) + ")");
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Published topic: " + _key + ", content: " + _content);
return true;
}
else {
@@ -465,7 +465,7 @@ void MQTTconnected(){
if (subscribeFunktionMap != NULL) {
for(std::map<std::string, std::function<bool(std::string, char*, int)>>::iterator it = subscribeFunktionMap->begin(); it != subscribeFunktionMap->end(); ++it) {
int msg_id = esp_mqtt_client_subscribe(client, it->first.c_str(), 0);
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "topic " + it->first + " subscribe successful, msg_id=" + std::to_string(msg_id));
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "topic " + it->first + " subscribe successful");
}
}

View File

@@ -174,14 +174,14 @@ bool MQTThomeassistantDiscovery(int qos) {
int aFreeInternalHeapSizeBefore = heap_caps_get_free_size(MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL);
// Group | Field | User Friendly Name | Icon | Unit | Device Class | State Class | Entity Category
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "uptime", "Uptime", "clock-time-eight-outline", "s", "", "", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "uptime", "Uptime", "progress-clock", "s", "duration", "measurement", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "MAC", "MAC Address", "network-outline", "", "", "", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "fwVersion", "Firmware Version", "application-outline", "", "", "", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "hostname", "Hostname", "network-outline", "", "", "", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "freeMem", "Free Memory", "memory", "B", "", "measurement", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "wifiRSSI", "Wi-Fi RSSI", "wifi", "dBm", "signal_strength", "", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "CPUtemp", "CPU Temperature", "thermometer", "°C", "temperature", "measurement", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "interval", "Interval", "clock-time-eight-outline", "min", "" , "measurement", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "interval", "Interval", "clock-time-eight-outline", "min", "", "measurement", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "IP", "IP", "network-outline", "", "", "", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "status", "Status", "list-status", "", "", "", "diagnostic", qos);
allSendsSuccessed |= sendHomeAssistantDiscoveryTopic("", "flowstart", "Manual Flow Start", "timer-play-outline", "", "", "", "", qos);

View File

@@ -20,7 +20,7 @@
[common:esp32-idf]
extends = common:idf
; PlatformIO releases, see https://github.com/platformio/platform-espressif32/releases
platform = platformio/espressif32 @ 6.9.0
platform = platformio/espressif32 @ 6.11.0
framework = espidf
lib_deps =
${common:idf.lib_deps}

View File

@@ -4,4 +4,4 @@ Default Value: `undefined`
Dedicated definition of the field for InfluxDB use for saving in the Influx database (e.g.: "watermeter/value").
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.Field`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.Field`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -4,4 +4,4 @@ Default Value: `undefined`
Field for InfluxDB v2 to use for saving.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.Field`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.Field`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -10,11 +10,11 @@ Alternatively you can set the parameter `DecimalShift` to `3` so the value is co
List of supported options:
- `other`
- `water_m3` (uses `m^3/min` as rate)
- `water_m3` (uses `m^3/h` as rate)
- `water_l` (uses `l/h` as rate, not officially supported by Homeassistant!)
- `water_gal` (uses `gal/h` as rate, not officially supported by Homeassistant!)
- `water_ft3` (uses `ft^3/min` as rate)
- `gas_m3` (uses `m^3/min` as rate)
- `gas_m3` (uses `m^3/h` as rate)
- `gas_ft3` (uses `ft^3/min` as rate)
- `energy_wh` (uses `W` as rate)
- `energy_kwh` (uses `KW` as rate)

View File

@@ -4,4 +4,4 @@ Default Value: `0`
The Idx number for the counter device. Can be obtained from the devices setup page on the Domoticz system.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.DomoticzIDX`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.DomoticzIDX`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -7,4 +7,4 @@ Allow a meter to count backwards (decreasing values).
This is unusual (it means there is a negative rate) and not wanted in most cases!
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.AllowNegativeRates`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.AllowNegativeRates`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -9,4 +9,4 @@ See [here](../Watermeter-specific-analog---digit-transition) for details.
Range: `6.0` .. `9.9`.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.AnalogToDigitTransitionStart`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.AnalogToDigitTransitionStart`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -1,7 +1,7 @@
# Parameter `ChangeRateThreshold`
Default Value: `2`
Range: `1` .. `9`.
Range: `0` .. `9`.
Threshold parameter for change rate detection.<br>
This parameter is intended to compensate for small reading fluctuations that occur when the meter does not change its value for a long time (e.g. at night) or slightly turns backwards. This can eg. happen on watermeters.
@@ -10,18 +10,18 @@ It is only applied to the last digit of the read value (See example below).
If the read value is within PreValue +/- Threshold, no further calculation is carried out and the Value/Prevalue remains at the old value.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.ChangeRateThreshold`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.ChangeRateThreshold`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).
## Example
- Smallest ROI provides value for `0.000'x` (Eg. a water meter with 4 pointers behind the decimal point)
- ChangeRateThreshold = 2
#### With `Extended Resolution` **disabled**
#### With `ExtendedResolution` **disabled**
PreValue: `123.456'7` -> Threshold = `+/-0.000'2`.<br>
All changes between `123.456'5` and `123.456'9` get ignored
#### With `Extended Resolution` **enabled**
#### With `ExtendedResolution` **enabled**
PreValue: `123.456'78` -> Threshold = `+/-0.000'02`.<br>
All changes between `123.456'76` and `123.456'80` get ignored.

View File

@@ -8,4 +8,4 @@ An additional consistency check.
It especially improves the zero crossing check between digits.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.CheckDigitIncreaseConsistency`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.CheckDigitIncreaseConsistency`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -5,4 +5,4 @@ Shift the decimal separator (positiv or negativ).
Eg. to move from `m³` to `liter` (`1 m³` equals `1000 liters`), you need to set it to `+3`.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.DecimalShift`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.DecimalShift`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -7,4 +7,4 @@ Use the decimal place of the last analog counter for increased accuracy.
This parameter is only supported on the `*-class*` and `*-const` models! See [Choosing-the-Model](../Choosing-the-Model) for details.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.ExtendedResolution`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.ExtendedResolution`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -6,4 +6,4 @@ This is only relevant for models which use `N`!
See [here](../Choosing-the-Model) for details.
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.IgnoreLeadingNaN`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.IgnoreLeadingNaN`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -5,4 +5,4 @@ Defines if the **Change Rate** is calculated as the difference between the last
as the difference normalized to the interval (`RateChange` = difference per minute).
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.MaxRateType`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.MaxRateType`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

View File

@@ -6,4 +6,4 @@ Maximum allowed change between two readings, if exceeded the last reading will b
If negative rate is disallowed and no maximum rate value is set, one false high reading will lead to a period of missing measurements until the measurement reaches the previous false high reading. E.g. if the counter is at `600,00` and it's read incorrectly as` 610,00`, all measurements will be skipped until the counter reaches `610,00`. Setting the MaxRateValue to `0,05` leads to a rejection of all readings with a difference `> 0,05`, in this case `610,00`. The rejection also applies to correct readings with a difference `> 0,05`!
!!! Note
This parameter must be prefixed with `<NUMBER>` followed by a dot (eg. `main.MaxRateValue`). `<NUMBER>` is the name of the number sequence defined in the ROI's.
If you edit the config file manually, you must prefix this parameter with `<NUMBER>` followed by a dot (eg. `main.MaxRateValue`). The reason is that this parameter is specific for each `<NUMBER>` (`<NUMBER>` is the name of the number sequence defined in the ROI's).

Binary file not shown.

View File

@@ -43,7 +43,7 @@ AlignmentAlgo = default
/config/ref1.jpg 442 142
[Digits]
Model = /config/dig-cont_0712_s3_q.tflite
Model = /config/dig-cont_0900_s3_q.tflite
CNNGoodThreshold = 0.5
;ROIImagesLocation = /log/digit
;ROIImagesRetention = 3
@@ -52,7 +52,7 @@ main.dig2 343 126 30 54 false
main.dig3 391 126 30 54 false
[Analog]
Model = /config/ana-cont_1300_s2.tflite
Model = /config/ana-cont_1500_s2_q.tflite
CNNGoodThreshold = 0.5
;ROIImagesLocation = /log/analog
;ROIImagesRetention = 3

Binary file not shown.

Binary file not shown.

View File

@@ -969,7 +969,7 @@
</td>
<td>
<input required type="number" id="PostProcessing_ChangeRateThreshold_value1" step="1" min="0" max="9" value="2"
oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=9)) &&
oninput="(!validity.rangeUnderflow||(value=0)) && (!validity.rangeOverflow||(value=9)) &&
(!validity.stepMismatch||(value=parseInt(this.value)));">
</td>
<td>$TOOLTIP_PostProcessing_NUMBER.ChangeRateThreshold</td>