This powersaving program starts automatically the RaspberryPi. It use a PIR-Sensor which triggers the booting pin to start the MagicMirror. After a waiting time the MM shutdown for power saving.
Connect your PIR-Sensor to the Pin 3 of Your RaspberryPI. An BD137 Transistor inverts the Signal for the Interrupt to start the RP. Raspberry Pi try reading the output from the PIR motion sensor. The sensor outputs a digital HIGH (5V) signal when it detects a person.
Example PIR-Sensor: https://www.amazon.de/dp/B07V6BY66P/
Connecting PIR-Sensor:
More infos to the Wake up function of the RaspberryPI:
https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi
Just clone the files into a new directory Powermanagement .
mkdir Powermanagement
git clone https://github.com/ChrisBaehrig/MM-PIR-motion-poweron.git
- Give permissions for run:
chmod +x time-shutdown.py
- Crete Batch for PM2 command:
cd ~ nano timeshut.sh
- Write into file following command:
sudo pm2 start time-shutdown.py
- Save with crtl + o and close crtl + x
- Give permissions for run:
chmod +x time-shut.sh
- Start PM2:
pm2 start time-shut.sh
- Save to PM2:
pm2 save
- Check PM2 tasks:
and
pm2 monit
sudo pm2 monit
pm2 stop time-shut
sudo pm2 stop time-shutdown.py
- Initial release
Many thanks to
- MichMich for the MagicMirror development
The Projekt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.