esp8266 deepsleep

Perhaps adding a simple switch in order to power the assembly only if the door is open may solve this problem outside coding environment.