Closed EpoxyRaisin closed 8 years ago
Please try something like this:
bool sleepFlag = false;
void onHomieEvent(HomieEvent event) {
switch(event) {
case HOMIE_MQTT_DISCONNECTED:
sleepFlag = true;
break;
}
}
void loop() { // The main Arduino loop, not the loopHandler
if (sleepFlag == true) {
ESP.deepSleep(5000000);
}
}
Just pinging you @DaSepp, any news? Otherwise I'll close this, as this is moreover an esp8266/Arduino issue more than an issue with homie-esp8266.
As i´m very busy the last weeks i didn´t verify your solution. But anyway, as nobody else is effected you can close this thread.
No problem, feel free to reopen if needed. :)
On my sensor node i want to fall into deep sleep for a specific time span.
I am doing this:
After MQTT has disconnected i´m catchig the event to fall into deepsleep.
On reaching the deep sleep command all i got is a exception.
Has anybody undertaken same issue?