hi, yeah could not get the example to work at an acceptable speed but had more luck with this code Turn on lights on and keep them on when motion detection works almost instantly, also having better luck with hard wired PIR’s to the PI’s GPIO’s. also tried as suggested deleting database, good suggestion but no luck.