Hi Christophe,
I haven't considered ESP32 so thanks for the tip. Might be a nice POC for the future.
Currently I'm working on a solution by using an ATTiny13 (It's still in breadboard status).
I connected the PIR to the ATTiny and programmed an interupt on it so it will wake up when the PIR goes HIGH. I also programmed a watchdog so if the PIR doesn't switch on it still wakes every 2 minutes. When the ATTiny wakes up i send a High to a transitor which connects the ESP to GND and so it I’ll boot. From the ATTiny I also forward the digitalRead of the PIR to a GPIO on the ESP so the ESP knows if the ATTiny woke up because of the timer or the PIR. First step of the ESP is to put a Signal high back to the ATTiny so the ATTiny knows the ESP Is a wake. Then it reads the PIR value and the DHT Sensor puts it on a MQTT Topic. Last step before the ESP.deepSleep command is to put the signal to Attiny to LOW so the Attiny Knows it can go to sleep as well.
The Attiny is an extra component but it does solve the issue for about 40 cents and the circuit consumes less power because the ESP is not sleeping but completely turned off. THe Attiny only consumes about 5 uF while sleeping so that's kind of the best you can get i think.
Extra bonus is that my family thinks I'm some kind of wizard when they see me program such a small chip :).
Regards,
Laurens.