Enabling Motion Detection
#Enabling Motion Detection
WARNING: Only compatible with Raspberry Pi
#####Do not enable or attempt to install on any thing other than a Smart-Mirror compatible Raspberry Pi Device.
Motion Detection requires Johnny-five.io as well as Raspi-io.
make sure you're within the smart-mirror folder.
from the smart-mirror folder run the following command.
npm install johnny-five && npm install raspi-io
Use the Motion Settings of the ConfigUI to configure and enable the motion detection after installing dependencies.
Default Value if not included in config.js
Identify GPIO input Pin connected to output pin of the PIR device or other device used to detect motion
enable motion detection
Wiring Diagram with LED
Wiring Diagram without LED
Motion detection works with AutoTimer Settings. Using Johnny-Five's motion API the PIR device is connected to a PIN on the Raspberry Pi. Suggested PIN is GPIO 26 as illustrated in figure 1 and figure 2 above. When the
motionstartevent is triggered the
auto-sleep timeris stopped and will remain stopped until the
motionendevent is triggered. When the
motionendevent is triggered the
auto-sleep timeris started and set to the
config.autoTimer.autoSleepinterval set in configUI.
A live chat to get help and discuss mirror related issues: discord chat. Usually there are a few folks hanging around in the lobby, but if there aren't you are probably better off filing an issue. Please tag @justbill2020 on any motion detection issues.