diff --git a/src/main.cpp b/src/main.cpp index bcd3f43..6d6b098 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -426,6 +426,7 @@ void connectToMqtt() mqttClient.onConnect(onMqttConnect); mqttClient.onDisconnect(onMqttDisconnect); mqttClient.onMessage(onMqttMessage); + mqttClient.setClientId(WiFiSettings.hostname.c_str()); mqttClient.setServer(mqttHost.c_str(), mqttPort); mqttClient.setWill(statusTopic.c_str(), 0, true, offline.c_str()); mqttClient.setCredentials(mqttUser.c_str(), mqttPass.c_str()); @@ -716,7 +717,7 @@ void setup() //TSL2561::Setup(); HX711::Setup(); #endif - xTaskCreatePinnedToCore(scanTask, "scanTask", 7168, nullptr, 2, &scanTaskHandle, CONFIG_BT_NIMBLE_PINNED_TO_CORE); + xTaskCreatePinnedToCore(scanTask, "scanTask", 7168, nullptr, 1, &scanTaskHandle, CONFIG_BT_NIMBLE_PINNED_TO_CORE); xTaskCreatePinnedToCore(reportTask, "reportTask", 7168, nullptr, 1, &reportTaskHandle, REPORT_PINNED_TO_CORE); configureOTA(); }