diff --git a/FeatureRequest.md b/FeatureRequest.md
index d9157b90..e2e97fd1 100644
--- a/FeatureRequest.md
+++ b/FeatureRequest.md
@@ -11,6 +11,14 @@
____
+
+
+#### #25 Trigger Measurement via MQTT
+
+* https://github.com/jomjol/AI-on-the-edge-device/issues/727
+
+
+
#### #24 Show Mqtt state directly in Webserver
* Show MQTT log in Web page. E.g. connection established or failed to connect...
@@ -48,9 +56,9 @@ ____
-#### #18 Document WLAN-strength in web page
+#### ~~#18 Document WLAN-strength in web page~~
-* https://github.com/jomjol/AI-on-the-edge-device/issues/563
+* ~~https://github.com/jomjol/AI-on-the-edge-device/issues/563~~
@@ -101,9 +109,9 @@ ____
-#### #12 Less reboots due to memory leakage
+#### ~~#12 Less reboots due to memory leakage~~
-* Issue: #414 & #425 #430
+* ~~Issue: #414 & #425 #430~~
diff --git a/README.md b/README.md
index c69d2615..31af3174 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,10 @@ This is an example of Artificial Intelligence (AI) calculations on a very cheap
### Details on **function**, **installation** and **configuration** can be found on the **[Wiki Page](https://github.com/jomjol/AI-on-the-edge-device/wiki)**
-A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4573481
-
-or here https://www.thingiverse.com/thing:5028229
-
-respectively ESP32-Cam housing only: https://www.thingiverse.com/thing:4571627
+A 3d-printable housing can be found here:
+ - https://www.thingiverse.com/thing:4573481 (Water Meter)
+ - https://www.thingiverse.com/thing:5028229 (Power Meter)
+ - https://www.thingiverse.com/thing:4571627 (ESP32-Cam housing only)


@@ -45,20 +44,24 @@ In other cases you can contact the developer via email: no return value in the field "value" anymore
- (still reported back via field "raw value")
+- Some readings will have removable "N"s that can not be removed automatically and are handled with an "error" --> no return value in the field "value" anymore (still reported back via field "raw value")
- Updated esp32 camera hardware driver
-- Bug fix: MQTT, html improvements
+- Bug fix: MQTT, HTML improvements
-**ATTENTION: The new ESP32 camera hardware driver is much more stable on newer OV2640 versions (no or much less reboots) but seems to be not fully compatible with older versions.**
+**ATTENTION: The new ESP32 camera hardware driver is much more stable on newer OV2640 versions (no or much less reboots) but seems to be not fully compatible with older versions.**
* If you have problem with stalled systems you can try the following
- Update the parameter `ImageQuality` to `12` instead of current value `5` (manually in the `config.ini`)
@@ -95,8 +97,7 @@ In other cases you can contact the developer via email:
* New housing published for external LEDs and small clearing: https://www.thingiverse.com/thing:5028229
@@ -177,9 +178,9 @@ In other cases you can contact the developer via email:
uri = zerlegt[1];
}
+ if ((toUpper(zerlegt[0]) == "SETRETAINFLAG") && (zerlegt.size() > 1))
+ {
+ if (toUpper(zerlegt[1]) == "TRUE")
+ SetRetainFlag = 1;
+ }
+
if ((toUpper(zerlegt[0]) == "CLIENTID") && (zerlegt.size() > 1))
{
@@ -118,7 +125,7 @@ bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
mainerrortopic = maintopic + "/connection";
printf("Init MQTT with uri: %s, clientname: %s, user: %s, password: %s, maintopic: %s\n", uri.c_str(), clientname.c_str(), user.c_str(), password.c_str(), mainerrortopic.c_str());
MQTTInit(uri, clientname, user, password, mainerrortopic, 60);
- MQTTPublish(mainerrortopic, "connected");
+ MQTTPublish(mainerrortopic, "connected", SetRetainFlag);
MQTTenable = true;
}
@@ -150,17 +157,17 @@ bool ClassFlowMQTT::doFlow(string zwtime)
zw = maintopic + "/" + "uptime";
char uptimeStr[11];
sprintf(uptimeStr, "%ld", (long)getUpTime());
- MQTTPublish(zw, uptimeStr);
+ MQTTPublish(zw, uptimeStr, SetRetainFlag);
zw = maintopic + "/" + "freeMem";
char freeheapmem[11];
sprintf(freeheapmem, "%zu", esp_get_free_heap_size());
- MQTTPublish(zw, freeheapmem);
+ MQTTPublish(zw, freeheapmem, SetRetainFlag);
zw = maintopic + "/" + "wifiRSSI";
char rssi[11];
sprintf(rssi, "%d", get_WIFI_RSSI());
- MQTTPublish(zw, rssi);
+ MQTTPublish(zw, rssi, SetRetainFlag);
if (flowpostprocessing)
@@ -183,23 +190,23 @@ bool ClassFlowMQTT::doFlow(string zwtime)
zw = namenumber + "value";
if (result.length() > 0)
- MQTTPublish(zw, result);
+ MQTTPublish(zw, result, SetRetainFlag);
zw = namenumber + "error";
if (resulterror.length() > 0)
- MQTTPublish(zw, resulterror, 1);
+ MQTTPublish(zw, resulterror, SetRetainFlag);
zw = namenumber + "rate";
if (resultrate.length() > 0)
- MQTTPublish(zw, resultrate);
+ MQTTPublish(zw, resultrate, SetRetainFlag);
zw = namenumber + "raw";
if (resultraw.length() > 0)
- MQTTPublish(zw, resultraw);
+ MQTTPublish(zw, resultraw, SetRetainFlag);
zw = namenumber + "timestamp";
if (resulttimestamp.length() > 0)
- MQTTPublish(zw, resulttimestamp);
+ MQTTPublish(zw, resulttimestamp, SetRetainFlag);
std::string json = "";
@@ -218,7 +225,7 @@ bool ClassFlowMQTT::doFlow(string zwtime)
json += ",\"timestamp\":\""+resulttimestamp+"\"}";
zw = namenumber + "json";
- MQTTPublish(zw, json);
+ MQTTPublish(zw, json, SetRetainFlag);
}
}
else
@@ -234,7 +241,7 @@ bool ClassFlowMQTT::doFlow(string zwtime)
result = result + "\t" + zw;
}
}
- MQTTPublish(topic, result);
+ MQTTPublish(topic, result, SetRetainFlag);
}
OldValue = result;
diff --git a/code/components/jomjol_flowcontroll/ClassFlowMQTT.h b/code/components/jomjol_flowcontroll/ClassFlowMQTT.h
index 19cc9fdf..816389b1 100644
--- a/code/components/jomjol_flowcontroll/ClassFlowMQTT.h
+++ b/code/components/jomjol_flowcontroll/ClassFlowMQTT.h
@@ -13,6 +13,7 @@ protected:
std::string OldValue;
ClassFlowPostProcessing* flowpostprocessing;
std::string user, password;
+ int SetRetainFlag;
bool MQTTenable;
std::string maintopic, mainerrortopic;
diff --git a/code/components/jomjol_mqtt/interface_mqtt.h b/code/components/jomjol_mqtt/interface_mqtt.h
index 50990e6f..397d1787 100644
--- a/code/components/jomjol_mqtt/interface_mqtt.h
+++ b/code/components/jomjol_mqtt/interface_mqtt.h
@@ -10,7 +10,7 @@ void MQTTdestroy();
//void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user = "", std::string _password = "");
-void MQTTPublish(std::string _key, std::string _content, int retained_flag = 0);
+void MQTTPublish(std::string _key, std::string _content, int retained_flag = 1); // retained Flag as Standart
bool MQTTisConnected();
diff --git a/code/main/version.cpp b/code/main/version.cpp
index 34a3aeed..994f95cd 100644
--- a/code/main/version.cpp
+++ b/code/main/version.cpp
@@ -1,4 +1,4 @@
-const char* GIT_REV="7187101";
+const char* GIT_REV="ebcfc16";
const char* GIT_TAG="";
-const char* GIT_BRANCH="master";
-const char* BUILD_TIME="2022-02-22 19:05";
\ No newline at end of file
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2022-03-20 21:31";
\ No newline at end of file
diff --git a/code/version.cpp b/code/version.cpp
index 34a3aeed..994f95cd 100644
--- a/code/version.cpp
+++ b/code/version.cpp
@@ -1,4 +1,4 @@
-const char* GIT_REV="7187101";
+const char* GIT_REV="ebcfc16";
const char* GIT_TAG="";
-const char* GIT_BRANCH="master";
-const char* BUILD_TIME="2022-02-22 19:05";
\ No newline at end of file
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2022-03-20 21:31";
\ No newline at end of file
diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin
index ae05db13..7884d138 100644
Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ
diff --git a/firmware/dig-s0-q-20220224.tflite b/firmware/dig-s0-q-20220224.tflite
deleted file mode 100644
index 859218d4..00000000
Binary files a/firmware/dig-s0-q-20220224.tflite and /dev/null differ
diff --git a/firmware/dig-s1-q-20220227.tflite b/firmware/dig-s1-q-20220227.tflite
new file mode 100644
index 00000000..3ced1fcc
Binary files /dev/null and b/firmware/dig-s1-q-20220227.tflite differ
diff --git a/firmware/firmware.bin b/firmware/firmware.bin
index 6314d0e3..fe5bc001 100644
Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ
diff --git a/firmware/html.zip b/firmware/html.zip
index ec069237..a7abb32e 100644
Binary files a/firmware/html.zip and b/firmware/html.zip differ
diff --git a/sd-card/html/edit_config_param.html b/sd-card/html/edit_config_param.html
index 1d4c485d..bb1a5b1c 100644
--- a/sd-card/html/edit_config_param.html
+++ b/sd-card/html/edit_config_param.html
@@ -636,6 +636,23 @@ textarea {
Password for MQTT authentication
+


