letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.28k stars 2.21k forks source link

Make Boot reason readable in rule #1138

Closed igrowing closed 1 year ago

igrowing commented 6 years ago

NOTE: This is not a support forum! For questions and support go here: https://www.letscontrolit.com/forum/viewforum.php?f=1

Steps to reproduce

In Arduino C it's possible to know a boot reason of ESP8266 with command: ESP.getResetReason() The list of boot reasons (what causes boot or reboot) https://github.com/esp8266/Arduino/blob/master/cores/esp8266/Esp.cpp#L372

I want to make a rule which on boot acts differently in dependency of boot reason: In case of watchdogs or exception it should send MQTT message. In case of sleep awake it should turn on relay. In case of normal boot it should turn on LED.

Expected behavior

Tell us what should happen?

Actual behavior

Tell us what happens instead?

System configuration

Hardware:

Software or git version: The issue is open per request: https://www.letscontrolit.com/forum/viewtopic.php?f=4&t=5053&p=26203#p26205

dersparkiie commented 4 years ago

I would also like to use the boot reason for different actions. Could someone please help?!

tonhuisman commented 1 year ago

This has been implemented, with some restrictions though. Can be closed.