I did this.
I used the MMM-PIR-Sensor module and changed the following in node_helper.js:
From:
if (data.indexOf("0x120002") !== -1)
exec("/opt/vc/bin/tvservice --preferred && chvt 6 && chvt 7", null);
To:
if (data.indexOf("0x120002") !== -1){
exec("/opt/vc/bin/tvservice --preferred && chvt 6 && chvt 7", null);
exec("python /home/pi/py-spidev/RPi-LPD8806/LED.py");
}
and
From:
exec("/opt/vc/bin/tvservice -o", null);
To:
exec("/opt/vc/bin/tvservice -o", null);
exec("python /home/pi/py-spidev/RPi-LPD8806/off.py");
}
Note that in the first from - to there is a “)” missing in the original code that you will need to fix. Also note that as soon as the module gets updated if you hack the code like I did above it will be wiped out when you update.