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 motionstart event is triggered the auto-sleep timer is stopped and will remain stopped until the motionend event is triggered. When the motionend event is triggered the auto-sleep timer is started and set to the config.autoTimer.autoSleep interval set in configUI.