Problem understanding non blocking delay via millis()

Please the full version of your latest sketch - snippets are no use.

I suspect you shouldn't have the time test inside the "if(digitalRead(pir) == HIGH){"

...R