why are you using a MM module?
This is not related to the mirror itself. Use @cowboysdude (how funny is that in this context ;) ) script.
You can find it in his github respository. By the way, this dude creates really cool stuff, so its worth to have a closer look to it.
If your PIR is cabled well, it should work easily.

