HC-SR501 with LDR attached to it.

As a backup I ordered the AZ850 that you used in your schematic. In the meantime I will construct the circuit you kindly sent to me. I need to do the latching first before I incorporate the two relay to the PIR circuit that is working now on a timer.