mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 05:26:52 +03:00
Compare commits
1 Commits
main
...
Update-tfl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d6d89adc7 |
16
.github/workflows/build.yaml
vendored
16
.github/workflows/build.yaml
vendored
@@ -1,10 +1,6 @@
|
||||
name: Build and Pack
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [released] # Only trigger on published releases (not drafts or pre-released)
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
#########################################################################################
|
||||
@@ -308,7 +304,7 @@ jobs:
|
||||
prepare-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [pack-for-update, pack-for-manual_setup, pack-for-remote_setup]
|
||||
if: github.event_name == 'release' # Only run when the trigger is a release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow updating the branches
|
||||
permissions:
|
||||
@@ -410,7 +406,7 @@ jobs:
|
||||
#########################################################################################
|
||||
# Make sure to also update update-webinstaller.yml!
|
||||
update-web-installer:
|
||||
if: github.event_name == 'release' # Only run when the trigger is a release
|
||||
if: github.event_name == 'release' && github.event.action == 'published' # Only run on release but not on prerelease
|
||||
needs: [prepare-release]
|
||||
environment:
|
||||
name: github-pages
|
||||
@@ -448,13 +444,13 @@ jobs:
|
||||
sed -i 's/$VERSION/${{ steps.last_release.outputs.tag_name }}/g' webinstaller/manifest.json
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
with:
|
||||
path: 'webinstaller'
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4.0.5 # Note: v4 does not work!
|
||||
uses: actions/deploy-pages@v3 # Note: v4 does not work!
|
||||
|
||||
2
.github/workflows/reply-bot.yaml
vendored
2
.github/workflows/reply-bot.yaml
vendored
@@ -18,7 +18,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
@@ -161,9 +161,6 @@ bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||
else if (toUpper(splitted[1]) == "WATER_GAL") {
|
||||
mqttServer_setMeterType("water", "gal", "h", "gal/h");
|
||||
}
|
||||
else if (toUpper(splitted[1]) == "WATER_GAL_MIN") {
|
||||
mqttServer_setMeterType("water", "gal", "min", "gal/min"); // min = Minutes
|
||||
}
|
||||
else if (toUpper(splitted[1]) == "GAS_M3") {
|
||||
mqttServer_setMeterType("gas", "m³", "h", "m³/h");
|
||||
}
|
||||
|
||||
@@ -806,21 +806,11 @@ 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,
|
||||
@@ -904,27 +894,7 @@ struct SDCard_Manufacturer_database sd_database[] = {
|
||||
{
|
||||
.type = "sd",
|
||||
.id = 0x89,
|
||||
.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",
|
||||
.manufacturer = "Unknown",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1248,7 +1218,7 @@ bool replaceString(std::string &s, std::string const &toReplace, std::string con
|
||||
|
||||
if (logIt)
|
||||
{
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Migrated Configfile line '" + old + "' to '" + s + "'");
|
||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Migrated Configfile line '" + old + "' to '" + s + "'");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -635,7 +635,7 @@ void migrateConfiguration(void) {
|
||||
CamZoom_value = false;
|
||||
}
|
||||
else {
|
||||
// ESP_LOGI(TAG, "splitted[1]: %s", splitted[1].c_str());
|
||||
ESP_LOGE(TAG, "splitted[1]: %s", splitted[1].c_str());
|
||||
CamZoom_value = alphanumericToBoolean(splitted[1]);
|
||||
}
|
||||
CamZoom_found = true;
|
||||
@@ -858,22 +858,22 @@ void migrateConfiguration(void) {
|
||||
else {
|
||||
configLines[CamZoom_lines] = ("CamZoom = false");
|
||||
}
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Migrated Configfile line 'Zoom' to 'CamZoom'");
|
||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Migrated Configfile line 'Zoom' to 'CamZoom'");
|
||||
migrated = true;
|
||||
}
|
||||
if (CamZoomSize_lines > 0) {
|
||||
configLines[CamZoomSize_lines] = ("CamZoomSize = " + std::to_string(CamZoomSize_value));
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Migrated Configfile line 'ZoomMode' to 'CamZoomSize'");
|
||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Migrated Configfile line 'ZoomMode' to 'CamZoomSize'");
|
||||
migrated = true;
|
||||
}
|
||||
if (CamZoomOffsetX_lines > 0) {
|
||||
configLines[CamZoomOffsetX_lines] = ("CamZoomOffsetX = " + std::to_string(CamZoomOffsetX_value));
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Migrated Configfile line 'ZoomOffsetX' to 'CamZoomOffsetX'");
|
||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Migrated Configfile line 'ZoomOffsetX' to 'CamZoomOffsetX'");
|
||||
migrated = true;
|
||||
}
|
||||
if (CamZoomOffsetY_lines > 0) {
|
||||
configLines[CamZoomOffsetY_lines] = ("CamZoomOffsetY = " + std::to_string(CamZoomOffsetY_value));
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Migrated Configfile line 'ZoomOffsetY' to 'CamZoomOffsetY'");
|
||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Migrated Configfile line 'ZoomOffsetY' to 'CamZoomOffsetY'");
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -4,4 +4,4 @@ Default Value: `undefined`
|
||||
Field for InfluxDB v2 to use for saving.
|
||||
|
||||
!!! Note
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -10,23 +10,19 @@ Alternatively you can set the parameter `DecimalShift` to `3` so the value is co
|
||||
List of supported options:
|
||||
|
||||
- `other`
|
||||
- `water_m3` (uses `m^3/h` as rate)
|
||||
- `water_l` (uses `l/h` as rate) **⚠️ Not supported by Homeassistant 2025.7 and later! ⚠️**
|
||||
- `water_gal` (uses `gal/h` as rate) **⚠️ Not supported by Homeassistant 2025.7 and later! ⚠️**
|
||||
- `water_gal_min` (uses `gal/min` as rate)
|
||||
- `water_m3` (uses `m^3/min` 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/h` as rate)
|
||||
- `gas_m3` (uses `m^3/min` as rate)
|
||||
- `gas_ft3` (uses `ft^3/min` as rate)
|
||||
- `energy_wh` (uses `W` as rate)
|
||||
- `energy_kwh` (uses `KW` as rate)
|
||||
- `energy_mwh` (uses `MW` as rate)
|
||||
- `energy_gj` (uses `GJ/h` as rate) **⚠️ Not supported by Homeassistant 2025.7 and later! ⚠️**
|
||||
- `energy_gj` (uses `GJ/h` as rate, not officially supported by Homeassistant!)
|
||||
- `temperature_c` (uses `+C/min` as rate)
|
||||
- `temperature_f` (uses `°F/min` as rate)
|
||||
- `temperature_k` (uses `K/min` as rate)
|
||||
|
||||
!!! Note
|
||||
Not all options are supported by Homeassistant, see `SensorDeviceClass.VOLUME_FLOW_RATE` in [https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes](https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes)!
|
||||
|
||||
!!! Warning
|
||||
Since Homeassistant 2025.7, the unsupported options will no longer work, see change in Homeassistant: [Ensure MQTT sensor has a valid native unit of measurement](https://github.com/home-assistant/core/pull/146722).
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -9,4 +9,4 @@ See [here](../Watermeter-specific-analog---digit-transition) for details.
|
||||
Range: `6.0` .. `9.9`.
|
||||
|
||||
!!! Note
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
## Example
|
||||
|
||||
- Smallest ROI provides value for `0.000'x` (Eg. a water meter with 4 pointers behind the decimal point)
|
||||
- ChangeRateThreshold = 2
|
||||
|
||||
#### With `ExtendedResolution` **disabled**
|
||||
#### With `Extended Resolution` **disabled**
|
||||
PreValue: `123.456'7` -> Threshold = `+/-0.000'2`.<br>
|
||||
All changes between `123.456'5` and `123.456'9` get ignored
|
||||
|
||||
#### With `ExtendedResolution` **enabled**
|
||||
#### With `Extended Resolution` **enabled**
|
||||
PreValue: `123.456'78` -> Threshold = `+/-0.000'02`.<br>
|
||||
All changes between `123.456'76` and `123.456'80` get ignored.
|
||||
|
||||
|
||||
@@ -8,4 +8,4 @@ An additional consistency check.
|
||||
It especially improves the zero crossing check between digits.
|
||||
|
||||
!!! Note
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -6,4 +6,4 @@ This is only relevant for models which use `N`!
|
||||
See [here](../Choosing-the-Model) for details.
|
||||
|
||||
!!! Note
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -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
|
||||
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).
|
||||
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.
|
||||
|
||||
Binary file not shown.
@@ -1183,16 +1183,15 @@
|
||||
<select class="select_large" id="MQTT_MeterType_value1"> <!-- See https://developers.home-assistant.io/docs/core/entity/sensor/#available-device-classes -->
|
||||
<option value="other" selected>Other (no Units)</option>
|
||||
<option value="water_m3">Watermeter (Value: m³, Rate: m³/h)</option>
|
||||
<option value="water_l">Watermeter (Value: l, Rate: l/h) ⚠️ Not supported by Homeassistant 2025.7 and later! ⚠️</option>
|
||||
<option value="water_gal">Watermeter (Value: gal, Rate: gal/h) ⚠️ Not supported by Homeassistant 2025.7 and later! ⚠️</option>
|
||||
<option value="water_gal_min">Watermeter (Value: gal, Rate: gal/min)</option>
|
||||
<option value="water_l">Watermeter (Value: l, Rate: l/h) *Not officially supported by Homeassistant!*</option>
|
||||
<option value="water_gal">Watermeter (Value: gal, Rate: gal/h) *Not officially supported by Homeassistant!*</option>
|
||||
<option value="water_ft3">Watermeter (Value: ft³, Rate: ft³/min)</option>
|
||||
<option value="gas_m3">Gasmeter (Value: m³, Rate: m³/h)</option>
|
||||
<option value="gas_ft3">Gasmeter (Value: ft³, Rate: ft³/min)</option>
|
||||
<option value="energy_wh">Energymeter (Value: Wh, Rate: W)</option>
|
||||
<option value="energy_kwh">Energymeter (Value: kWh, Rate: kW)</option>
|
||||
<option value="energy_mwh">Energymeter (Value: MWh, Rate: MW)</option>
|
||||
<option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h) ⚠️ Not supported by Homeassistant 2025.7 and later! ⚠️</option>
|
||||
<option value="energy_gj">Energymeter (Value: GJ, Rate: GJ/h) *Not officially supported by Homeassistant!*</option>
|
||||
<option value="temperature_c">Thermometer (Value: °C, Rate: °C/min)</option>
|
||||
<option value="temperature_c">Thermometer (Value: °F, Rate: °F/min)</option>
|
||||
<option value="temperature_c">Thermometer (Value: K, Rate: K/min)</option>
|
||||
@@ -2677,19 +2676,7 @@ function saveTextAsFile() {
|
||||
WriteConfigININew();
|
||||
SaveConfigToServer(domainname);
|
||||
|
||||
if(window.location.hash) {
|
||||
var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
|
||||
|
||||
if(hash == 'description') {
|
||||
firework.launch('Configuration saved.', 'success', 2000);
|
||||
}
|
||||
else {
|
||||
firework.launch('Configuration saved. It will get applied after the next reboot!<br><br>\n<a id="reboot_button" onclick="doReboot()">reboot now</a>', 'success', 5000);
|
||||
}
|
||||
}
|
||||
else {
|
||||
firework.launch('Configuration saved. It will get applied after the next reboot!<br><br>\n<a id="reboot_button" onclick="doReboot()">reboot now</a>', 'success', 5000);
|
||||
}
|
||||
firework.launch('Configuration saved. It will get applied after the next reboot!<br><br>\n<a id="reboot_button" onclick="doReboot()">reboot now</a>', 'success', 5000);
|
||||
|
||||
if (changeCamValue == 1) {
|
||||
camSettingsSet();
|
||||
@@ -3344,7 +3331,7 @@ function openDescription() {
|
||||
|
||||
if(hash == 'description') {
|
||||
document.getElementById("desc_details").open = true;
|
||||
// document.getElementById("reboot").style.display = "none";
|
||||
document.getElementById("reboot").style.display = "none";
|
||||
document.getElementById("reboot_text").style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user