December 15, 2016

DIY Smart Mirror ft. Alexa



Materials

  1. Computer Monitor. Buy used and look for cable inputs that point down or sideways instead of straight out. 22" recommended (I used Acer AL2216)
  2. Video cable. Whatever fits your monitor (I used HDMI to DVI adapter)
  3. Raspberry Pi 3, 16GB Micro SD Card, 5V Micro USB power supply, any RPi case
  4. Wood. I bought four 3ft lengths of 3"x1"
  5. 8 Angle brackets
  6. Short wood screws.
  7. Gorilla glue.
  8. Electrical tape.
  9. Extension Cord with multiple plugs.
  10. 50cm x 70cm Ikea STROMBY frame.
  11. Gila Mirrored Window Film 
  12. USB Sound CardLapel Micany USB powered speaker *
*Bonus Alexa Materials

Additional required tools/supplies are: scotch tape, a squirt bottle, dish soap, a drill or screwdriver, exacto knife, scissors, and a saw.

Creating the Two Way Mirror


The two way mirror is the most essential part of this build. To create this component, you just apply Gila Mirrored Window Film to any piece of glass or acrylic. This works equally well for glass and acrylic, and only takes about 15 minutes.



Ikea STROMBY with Gila Mirrored Privacy Film applied.


Remember, this is a budget solution so there is some compromise in optical quality. It's good enough for a non essential decorative mirror, but probably not a primary bathroom mirror.

Here you will need scotch tape, a squirt bottle, exacto knife, scissors, and a squeegy or scraper. There are lots of videos online with instructions too.

Applying the film:
  1. Fill the squirt bottle with water and add about 0.5 tablespoons of dish soap. Basically just one squirt.
  2. Cut off a piece of reflective film about 1 inch larger than your surface in all directions.
  3. Clean your surface, and then spray generously with dish soap mixture.
  4. Put scotch tape on both corners of the film, and pull it apart to remove the plastic protective liner. Peel the liner, spraying dish soap mixture between protective liner and the film sheet. 
  5. With the film sheet generously coated in soap mixture, lay it flat on your surface. 
  6. Squeegy down the middle, and then from the middle out to the sides. Keep spraying and smoothing until all the air bubbles are gone.
  7. Use scissors or the exacto knife to trim excess materials from edge.

You're done! Let it sit for a while before moving, as it hasn't really stuck in place until all the soap mixture dries. 


Building the frame


This frame simply facilitates holding the monitor, and attaching the mirror to your monitor. It will also serve as the enclosure for your Raspberry Pi.

Building materials


Start by finding a monitor, and ripping the bezel off by removing screws and jabbing a knife or paint scraper in the seam of the monitor. There may be some parts hanging free off the back of the monitor, which can be attached using electrical tape. Insulate the back of any menu buttons with electrical tape as well to prevent short circuiting.


Once you have ripped the bezel off, it's time to build the frame. Use your most basic woodworking skills to size the wood frame, and then use the 90 angle brackets to attached the inner corners. Note, this will be hidden, so you can do an ugly job. I placed 4 small screws in the front and back corners to hold the monitor in place. 


Wooden monitor bezel

I also painted my frame black for aesthetic reasons, however it's completely hidden by the frame overhang, so this is not necessary.

Sticking it all Together 


Now we need to attach our mirror and monitor. I did this by cutting a hole in the rigid frame backing of my Ikea frame, and gorilla gluing some angle brackets to the backing to attach to the outside of the frame.


Lining up monitor over frame backing with removed section(right).

The hole in the frame backing was done using multiple passes of an exacto knife. Then I lay the monitor flat over the hole, centred everything, and used the all surface gorilla glue to fasten 4 angle brackets around each edge. I used 3d printed parts for this, but any 90 degree bracket with sufficient strength will work. 

Once the glue has set, you simply screw the bracket into the monitor frame.


Gorrilla glue setting on 90 degree angle bracket. 


It's up to you how to arrange your components. I punched some holes in the frame to run wires for my speaker and mic using a drill, and another trough for the power cable using a hand saw.

My pi case is just wedged in place. I should probably glue that or something... 

Raspberry Pi Setup


So you've built your hardware! That's awesome, now it's time to get the raspberry pi running the  MagicMirror and Alexa software. Of course the first step is just getting an operating system. I strongly recommend raspbian jessie, which already has a great install guide.

Once the Pi starts up, run the following in terminal to get the software up to date:

$> sudo apt-get update
$> sudo apt-get upgrade

You should also follow these steps to enable VNC Viewer, a remote desktop tool that allows to you acces your RPi desktop from any computer on the same network. This lets you work remotely once you've finished the initial setup, without plugging in a keyboard and mouse.

Install MagicMirror

With the basic setup done, we will now install the core application called MagicMirror. There is a guide on the website to install MagicMirror, but it didn't entirely work for me.

First I had to update NodeJs and electron:

$>curl -sL https://deb.nodesource.com/setup_4.x — Node.js v4 LTS "Argon"  | sudo bash -
$>sudo apt-get install nodejs
$>sudo npm install electron

Then I downloaded and installed magic mirror using:

$> curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash

If these run succesfully, you can just navigate to the MagicMirror directory, and run:

$>npm start

This should show the default dashboard. To edit this, navigate to the MagicMirror/config/config.js file and add custom location, calenders, moldules, etc.

There are also some additional configuration details regarding screen orientation, screensaver settings, and wifi.

Installing Alexa

If you've already got a computer on your wall, you may as well add some voice interaction. This can be done by installing and running Alexa on your raspberry pi as well. I covered this in a previous post.

Alexa and MagicMirror will then run simultaneously on the same raspberry pi (at about 25% CPU). I am hoping to create some skills to change the magic mirror layout, add to do lists, etc, but for now it's just stock Alexa.

Congratulations, now you've got a smart mirror, and maybe a personal assistant! Have fun never looking at your smart phone again. If you'd like to add some custom behaviour to Alexa, checkout this post on how to do it.



105 comments:

Unknown said...

Hi there!

Firstly, Thank you so much for taking the time to post a full detailed guide on how to do this.

I would really like to do this project but I had a few question I was hoping you could answer.

Would it be possible to do all the software setup (Raspberry Pi 3, and Alexa) on a mac? As i don't have access to Windows.

Also, I have no prior experience coding but I'm pretty sure I can follow the guides fairly easily.
Is the software setup too difficult or do you reckon I would be able to do it?

Secondly, Do you think it would be possible to do this project with the following dimensions? about 80x100, as I'd like to have this mirror in my foyer as soon as you walk in.

Lastly, Does the mirror look proper when it's turned off, as I'd like it to still be fully functional as mirror.

In your opinion, would the quality of the mirror be good enough to see as soon as you walk through the door? as you said it's probably not good enough as a primary mirror but in the photos and videos it seems to be pretty good quality.

Thank you so much!
Keep the guides coming cyber omelette!!

Ben Eagan said...

Hey unknown, I'm glad you liked the guide! Yes, this is very possible using a mac, and dimensions shouldn't be a problem so long as you can build it. Turned off the mirror looks great. I would suggest you buy some of the mirrored window film to test if it would be good enough for your foyer.

Anonymous said...

Hi man! I loved your mirror, I think it's one of the best I've seen.

Little question here, it's possible to command Alexa to play some music? I was wondering if I could use one of the USB ports of Raspberry for a flash drive, or make a folder in the SD card, and save music there for Alexa to play it... Do you think it's possible? If you could tell me at least a basis of how to do that, it would be awesome.

Thanks man, and happy holidays.

Ben Eagan said...

Hey Anonymous, thanks! It is definitely possible to play music. I think the easiest way is simply to link Spotify to your Amazon account (https://support.spotify.com/us/listen_everywhere/on_speaker/spotify-amazon-speakers/)
. You can also us Amazon Music which gives you a small free storage space for around 100 songs.

Getting music to play from the hard drive isn't as obvious though, and is something I'd also like to get working. I think you would have to write your own skill, but it shouldn't be too difficult.

Matthew Jones said...

Awesome guide! I'm new to raspberry pi and this gave me the confidence to jump in on my own project. One quick question though; how does the on/off and power cord situation work? Two separate plugs, monitor standby mode makes sense but what about the rpi? Mostly just out of curiosity

Ben Eagan said...

The raspberry pi is on as long as it's powered. You can shut it down using the "halt" or "shutdown" commands, and you turn it on by providing power. Mine stays on all the time for this. I'm not sure I understood the question properly, but hopefully that helps. I'm glad to hear this is getting you started!

Anonymous said...

Hi, great looking mirror - quick question, using GILA mirrored film you mentioned the quality is lower, do you mean the quality of it as a mirror or the transparency of it, making the LCD not come through as bright? Also how does this work in low light, does the mirrored film lose the mirror effect or does it become clear in low light? Again great looking smartmirror and thanks for the write up!

Ben Eagan said...

Thanks Anonymous! GILA suffers most for crispness of reflection. Letters come through perfectly, but reflection is softened. Low light is good, but in a totally dark room you see some
monitor glow.

Unknown said...

Hello, anyone have a good config file??

Anonymous said...

Hi, thank you for posting this tutorial. I've got a raspberry pi for Christmas and intend to recreate this project with an old 42" tv. (might have to compromise on it if it proves to difficult)
I have a couple questions about setting up the speaker/mic.
I hope to skip the speaker installation part because the tv had speakers. However I'll need a microphone and I wonder I should use a webcam? maybe use skype on it later on? Do you recommend going this route? I don't know much about the pi yet so I wonder if the tv speakers will work at all?

Ben Eagan said...

Hey Anonymous, sounds like a good use for the TV! I'd love to see a picture once you get it going... Using the speakers sounds like a great idea, all you need is the 3.5mm audio jack as an input. So depending on how you pass audio to the TV, it should be simple to run it out of the Pi audio jack. Webcam would be an interesting addition too... I'd suggest getting it running on its own with the Pi first. Then you can work on the configuration details through MagicMirror or scripts.

Matilda said...

Hey! I love this tutorial. As someone completely unaware of how to code or do any tech work, what would you say the difficulty level of this is? Is it a good learning project? I really want to get into more tech-savvy crafts and this one appeals to me the most.

Ben Eagan said...

Thanks Matilda! I think you could probably get started with this project, but I would treat each step as it's own mini project. Just getting the raspberry pi setup would be the best place to start. Then you can try installing MagicMirror, and build the frame / mirror. I'd suggest adding Alexa last, as it's probably the hardest and least essential. Still pretty manageable though! Feel free to send questions my way as you work on it.

Unknown said...

Excellent guide. I see that you keep yours powered on all the time, but is it possible or is there an easy way to at least be able to power off the monitor? I assume the power button still works but it may just be hidden behind the mirror. I've just been thinking of possible solutions to conserve some energy.
-Eric

Ben Eagan said...

Hey Eric, I actually have a crontab script to turn mine off at night, and on again in the morning.

On:
#!/bin/bash
tvservice -p
fbset -depth 8
fbset -depth 32

off:
#!/bin/bash

tvservice -o


I'm hoping to do a followup post with tips and tricks like this one.

שחר צוק said...

is it important to use res pi 3 or can i use 1/2?

Eric Hand said...

Being new to Raspberry Pi's, I have another question you may be able to answer - could you also use the same pi to host the adblocker pi-hole?
-Eric

Ben Eagan said...

To answer the previous comment.. not sure about pi 1/2, worth a shot if you've got one lying around.

Eric, the only restriction will be CPU performance. Mine sits at about 50% with alexa and magic mirror going, I expect you could easily tack Pi-Hole on top of that. Give it a try!

Eric Hand said...

Thanks again for the info. I'm ordering the materials for mine and will hopefully get started on it next week! I already have a 22 in monitor that I don't use and I'm going to see if I can build one in a 16x20 shadow box frame.

שחר צוק said...

Is there a way to sync the calendar to the one on my phone?

Ryan said...

I've managed to get the software running, but after a while when running alexa and the smart mirror app at the same time, my raspberry pi freezes. Any suggestions

Ben Eagan said...

Hey Ryan, I think the first things to check are that you're giving sufficient voltage to the Pi, and that it isn't overheating. There are lots of tutorials if you google "get raspberry pi temperature". I would also make sure you followed the apt-get update and apt-get upgrade commands at the start of the Raspberry Pi config in this tutorial.

Good luck, and let me know how that goes. I should mention that since I've left Alexa running (about 1 month), I have had one case of the app crashing for unknown reasons. If yours is freezing (becoming unresponsive), then these are likely not related.

Anonymous said...

I know its probably unlikely but would their be any ways to do this with an aurduino

jbryanz1 said...

Hi There, great tutorial, i have set alexa up on my Pi however, im in england and the times are wrong, is there anyway of correcting this? any help much appreciated

jbryanz1 said...

dont worry ive fixed it! If anyone else has this issue you need to download the alexa app to your phone, select your Pi and change your location.

Anonymous said...

Will plexi glass work, and look okay

Ben Eagan said...

Hi Anonymous, plexiglass works well. It's what I built my prototype with.

שחר צוק said...

hey, I was wondering if there a way to sync the mirror with an android based calendar?

Ben Eagan said...

Yes it absolutely can be synced with android calendar. Checkout the magicmirror2 pages on config files to see how.

Anonymous said...

Hello I have a question I do not have a raspberry pi 3 at the moment but I found one of my old raspberry pi 2 will this still work with the pi 2?

Ben Eagan said...

Hey Anonymous, I haven't tried it myself as I don't have a pi 2 - but I am pretty confident it will work just fine. There is a 100% chance you can get magic mirror going, but I'm not sure about Alexa voice assistant.

Why not try getting the software running on what you have, and if it works you can proceed with the hardware mirror aspect?

Let me know how it goes too please!

Mr Teavhagun said...

Hi great work on your smart mirror. I was able to get Alexa to work on my magic mirror by following your thorough instructions. My question is how do I automatically run Alexa every time I turn on my Pi? Do you have the cron/script that you just execute? Care to share? Thanks!

Ben Eagan said...

Hey, nice work Mr Teavhagun! Care to share a picture of the finished product?

Unfortunately I still haven't solved that problem. I do run a "tvon" and "tvoff" script though to turn my monitor on and off, and then I leave the Pi running 24/7.

Scripts can be found here:
https://gist.github.com/benrules2/f3ddef15ce0c268226b172b61c98adb1

Mr Teavhagun said...

I'll take a pic once I get home. Sorry for not being specific, I followed this steps:

https://github.com/alexa/alexa-avs-sample-app/wiki/Raspberry-Pi

Step 7: Run your web service, sample app and wake word engine

Now that installation is complete, you'll need to run three commands in 3 separate terminal windows:

Terminal Window 1: to run the web service for authorization
Terminal Window 2: to run the sample app to communicate with AVS
Terminal Window 3: to run the wake word engine which allows you to start an interaction using the phrase "Alexa".

Can this be combine in one cron/batch file script so whenever I reboot by Pi, it will automatically launch Alexa?

Ben Eagan said...

The trouble is the 2nd command requires user interaction in a web browser, so automatically running them doesn't successfully start Alexa. Maybe you could use an automated GUI tool to get around it, but I think a new App is required that authorizes by device.

Mr Teavhagun said...

Thanks for your response. Will do some more research.

Carter's said...

My Alexa install was going so well until I tried to run it ". automated_install.sh" then it just freezes. Has anyone had this issue? its driving me mad

Ben Eagan said...

Hey Carter, a couple questions for you. Are you using the Raspbian Jessie distro? Does the whole system lock up, or just the script (will it respond to ctrl-c or ctrl-z)? Any output before it freezes?

Carter's said...

Hi Ben, thanks for getting back to me. I've managed to get it loaded. After I started to run the programme I would hit a pager page. This I now know gives you the opportunity to not install certain parts of the programme should you wish. When you scroll to the bottom of the page you get the option to "q to quit". After that the programme carries on loading until it completed.

Vageesh Vasisht said...

Can you tell how you get it to display in magic mirror. my whole setup is complete. Just could find how display is configured for in config.js

Ben Eagan said...

In the MagicMirror directory there is already a sample config that can be modified. If you run "npm start" from the MagicMirror directory, what happens?

Vageesh Vasisht said...

Ben Eagen .. It starts magic mirror and alexa is running in background fine but i was looking for something like sine wave that is displayed on Magicmirror when you say wakeword. That doesn't show up.

Mohammed Al-Azazi said...

Hey Ben,

How did you hang the magic mirror?

Ben Eagan said...

Hey Mohammed, I just found two wall studs and put screws in the wall sticking out about 1cm. Then I just placed the frame onto the screws, and the heads bit into the soft wood. I would probably recommend buying some framing wire though, as if these bent over time it could be bad!

Anonymous said...

Hi Ben,

First of all, great work! I'm building this one :)
There is only one question i have at this moment. You said "Alexa and MagicMirror will then run simultaneously on the same raspberry pi (at about 25% CPU)", are you sure about that? I tried both on the same RPi3 but it got a bit slow and Alexa wasn't responding that well. So i installed them on their own RPi3 and it works a lot better, especially Alexa but the wakewordagent is using like 85% of the CPU using Sensory (kitt_ai stopped after a few questions). Like to know how you got the CPU load at 25%, even when running both on one RPi3? :D

Thanks!

Bob

Ben Eagan said...

Hi Bob,

Glad to hear you're working on one of your own! If you have two pis, I can't see any reason to squeeze these both onto the same device.

I checked again though and my CPU usage sort of bounces between 25-35%, though that's between 4 cores. If I run "top -o %CPU" I see wakewordagent taking 100% (one core), and all other processes are less than 10%.

My only explanations for instability would be high enclosure temperatures, or the background noise increasing load on wakewordagent somehow.

If you've got two though, may as well use 'em!. I'd be interested to see how they look arranged in your enclosure together too. Fire over some links in these comments if you feel like sharing!

Anonymous said...

Hi Ben,

Thanks for your answer!

The Pi with Alexa is telling me the following when i do top -o %CPU:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18477 pi 20 0 124648 9632 6696 S 326.9 1.0 20:41.75 wakeWordAgent

As you can see, almost al 4 cores.

I will post some links when it' s ready! First gonna try to figure this out :)
Backnoise doesnt seem to be the problem as turning off the mic don't make any difference.

Bob

Ben Eagan said...

Bob, wow you weren't kidding about high cpu usage! Do you get the same results using kitt_ai (even if it crashes)? Feel free to pass on any other clues you may uncover if you want a second mind on it.

Anonymous said...

Hi Ben,

Kitt_ai is showning me i bitt less usage, but still around 300%.
Can't find anything about this on the internet and can't figure it out myself as i'm not a linux expert. It seems i just have to love with it and go on building :P Going to check your page about giving the mirror commands through Alexa :)

Bob

Anonymous said...

I ment live with it, but loving it as well ;)

Unknown said...

This is great, I got through setting everything up and Alexa worked first try, but then when I tried again, it didn't recognize me saying "Alexa." Can anybody help as to why this stopped working?

Justin Haskell said...
This comment has been removed by the author.
Colton Pinner said...

work's great I just am having trouble changing the time zone
"please help" !!!!!

Ben Eagan said...

Hey Colton, going to need more info than that. What's the problem? Time zone for your pi, or Alexa? Should just be an option in the settings either way.

Colton Pinner said...

Yeah it was I had the settings wrong in my pi, thank you :)

Shachar Zuk said...

I'm to run the script and I'm missing the package.json
what should I do?

Ben Eagan said...

Hey, Shachar Zuk I'm going to need a lot more info than that. Which script are you running? Can you include your exact input and output commands?

ShaneSaravia said...

Hi Ben, I love your guide and will be attempting this within these next couple weeks as a gift for someone. I just had a couple questions.

1. Where did you place the speaker and microphone so that you don't have to yell for it to hear you?

2. Do you have a guide or is there an easy way to integrate spotify and/or hue light commands. Since it has the speaker and mic i wanted to take full advantage of these features. Thanks!

ShaneSaravia said...

So sorry to bug you again, but in your other post you recommended the (e)scape Platinum (on sale in local Compute Canada) speaker. Which one should i get as you recommended two different ones? Also in the other you said "Mic has to be USB", however the mic you chose in both are connected via 3.5mm jack.

Ben Eagan said...

Hi Shane, glad you like the guide!

1. I glued the speaker and microphone to the bottom of the wooden frame, so outside the main enclosure.

2. I am now using hue and it works right out of the box from the Hue instructions included. Very simple. I believe spotify works too, but I don't use it so I can't verify that for you.

3. You should be my proof reader :-) What I meant is you need a usb sound card to receive the mic. So I include a USB soundcard in the item list, and the mic plugs in to that. I will edit that now to clarify.

Good luck!

Francis said...

Hey Ben,

Awesome guide, I was wondering how far the mic can pick up your voice from?

Thanks

Francis

Ben Eagan said...

Hey Francis, it's good to about 15 feet I'd say. Bedroom and living room are small and beside each other, picks up fine in both.

anonymous said...

Hi!

Firstly I would like to thank you for making this guide. I just finished my project and am very excited about it. I was wondering if you, or anyone else, had been able to link their Spotify to Alexa. I have tried linking my account to Alexa and it says it is "unsupported by this app" when I try to link them. Has anyone else encountered this, or gotten Alexa to play music from Spotify? Thank you in advance.

Ben Eagan said...

Hey anonymous, really glad to hear your build worked out! I'm sorry to say I don't use spotify, so I haven't tried getting the app running myself. Hopefully someone else here can chime in, the reddit amazonecho community might be able to help too (https://www.reddit.com/r/amazonecho/).

Unknown said...

such a great project , thanks and im going to do this on weekend , i have a orangepi and can i use it for this ? , other question is how do we authenticate amozon account without entering login details each every time rebooted the pi

Unknown said...

i got this error "line with format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported"

Ben Eagan said...

It looks like you're not alone, maybe this thread will help - https://github.com/alexa/alexa-avs-sample-app/issues/50

El_Diablo_Guapo said...

Hi great project, I was thinking to give this a try... do you think it could work with a Pi zero?

Anonymous said...

Started my project following your instructions: going to use the following display: https://www.amazon.com/Acer-G226HQL-21-5-Inch-Screen-Monitor/dp/B009POS0GS/ref=pd_sim_147_1?_encoding=UTF8&pd_rd_i=B009POS0GS&pd_rd_r=9TETHEEMAPVPCKVKZRXS&pd_rd_w=YNZ8x&pd_rd_wg=8bqiy&refRID=9TETHEEMAPVPCKVKZRXS&th=1

Do you think this display can have a less thick frame? It seems that this one is thinner than the one you used.

Ben Eagan said...

You can definitely go thinner, make sure to leave room for some airflow though - monitors can get pretty hot!

Anonymous said...

Did you add face recognition in your mirror? If yes, which camera did you use?

Unknown said...

Hi Ben... Can you please provide instructions on how you got the film to stick onto the mirror with no bubbles. I got the exact same frame from ikea, and ordered the exact same gila film. I spray it and then use a squeegee but it seems to always bubble after a couple hours. Did you let it dry standing up or laying flat? did you squeegee every 10 mins? etc. I've tried 3 times so far and keep wasting the film. Please help.

Ben Eagan said...

There are lots of resources online if you search "applying Gila film" which will probably be more useful than my testimonial. If you're getting bubbles it means there is dirt or dust on there though, so I'd recommend a microfiber lint free cloth to really wipe down the whole surface.

Shane Saravia said...

Hi Ben, just an FYI that i saw a video online which used a credit card instead of a squeegee and it worked for me... much much better. I guess you shouldn't buy your squeegee from Dollarama. Thanks for your help! Next is implementing Alexa. Hopefully i don't end up having to bother you again!

Ben Eagan said...

Good tip Shane! I would have expected a credit card to scratch the film, but I guess it doesn't. Good luck on implementing Alexa, and don't worry about bothering me if you do run in to trouble.

Nick Flowers said...

Hi Ben,
I have to say this magic mirror build is by far the best and easiest to follow. I do have somes questions though. Have you did any updates to your magic mirror since your build, did you over-clock your Rpi, and do you think 3mm thick acrylic two way mirror would work?

Ben Eagan said...

Hey, thanks Nick! I tried to keep it as simple as possible on account of not being very handy. I would expect 3mm two way acrylic to work great, I think many have succeeded with this strategy. No overclocking on the Pi, and no modifications other than a couple more drilled holes for air flow in the frame.

Anonymous said...

I have to say this is an excellent guide and for someone who bought a pi 3 one day one and followed this guide on day two, to successfully accomplish what I set out to do (baring in mind I've never coded or done any advanced IT) that is amazing!

Can I just ask, however, can you give a mickey mouse step-by-step boot up procedure which I assume you just leave to run fully powered 24/7? I hope to expand on this with multiple mirrors across my house (wireless display linked) with all rooms linked for audio input and output... eventually. Chris UK

Ben Eagan said...

Hi Anonymous, so glad to hear it worked smoothly for you! For the Alexa bootup, I just threw the 3 commands at the bottom of this post: http://www.cyber-omelette.com/2016/11/alexa-pi.html into three scripts. So when I boot up, I run ./alexa1.sh in one terminal, ./alexa2.sh in another terminal, wait for authorization, then run ./alexa3.sh in another terminal. Finally I run ./mirror.sh to start my mirror script, or have it setup using cronjob to run automatically. Did I understand the question properly? Hopefully that helps.

Kathy Smith said...
This comment has been removed by a blog administrator.
Vyse8 said...

Hi Ben, Great video. I went ahead and purchased the suggested materials from Amazon but it looks like I won't be able to order the STROMBY frame here in the US from what I can tell. Do you have any alternative suggestions that might also work? Does this contain the mirror component that I need?

Thanks.

Ben Eagan said...

Hey Vyse8, there is nothing special about the STROMBY really, except it has a sturdy glass surface and the right dimensions. As long as the frame is bigger than your monitor you should be just fine. Note that you'll also have to be able to cut whatever the backing material is... usually some sort of compressed particle board, but sometimes these are plastic.

Shane Saravia said...

Hi Ben, i just had a couple questions:

1. What did you mean by "I placed 4 small screws in the front and back corners to hold the monitor in place. " how did you place the screws to hold the monitor in place? I didn't see any screws anywhere in the photos above?

2. How did you mount the mirror to the wall? Did you use a monitor mount, or mount it by the frame? Also, please upload the link to whatever you used to mount it.

Thank You! I appreciate all your help.

Ismail Ellou said...
This comment has been removed by the author.
Ismail Ellou said...

Hi!I want to make my own Smart mirror, but i want to know which language i have to learn in order to improve Alexa's skills as I want,like making it play songs from The sd card or make it funny. And for ur mirror, i noticed that U have chosen a big Stromby picture frame compared to ur computer monitor, is it a good idea? because it will make the computer monitor looks really small when it's on, shall i buy a small one or just a stromby frame like urs, thank u

Ben Eagan said...

Hey Ismail, I just saw your message on hackster as well. Yes, this can all be done in python! More details in this post: http://www.cyber-omelette.com/2016/12/smart-mirror.html

I like the Stromby, in my opinion the monitor does not look to small, but it is centered instead of at the edge as you can see in the photos and videos. You can choose your own preference here of course, and I think both will look just fine.

Ismail Ellou said...

Thanks Ben, I follow u on Facebook And utube as well, so i'm really waiting for more videos about this project, Keep going.
Kind regards

Shane Saravia said...

Sorry Ben, any answer to my previous comment above? I'm hoping to have this done for next week (family members bday present). Not sure the best way to mount it without everything possibly falling apart.

Ben Eagan said...

Hi Shane,

I mounted it by the frame temporarily, and then added some hanging hooks like these: https://www.amazon.ca/uxcell-D-Rings-Picture-Hanging-Hangers/dp/B01M15TEGZ/ref=sr_1_12?ie=UTF8&qid=1494850493&sr=8-12&keywords=picture+hanging+hooks.

As for the little screws at the corners of the monitor, they stop the it from sliding forward and backwards in the wooden case. Not really sure how else to describe it. The purpose is so your monitor doesn't move - if it's stuck in place using any method, then you're all set.

Anonymous said...

Hi Ben, many thanks for the reply that is perfect, although not sure what 'cronjob' is but nothing a Google cannot fix, thanks again and keep up the good work!

Cherry said...

Hi Ben! Awesome idea and really nice instructions! I know practically nothing about raspberry pi but I have a really nice big frame just gathering dust in a corner so I think this might be a fantastic project to try out! Where do you connect the speakers and mic to? Did you plug everything into the extension cord and then only the wire of the extension cord comes out of the mirror? If so, how many outlets should there be on the extension cord? Would appreciate the help! Thanks! :)

Anonymous said...

How can you autorun these scripts at startup? Tried rc.local but its not really working.

Ben Eagan said...

Hi Cherry, the spirit of DIY requires some elbow grease! I'm sure you can find the answers to your questions once you start doing a little prep. :-)

Ben Eagan said...

Anonymous - unfortunately I haven't solved the autorun on startup problem yet due to the user input required from the second script (authentication with amazon). So I start it up manually and leave it running. I've been meaning to come back to this though, as it would be way better to start automatically! Using VNC viewer to remote into the mirror makes running the scripts a lot easier at least.

Shane Saravia said...

Ill save you all some time, and same for you Ben. I hope this works as a thank you for such a great guide. (This took me 3 days for a total of around 10hrs. - im a linux noob)

To Autostart MagicMirror with alexa:
(Make sure to put #!/bin/bash at the top of every file and filename ends with ".sh"

1. save the 4 commands in separate files.(3 alexa commands and 1 magicmirror command)

2. make 1 new file which runs all 4 previous ones in this format:
"lxterminal -e /home/pi/alexa1.sh"
"sleep 10"
etc.

3. type: "sudo nano !/.config/lxsession/LXDE-pi/autostart" in terminal
add "@lxterminal -e /home/pi/MagicMirrorAlexa.sh"

If you need any clarification, let me know. GL everyone!

Shane Saravia said...

Sorry, i forgot to add that you must right click on each file, click properties, then permissions, and that "Execute" must be set to "anyone". This goes for every file you create.

MEET JETHWA said...

I am getting a error electron not found
This failure might be due to the use of legacy binary "node"


please help

Ben Eagan said...

Did you follow the steps to update electron and nodejs?
" First I had to update NodeJs and electron:

$>curl -sL https://deb.nodesource.com/setup_4.x — Node.js v4 LTS "Argon" | sudo bash -
$>sudo apt-get install nodejs
$>sudo npm install electron "

MEET JETHWA said...

Thank you so much
u are the best .....

MEET JETHWA said...

bro my magic mirror does not show the weather even if I added the api key for Mumbai in the config file ...
please help

Roy Kolk said...

i got those problems. how do i fix this?
npm WARN deprecated isarray@2.0.1: Just use Array.isArray directly
npm WARN prefer global coffee-script@1.10.0 should be installed with -g
npm WARN prefer global jsonlint@1.6.2 should be installed with -g
npm WARN prefer global colorguard@1.2.0 should be installed with -g

Anonymous said...

can anyone please provide detail guide to configure pi with usb sound card?

Unknown said...

Hi Shane,

I was wondering if you could help me in terms of ensuring that the companion app starts minimised.

That companion app boots up after chromium is opened in kiosk mode, and thus sits on top of the chromium window, I don't want to have to use a mouse to minimize it everytime I reboot,

Many thanks,

M

tathai96 said...

computer monitor you mean??? monitor glass??

Unknown said...

Great job and so far I have monitor and ready to go with other stuffs.

Post a Comment