Hey Guys
I´m making a mailbox sensor system with a nodemcu esp32s and the code works very good, but I have problems with the deep sleep mode, I don´t think its setup correct.
The code works on that way that there are 3 switches, 1 for letter, 1 for packages and 1 for reset for letter/packages, the codes works good.
Then there are reaction on one of the sensors the esp32s wakes up and connects to the wifi and send the state message to home assistant via mqtt and goes back to deep sleep.
I want it to run on battery and I have measured power consumption when the board is in hibernate rtc it consumes ca.
8 mah per minute,
480 mah per hour.
11,520 mah per day.
and approx. 345.600mah 1 month.
I think there is a problem in the code about the deep sleep mode.
Are there one of your people in this forum there could look my code though and maybe tell me what the problem is and maybe could edit it for me ?
I have uploaded the code to pastebin on this link -> https://pastebin.com/Frny82w6
Best Regards Stig