MMM-PIR-Sensor
MMM-PIR-Sensor copied to clipboard
PIR-Sensor needs initial movement once to work - Workaround
Hi paviro,
as the PIR-Sensor needs initial movement once to work a found a workaround for my scenario.
My scenario:
I start my MM with a timer on my power outlet.
So i want the monitor off after start. Because the PIR needs movement once to work, it stays on until first person passes the sensor (no matter which value i have in powerSavingDelay: 60).
My workaround: I did following additions (around line 139) in node_helper.js
this.started = true;
self.deactivateMonitor();//addition AxLED
Explanation: MM starts and shows up for seconds, until module MMM-PIR-Sensor is loaded. Then the monitor gets deactived. If a person passes the PIR it activates the monitor.
Maybe this could be integrated in future version of your module, maybe chooseable by parameters in config.js. As i dont know what you planned with your module i didnt make a pull request.
Regards
AxLED
I have the same issue and will try this workaround. How could I add a kind of timer, so that self.deactivateMonitor() jumps in e.g. after 60 sec.?