diff --git a/platformio.ini b/platformio.ini index 2f00ae7..c6d05cd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,14 +1,20 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:esp32doit-devkit-v1] -platform = espressif32 -board = esp32doit-devkit-v1 -framework = arduino +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:esp32doit-devkit-v1] +platform = espressif32 +board = esp32doit-devkit-v1 +framework = arduino +lib_deps = + khoih-prog/ESP_WiFiManager@^1.1.2 + monstrenyatko/ArduinoMqtt@^1.5.1 + beegee-tokyo/DHT sensor library for ESPx@^1.17 + bblanchon/ArduinoJson@^6.16.1 + knolleary/PubSubClient@^2.8 diff --git a/src/OutsideTempSensor.cpp b/src/OutsideTempSensor.cpp index 794d27e..64d5e00 100644 --- a/src/OutsideTempSensor.cpp +++ b/src/OutsideTempSensor.cpp @@ -19,7 +19,7 @@ */ #include -#include +#include #include #include #include "DHTesp.h" @@ -68,7 +68,7 @@ void reconnect() { while (!client.connected()) { Serial.print("Attempting MQTT connection..."); // Create a random client ID - String clientId = "ESP8266Client-"; + String clientId = "ESP32Client-"; clientId += String(random(0xffff), HEX); // Attempt to connect if (client.connect(clientId.c_str())) { diff --git a/src/wrkspc.code-workspace b/src/wrkspc.code-workspace new file mode 100644 index 0000000..1057207 --- /dev/null +++ b/src/wrkspc.code-workspace @@ -0,0 +1,9 @@ +{ + "folders": [ + { + "name": "TempMQTT", + "path": ".." + } + ], + "settings": {} +} \ No newline at end of file