evancohen / smart-mirror

The fairest of them all. A DIY voice controlled smart mirror with IoT integration.
http://smart-mirror.io
2.79k stars 695 forks source link

external motion not working #933

Closed sdetweil closed 2 years ago

sdetweil commented 2 years ago

suddenly smart-mirror external motions function stopped working

Expected Behavior

when screen turned off, should turn on when motion is detected

Current Behavior

nothing happens

Steps to Reproduce (for bugs)

install, verify sm works...

stop sm, to do some other system stuff start sm.. motion doesn't wake up anymore

sdetweil commented 2 years ago

the linux motion module runs as root, the external_motion script tries to get the running smart-mirror user to get the userid to set the detection files, but sm is not running, so uses root..

then sm cannot delete them, and gets stuck .

change external motion to use the script file permissions owner (set at git clone time) instead