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
Upgrading Mirror Mark II
The 2nd mirror I made was for my office using a really wide piece of one-way mirror that I had fall into my lap. After a lot of tribulations, I got it done. But I was never really happy with it. The mounting system was clunky, it hung away from the wall a lot, there was a huge dead space in the middle, I used two different processors for the monitors, power was via a concealed power strip mounted on the wall, etc.
I just finished upgrading the double-wide mirror to a triple-monitor setup. New frame, new facing, better mounting and a power plug that I highly recommend to anyone.
First, I build the support frame. I added a rabbit around the inside to hold the glass.
Next I built the facing out of chair rail molding. This is the same material as previous (the boss likes it).
After staining the facing, I joined the support frame to the facing. Eventually, the glass will sandwich between these two pieces. The metal L brackets are screwed in so that I can transport the entire thing as a unit and detach the pieces when it’s time to migrate the glass from the existing mirror to the new frame.
Next, I cut a hole for the power plug. I found these on Amazon. I did have to wait a couple weeks while they shipped from China, but I think they were worth the wait. No more inline switches on power cords!
The power port is wired into a power strip that I also bought off of Amazon. This will provide a place for the monitors and Pi to plug in. It just has enough slots. I’m using every AC and USB socket on this thing. I tried glueing it to the support frame but it didn’t work. I ended up zip tying it in place.
Quick testing to make sure I didn’t miswire anything. You can see some other steps here: the support frame has been painted black so it won’t show through the one way glass. The holes in the support frame for the power cords and USB cords have been drilled and the cords are threaded. The power cords were snipped in order to make it through the holes, so I reconnected those with some wire nuts. There are some pieces of scrap wood on the support frame that are screwed in with one screw. Those hold the monitor up against the glass so the monitor doesn’t slide out due to gravity. They’ll rotate into place one the monitors are in position up against the glass.
After testing, I took it to work and installed in over about 3 hours. I had someone in the office help me which was a lifesaver. It’s heavy! We took down the old mirror, disassembled it, moved the glass over to the new frame, screwed the facing on, flipped it over, removed the monitors from the old mirror, took off the bezels, installed them in the new mirror, took down the old VESA mounts, put up the new French cleats and then finally hung the mirror.
I went back today to configure it. I think it turned out really well!
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: MMM-Bob-Ross: For putting a happy little painting up on your mirror
This is a happy little module.
Latest posts made by bhepler
I was speaking about getting in the mail soon my new microphone that is 3.5mm connector so I can plug it into the raspberry pi’s “headphone” jack (am I wrong it being a 3.5?)
Hrm. Looking at the specs, it’s a 3.5mm four-pole headphone and composite video jack. Four-pole suggests that it’s designed for headsets with a microphone. I’d want to try that to be sure, but… theoretically you could make it work if you have the right adapter. You’ll need something that will bypass the audio channels and connect to the mic contact.
The fact that it is a video out as well is still blowing my mind a bit.
RE: Any way to fix this?
It looks like the power traces lengthwise along the strip. If you gently pop the monitor out of the frame, you can probably identify where the contacts are supposed to meet up on the side of the monitor.
You may be able to use a very small dab of hot glue in the middle to keep it in place. Or one of the industrial boogers from a credit card offer. Power should follow the trace, so even if it has to go out a half millimeter, it should still conduct. Hold it down when you put it back into the frame, naturally.
It also looks like you only need that one trace from group to group. You could try bridging the pads on the monitor with a scrap piece of wire and see if that gives you power to the last 3rd of the monitor. If it work, solder the wire in and see if that give you your monitor back.
RE: Customized frames for MM
You may have luck checking with the local school shop class and/or technical college. People learning how to use the tools can easily make the frame for a monitor. I’m not familiar with Norway’s educational system, but someone has to make furniture and they have to learn somewhere. Find them.
RE: AR for face - like snapchat filters
Or maybe even take a video of you turning you head around 180 and then replaying the video alongside your real-time reflection so you can see what the back of your head looks like. Maybe useful for hair styling.
You could try the MMM-Selfieshot module.It gives you a configurable countdown before taking the photo. Start the countdown, turn around, wait for the photo and then turn around again.