diff --git a/esp-temperature/esp-temperature.ino b/esp-temperature/esp-temperature.ino index 6cd2f78..85b8d8e 100644 --- a/esp-temperature/esp-temperature.ino +++ b/esp-temperature/esp-temperature.ino @@ -13,9 +13,9 @@ #include const char* ssid = "CTDO-IoT"; -const char* password = ""; +const char* password = "12345678"; -#define DEVICENAME "haus/bad" +#define DEVICENAME "dummy/dummy" #define TOPIC DEVICENAME"/temperature" #define TOPICVOLTAGE DEVICENAME"/voltage" #define ONLINETOPIC DEVICENAME"/online" @@ -74,7 +74,7 @@ void onMqttPublish(uint16_t packetId) { void onMqttConnect(bool sessionPresent) { char buf[7]; packetId1Pub = mqttClient.publish(TOPIC, 1, true, ftoa(tempC, buf, 2)); - packetId2Pub = mqttClient.publish(TOPICVOLTAGE, 1, true, ftoa(voltage, buf, 2)); + packetId2Pub = mqttClient.publish(TOPICVOLTAGE, 1, true, ftoa(voltage, buf, 5)); } void setup() { @@ -145,6 +145,7 @@ Serial.println("Connecting to WIFI"); void initiateDeepSleep() { + Serial.println("initDeepSleep"); ESP.deepSleep(sleepTimeS * 1000000); delay(100); }