mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 04:26:58 +03:00
Rolling 20220903
This commit is contained in:
11
README.md
11
README.md
@@ -40,6 +40,17 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
|
||||
|
||||
------
|
||||
|
||||
##### Rolling (2022-09-03)
|
||||
|
||||
- MQTT: improved handling based on the work of @**[caco3](https://github.com/caco3)** ([#971](https://github.com/jomjol/AI-on-the-edge-device/pull/971))
|
||||
|
||||
##### Rolling (2022-09-02)
|
||||
|
||||
- MQTT: extended logging and automated reconnect
|
||||
- HTML: explanation for MQTT keys
|
||||
- Improved post processing algo
|
||||
- Bug fix: update algorithm
|
||||
|
||||
##### Rolling (2022-08-31)
|
||||
|
||||
- **ATTENTION**:
|
||||
|
||||
@@ -101,11 +101,23 @@ static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_
|
||||
mqtt_event_handler_cb((esp_mqtt_event_handle_t) event_data);
|
||||
}
|
||||
|
||||
|
||||
void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user, std::string _password, std::string _LWTContext, int _keepalive){
|
||||
std::string _zwmessage = "connection lost";
|
||||
|
||||
int _lzw = _zwmessage.length();
|
||||
|
||||
/* LWTContext = _LWTContext;
|
||||
|
||||
mqtt_cfg.uri = _mqttURI.c_str();
|
||||
mqtt_cfg.client_id = _clientid.c_str();
|
||||
mqtt_cfg.lwt_topic = _LWTContext.c_str();
|
||||
mqtt_cfg.lwt_msg = _zwmessage.c_str();
|
||||
mqtt_cfg.lwt_retain = 1;
|
||||
mqtt_cfg.lwt_msg_len = _lzw;
|
||||
mqtt_cfg.keepalive = _keepalive;
|
||||
*/
|
||||
|
||||
esp_mqtt_client_config_t mqtt_cfg = {
|
||||
.uri = _mqttURI.c_str(),
|
||||
.client_id = _clientid.c_str(),
|
||||
@@ -142,8 +154,43 @@ void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user, st
|
||||
LogFile.WriteToFile("MQTT - Could not Init client!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void MQTTReConnect(){
|
||||
std::string _zwmessage = "connection lost";
|
||||
int _lzw = _zwmessage.length();
|
||||
|
||||
>>>>>>> Stashed changes
|
||||
client = esp_mqtt_client_init(&mqtt_cfg);
|
||||
if (client)
|
||||
{
|
||||
if (esp_mqtt_client_register_event(client, esp_mmqtt_ID, mqtt_event_handler, client) != ESP_OK)
|
||||
LogFile.WriteToFile("MQTT - Could not register event!");
|
||||
if (esp_mqtt_client_start(client) != ESP_OK)
|
||||
LogFile.WriteToFile("MQTT - Could not start client!");
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if(MQTTPublish(_LWTContext, "", 1)) {
|
||||
LogFile.WriteToFile("MQTT - Client init successful");
|
||||
}
|
||||
=======
|
||||
if (mqtt_connected)
|
||||
MQTTPublish(LWTContext, "", 1);
|
||||
else
|
||||
LogFile.WriteToFile("Problem with (Re)Connection not successful!");
|
||||
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFile.WriteToFile("MQTT - Could not Init client!");
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
void MQTTdestroy() {
|
||||
if (client != NULL) {
|
||||
esp_mqtt_client_stop(client);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="5a31543";
|
||||
const char* GIT_REV="77427a8";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="rolling";
|
||||
const char* BUILD_TIME="2022-08-31 21:56";
|
||||
const char* BUILD_TIME="2022-09-03 08:15";
|
||||
@@ -1,4 +1,4 @@
|
||||
const char* GIT_REV="5a31543";
|
||||
const char* GIT_REV="77427a8";
|
||||
const char* GIT_TAG="";
|
||||
const char* GIT_BRANCH="rolling";
|
||||
const char* BUILD_TIME="2022-08-31 21:56";
|
||||
const char* BUILD_TIME="2022-09-03 08:15";
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
16.3.1
|
||||
16.3.2
|
||||
Reference in New Issue
Block a user