<commit_before>#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_log.h"
#include "esp_event_loop.h"

#include "mqtt.h"
#include "mqttservice.h"

static const char *TAG = "mqttservice";

void connected_cb(void *self, void *params) {}

void disconnected_cb(void *self, void *params) {}

void reconnect_cb(void *self, void *params) {}

void subscribe_cb(void *self, void *params) {}

void publish_cb(void *self, void *params) {}

void data_cb(void *self, void *params) {}

mqtt_settings settings = {
    .host = CONFIG_MQTT_SERVER,
    .port = 1883,
    .client_id = "mqtt_client_id",
    .username = "user",
    .password = "<PASSWORD>",
    .clean_session = 0,
    .keepalive = 120,
    .lwt_topic = "/lwt",
    .lwt_msg = "offline",
    .lwt_qos = 0,
    .lwt_retain = 0,
    .connected_cb = connected_cb,
    .disconnected_cb = disconnected_cb,
    .reconnect_cb = reconnect_cb,
    .subscribe_cb = subscribe_cb,
    .publish_cb = publish_cb,
    .data_cb = data_cb
};

void init_mqtt_service() {

    uint8_t sta_mac[6];
    esp_efuse_read_mac(sta_mac);

    ESP_LOGI(TAG, "sta_mac=%x:%x:%x:%x:%x:%x\n", sta_mac[0],sta_mac[1],sta_mac[2],sta_mac[3],sta_mac[4],sta_mac[5]);

    // build the client id using last 3 octets of the mac address
    char buf[32];
    sprintf(buf, "esp32-%x%x%x", sta_mac[3],sta_mac[4],sta_mac[5]);
    strcpy(settings.client_id,buf);

    mqtt_start(&settings);
}
<commit_msg>Clear the MQTT user and pass.<commit_after>#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_log.h"
#include "esp_event_loop.h"

#include "mqtt.h"
#include "mqttservice.h"

static const char *TAG = "mqttservice";

void connected_cb(void *self, void *params) {}

void disconnected_cb(void *self, void *params) {}

void reconnect_cb(void *self, void *params) {}

void subscribe_cb(void *self, void *params) {}

void publish_cb(void *self, void *params) {}

void data_cb(void *self, void *params) {}

mqtt_settings settings = {
    .host = CONFIG_MQTT_SERVER,
    .port = 1883,
    .client_id = "mqtt_client_id",
    .username = "",
    .password = "",
    .clean_session = 0,
    .keepalive = 120,
    .lwt_topic = "/lwt",
    .lwt_msg = "offline",
    .lwt_qos = 0,
    .lwt_retain = 0,
    .connected_cb = connected_cb,
    .disconnected_cb = disconnected_cb,
    .reconnect_cb = reconnect_cb,
    .subscribe_cb = subscribe_cb,
    .publish_cb = publish_cb,
    .data_cb = data_cb
};

void init_mqtt_service() {

    uint8_t sta_mac[6];
    esp_efuse_read_mac(sta_mac);

    ESP_LOGI(TAG, "sta_mac=%x:%x:%x:%x:%x:%x\n", sta_mac[0],sta_mac[1],sta_mac[2],sta_mac[3],sta_mac[4],sta_mac[5]);

    // build the client id using last 3 octets of the mac address
    char buf[32];
    sprintf(buf, "esp32-%x%x%x", sta_mac[3],sta_mac[4],sta_mac[5]);
    strcpy(settings.client_id,buf);

    mqtt_start(&settings);
}

{'fraction_non_alphanumeric': 0.15513698630136985, 'fraction_numerical': 0.01780821917808219, 'mean_word_length': 4.0102915951972555, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7034939', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1156, 'n_words': 227}