ctrlaltdylan / MirrorMirror

Mirror mirror on the wall, who's the most capable programmer of them all?
406 stars 78 forks source link

Feature Request: Motion Sensativity #1

Closed jabbera closed 7 years ago

jabbera commented 8 years ago

It would be great if the monitor could go to sleep when no motion is detected for 5 minutes. Would make this usable in a bedroom. You could get really fancy and do face recognition with the PI camera, or go the traditional route: https://www.adafruit.com/products/189

jcfm commented 8 years ago

I think as far as basic functionality goes its fine, it would be cool though, I wonder if this can be easily achieved with python, it should make expandability much easier

ptrks commented 8 years ago

@jcfm This would be super easy to implement in Python. Numerous GPIO abstraction libraries exist for Python. You could very easily read the GPIO status and send the results back via POST to a RESTful API endpoint (or any other means).

Here is a great tutorial: https://learn.sparkfun.com/tutorials/raspberry-gpio

eyeinthesky35 commented 8 years ago

I'm using the motion application and making it run a bash script "xset dpms force on" upon detecting motion via usb webcam. Then using Ubuntu's power management settings to send the monitor to sleep after 5 minutes of no motion. You could alternatively set up cron to send xset dpms force off at set intervals.

nimatel commented 8 years ago

if the mirror is in lets say a bathroom could it just have a simple sensor behind the mirror element to detect light and then turn on ? that would be a simple solution. and just place the sensor somewhere where the UI elements are not seen