First of all thanks for this great review. After i changed the posetive and negative around on the NPN ( i used a 2n2222) it works like a charm.
For my specific project (bathroom) i want to also add a humidity sensor. My hope is that i can still use a timer aswell. So i want the ESP to wake up every minute to check and log the humidity to MQTT (to switch on the ventilation if needed) but if somebody walks in I want the ESP to wake up immediate so i can turn on tights. Obviously it would not be very usefull if it takes (in worst case a minute) for the lights to switch on.
With the help of this articel I've got the PIR to work. But as soon as the timer goes off it's keeps resetting itself like every 100ms. I've tried different things which capacitors an extra NPN and even diodes but i can't find a way to make both the timer and the PIR work as a trigger at the same time. Any help would be greatly appriciated.