I’ll have more on this in the next couple of days. But here’s a preview just to whet your appetite.
Best posts made by bhepler
RE: Sell MagicMirrors?
IIRC, @michmich looked into offering this as a commercial product and he ran into patent and licensing problems. The laws of your country may vary, but the short version is you can’t offer a magic mirror as a commercial product without involving lawyers and giving the patent holders some sort of payment.
You may be able to make one for your friends as a favor, with them picking up the expense of the materials. But you won’t be able to turn this into a business without careful and professional legal advice.
Motion Detection with RaspiCam, Non-Module version
First, I want thank @alexyak for his
In the end, I ended up seeking another solution. The Facial Recognition module didn’t work due to the reduction in light coming through the mirror itself. But I do get an image. I started browsing sites of people who have turned their Raspi into a security system. It turns out, someone ported the Motion framework to Raspberry Pi and called it MMAL-Motion.
After a lot of reading, I found a Wiki for MMAL Motion. Following the steps for Jessie, I did the following:
- Change to your home directory.
- Install the library dependencies (just copy & paste into the terminal. I wouldn’t want to do this by hand)
sudo apt-get install -y libjpeg-dev libavformat56 libavformat-dev libavcodec56 libavcodec-dev libavutil54 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev
- Download the precompiled binary archive file:
- Uncompress the archive file
tar -zxvf motion-mmal-lowflyerUK-20151114.tar.gz
This will put a configuration file called
motion-mmalcam-both.confand a folder called
motionin your home folder. At this step you can test it if you like, but for my purposes I needed to make a few changes tot the config file. So, make a copy and edit the copy.
cp motion-mmalcam-both.conf motion.conf
I played around with the configuration quite a bit until I found one I liked. But for our purposes (turning the display on when someone comes near) you only have to make a few changes.
framerate 4- run the detection video at 4 frames per second
threshold 2500- increase the # of pixels to trigger the screen. We want them to get close to the mirror
minimum_motion_frames 2- Motion must be detected in 2 consecutive frames (at 4 FPS)
event_gap 60- This is important. This is how long in seconds after no motion the screen will turn off.
output_pictures off- Do not save images
ffmpeg_output_movies off- Do not record video
stream_port 0- Turn off remote viewing
webcontrol_port 0- Turn off HTTP control of camera
on_event_start vcgencmd display_power 1- Important! This is the command to turn on the screen
on_event_end vcgencmd display_power 0- Important! This is the command to turn off the screen
motion.conffile and now you can test it out by entering
./motion -c motion.conf. If you stay very still for a minute, the screen should turn off. Move close to the mirror, and everything should come back after a couple seconds.
- Change to your home directory.
RE: About to build for the first time, dont understand the point of the OS.
@seedhe - The module framework that @MichMich created is where the technique of hosting the mirror on a Pi really shines. While the Magic Mirror is more-or-less a customizable web page, the ability for the modules to call background processes adds a level of utility.
For example, I can put a static web page up on an Amazon cloud IP and just hit that from my mirror. It will display static data and maybe some things from various APIs, if I code it cleverly enough. But that’s about it.
With the OS working behind the scenes, I can display anything behind my firewall (IP cameras, weather stations, temperature sensors, PIR sensors, etc.). I can also plug in a camera and/or microphone and use the data from those devices in my modules.
It also allows you to scale up if you need to. A Raspi is pretty slick for its size and cost. But if you put something like a NUC behind it, you can use that processing power for some really cool features. Voice recognition, facial recognition, complex animations, etc.
RE: remoteFile in compliments module
Sorry for not helping earlier, folks. I was at a wedding and delivering my mirror as a gift. I’ll investigate and see if I can’t improve the mirror code.
You should not ever have to modify the
compliments.jsfile. You should be able to pull it off with just modifications to the
RE: MMM-Bob-Ross: For putting a happy little painting up on your mirror
This is a happy little module.