mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-14 15:36:56 +03:00
Compare commits
2 Commits
main
...
update-to-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a76bc3eb3 | ||
|
|
51416b1358 |
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1248,7 +1253,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -11,22 +11,18 @@ 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_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_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).
|
||||
|
||||
@@ -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