|
@ -185,15 +185,16 @@ void setup() { |
|
|
iot.mqtt.onMessage(onMqttMessage); |
|
|
iot.mqtt.onMessage(onMqttMessage); |
|
|
|
|
|
|
|
|
iot.mqtt.setWill(sensorTopic.c_str(), 0, false, "OFFLINE"); |
|
|
iot.mqtt.setWill(sensorTopic.c_str(), 0, false, "OFFLINE"); |
|
|
/*
|
|
|
|
|
|
|
|
|
// Wait here if not configured
|
|
|
|
|
|
if (iot.configuration.get("WifiConfigured") != "True") { |
|
|
while (iot.wifi.status() != WL_CONNECTED) { |
|
|
while (iot.wifi.status() != WL_CONNECTED) { |
|
|
delay(500); |
|
|
delay(500); |
|
|
Serial.print("."); |
|
|
Serial.print("."); |
|
|
screen->draw(); |
|
|
screen->draw(); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
onWiFiConnect(); |
|
|
|
|
|
*/ |
|
|
|
|
|
strcpy(state.timeStr, "--:--:--"); |
|
|
strcpy(state.timeStr, "--:--:--"); |
|
|
|
|
|
|
|
|
if (alarmclock.isNight()) { |
|
|
if (alarmclock.isNight()) { |
|
@ -235,7 +236,7 @@ void onWiFiConnect() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
udp.beginMulticast(udpMulticastAddress, udpMulticastPort); |
|
|
/* udp.beginMulticast(udpMulticastAddress, udpMulticastPort);*/ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|