From e880885b7e610626af4b1ebcf77a4f94c2579f05 Mon Sep 17 00:00:00 2001 From: starcalc Date: Sun, 17 Mar 2019 18:12:25 +0100 Subject: [PATCH] =?UTF-8?q?H=C3=B6here=20Pr=C3=A4zision,=20Devicename=20ge?= =?UTF-8?q?=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esp-temperature/esp-temperature.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); }