قالب وردپرس درنا توس
Home / Tips and Tricks / How To Build Your Own Futuristic Smart Mirror

How To Build Your Own Futuristic Smart Mirror



  Intelligent mirror with calendar, weather and a dog in the mirror image.
Josh Hendrickson

An intelligent mirror can display your calendar, weather and news like something from a sci-fi movie. Powered by a Raspberry Pi, you can create your own with simple tools and hardware.

Beautiful, configurable and customized

  Smart Mirror with time, date and calendar.
Josh Hendrickson

Smart Mirrors have been around for a while, and the most popular version is by Michael Teeuw. The idea is pretty simple; They build a frame and a box. The packaging contains disposable glass (often seen on television in police dramas), a monitor, a raspberry Pi, and the cables needed to power your set-up. Michael and other contributors have created an open source Magic Mirror platform that you can install. Once installed, you can customize it to view your calendar, weather, news and more. Installing the software is easy – only one line of code is required.

The harder parts create the Frame Box, set up the Raspberry Pi, and customize the software to display your favorite information. But even someone with little or no experience in woodworking and code can create this DIY project with a little patience in a week or two. The longest parts are passive, like waiting for glue and stains to dry. You will spend about three to five hours actively working on the framework and installing the software.

And we'll show you exactly how.

What materials you need.

Depending on what you already have. This project can be either cheap or expensive. If you bought every item in the list below, you would spend about $ 700. But because we had everything but glass and wood at hand, we spent only $ 140. And remember, you do not have to buy the tools. If you have a friend who owns some, ask if you can borrow them.

To get started, you need the following:

  • One monitor: Preferably at least 60 cm, and one you do not want to lose. Slimmer and lighter is better, but this Scepter monitor would work. You must remove the stand. It is also helpful (but not necessary) to remove the frame from the monitor.
  • Two-way glass: your glass should be slightly larger than the dimensions of your monitor. The product we link to Amazon has a generic size, but we were lucky with a local glass supplier.
  • A Raspberry Pi 3
  • A Raspberry Pi case
  • Wood stain or paint
  • Polyurethane (if available) stain)
  • Wood spatula (when stained, stained wood spatula)
  • 80 grit sandpaper , 120 and 220 (omit 220 if you want to paint)
  • Miter Saw (or Handsaw and Protractor) [19659014] Wood Glue
  • Tape Measure.
  • Ruler or other straight edge (for drawing straight lines).
  • Malerband
  • Rubber Ropes
  • Short wood screws
  • Washers
  • Nylon belt
  • A screwdriver
  • High performance frame hook (when hanging)
  • Ear, eye and respiratory protection. Add a vapor filter if you apply polyurethane without ventilation.
  • Timber for building the frame and the box: We recommend hardwood like maple or walnut with a thickness of at least 2.5 cm. You also want something thin like plywood to form the back of the box if you do not hang the frame. How much wood and how wide it is depends on your monitor (see the section on creating the frame for more information.)

For a simpler setup, we have some advanced options. These are not required, but they do help:

Creating the frame

 A sketched design of a corner frame with miter and box sides.

To begin, make the following basic frame (like the one you might see hanging on your wall). Then add a simple box that houses the mirror, monitor, raspberry Pi, and cabling. Upon completion, the structure may resemble a very flat medicine cabinet.

 Sketch design of a magic smart mirror frame

Disassembling the monitor

The first step in building your frame starts with your monitor. The size of your monitor determines the size of your glass and the length and width of the wood you need. If you plan to remove the frame from your monitor, you want to do it now. Each monitor is different so we can not give any specific instructions here. You should look for seams along the edge to pry them apart, and you should be careful every step of the way. When you're done, you should have the following:

  The back of a monitor with the frame removed.
Josh Hendrickson

Determining the Wood Dimensions

Once you have removed the frame (or if you skip this step), measure the length of the monitor and the width within the edges of the screen. Measure either along the metal frame on the inside or along the inside edge of the frame if you have not taken it apart.

  With arrows indicating length and width dimensions.
Josh Hendrickson

Record this information and double the numbers. This last number indicates the total length of the wood you need. For example, the width of this monitor is 11 and a half inches, and the length is 19 and a half inches. Doubling means 23 inches or 48 inches of wood. It's best to buy a few inches more than you need to consider cut parts and bugs.

To determine the width of the wood to be purchased, place your monitor face down on a flat surface. Now measure from the flat surface to see how thick your monitor is. The wood you buy must be at least as wide, preferably wider.

The box requires a similar length to the frame, so you can double the amount again.

In this project, we bought four boards that were three inches wide and one inch thick. Two boards were 36 inches long and the other two were 48 inches long. The extra length offers plenty of room for mistakes. If you have a large vehicle, you can buy two long boards (84 inches in this case).

Miter cuts for a picture frame

  Two boards with angled cuts forming a miter joint.
Josh Hendrickson [19659003] If you are new to miter sawing, you should take a look at the helpful baseball miter saw video by Steve Ramsey.

Before working with electrical tools, sanding, or applying stains or polyurethane, you should wear protection. These include goggles and a dust mask or vapor filter. When using power tools, use ear protection such as ear plugs.

The next step is to cut miter angles in your wood. In this case, miter angles are only 45 degree angles. Two 45-degree angle boards, which are pushed together, make a 90-degree corner. And four 90-degree corners make a square, or a rectangle in this case.

You can do this cut with a miter saw, a table saw or even a hand saw and protractor. The handsaw tends to drifting problems; You may not get a perfect angle or a straight vertical cut. We therefore strongly recommend that you use a miter saw (which is covered in this guide).

First set your miter saw to 45 degrees. Your miter saw has a left 45 and a right 45 option. For this first cut, choose the right 45.

  Miter saw gauge set at 45 degrees
Josh Hendrickson

ProTip: Most Miter Saws have hard stops at 45 degrees; You should feel it click into place.

Place your first "wide" plate on the miter saw, with the top left corner just above the top left corner of the blade hole. You want the blade to penetrate the entire board, but the goal is also to minimize wood removal in this first cut.

 Board on a miter saw with a 45 degree line to show a shortcut.

Josh Hendrickson

Save the small piece you cut off; You will need it right away.

The next cut requires the opposite 45 degree angle so that both corners can be in the same direction. Turn the board over and slide it down instead of moving the saw back and forth. As you measure forward around the monitor, you need to measure the inside edges of the wood closest to the monitor. That means the shorter side.

With the panel turned upside down, measure the first length you noted earlier (11 inches in our example above) and draw a straight line up and down. Now grab the previously cut piece and draw the point with your drawing line. Draw a 45 degree angle line with it. The straight up and down line was the measured line; The angle line is from the cut piece.

This marker indicates the angle and length for your cut. Slide your board down to perform the next cut. It is important that you do not try to cut exactly the line you have drawn. Your blade is thicker than the pencil line, which means you get a shorter piece by cutting on the line than you want. Swipe the board along the blade as shown in the picture above, so that you can easily cut into the remaining wood. You can always lose a bit more weight if you have too much left, but you can not cover wood anymore.

You repeat this process to get the rest of the frame boards. Turn the board, measure the length, cut and repeat. Now you should have four angled pieces of wood that fit into a frame shape. If you find that some of your cuts have dropped off gradually, you may need to cut them off. Just take it slowly and cut off less than you think necessary. It is better to move to the right length than to cut too much to move quickly.

If the boards match, they should look like this:

 A rectangle with boards at a 45-degree cutting angle.

Gluing the frame together

Now it's time to glue the boards together. You may be wondering why we do not use nails or screens. Wood glue is incredibly strong and gives us a firmer and firmer connection than nails. It looks cleaner thanks to the absence of nail and screw heads.

It is true that miter joints are not as strong as other joints, but for our purposes we do not have the next strength, we wanted the decorative look.

Applying wood glue is a straightforward process, and if you've ever used a different type of glue, you already know most of what to do. You need to apply glue to the edge you want to join, spread it over all the wood surfaces and then press against the other piece.

But unlike paper glue, you can not just let go – to give you time for perfect placement, the wood glue has a slow drying time. If you let go of it too soon, it may slip or fall apart. To solve this problem, you can use corner clamps to hold the angled wood together. If you have no corner clamps, we have a tape trick that does the job.

First grasp a piece of length and width (in the picture above a horizontal and vertical part) and place it on the back with The angle cuts barely touching. Then cut off a piece of Malerband so that it holds both pieces of wood and place it next to your frame pieces.

  Two boards with angled ends touch next to a strip of Malerband.
Josh Hendrickson [19659003] Now apply a thin glue bead on one of the angled parts. Then use either your finger or brush to spread it so that it touches the entire face of that angle. Then apply the glue to the other angled face. With edge graining, the wood tends to soak the glue. Wait five minutes and apply the glue again. Then place the boards on the piece of tape, being careful not to touch the corners.

  Two boards on adhesive tape with adhesive applied to the mitred ends.
Josh Hendrickson

Fold the two pieces together to secure the tape stays as tight as possible. Then smooth and overhang the tape. Take your tape roll and cross the angles several times to get the tightest possible seal.

  A frame corner with adhesive tape on the edges.
Josh Hendrickson

Tip: The glue that comes out as shown here is a good sign that you have applied enough glue. Wait about fifteen minutes for the glue to gel and scrape it off with a putty or plastic butter knife.

Repeat the process with the other boards and then join them together.

 Magic Mirror Frame with Tape

Check the instructions on your wood glue and leave the frame to stick as long as necessary. The longer you keep the wood trapped, the stronger it gets, although it usually does not take more than 24 hours.

After drying the adhesive, remove the tape and check your corners. If you see gaps, that's fine. You can fill them with wood filler.

  Board corner with slight gaps.
This gap may have been due to sticking instead of jamming or a slight cut defect. Josh Hendrickson

Wooden spatula is exactly what it sounds like. It consists of pieces of wood, glue, plastic and other ingredients. The goal with wood filler is to overfill the hole. Do not worry about wood fillers, which spread in the gap and are later removed by sanding. You can use a spatula or a plastic kitchen knife to spread it on the wood.

Tip: Wood spatula should have a yoghurt mud-like consistency. When it is hard and caked together, as shown in the following picture, mix 3 parts mineral spirits and 1 part mineral oil to rejuvenate it.

  A corner of the frame with wood filler, a spatula and a plastic knife.
Josh Hendrickson

Read the pack of your wood filler again. Usually you have to wait an hour to grind, and a day to dye. After waiting long enough to grind it, use 80 grit sandpaper to remove the excess wood scraper on your frame.

Congratulations, you have built a frame. As a quick test, place glass and mirrors on the frame to check that they are firmly in place and do not fall into the rectangular hole.

Tip: If you have a router table, you can use a Roman ogee bit to add decoration to your frame.

Now it's time to build a box.

Building the Box

After your frame is done, it's time to build a box. The good news is that this is much easier than cutting the wood and assembling the frame. The basic idea is to create a wooden rectangle the size of which lies on the outside edges of your frame:

 A view of a rectangular board set on the frame.

You start by cutting two planks of wood pieces that are as long as the long boards of your frame. Measure your frame from end to end. Then measure this distance on one of your uncut boards and draw a straight line with a ruler or other straight edge. For this cut, set your miter saw to "0" for a straight cut.

  Miter Saw Set to 0 for Cutting
Josh Hendrickson [19455922] Tip: Just like that At an angle of 45 degrees, most miter saws have a "hard stop" at zero. You should feel it click into place.

If you put your board back on the saw, do not try to cut directly on the line. Cut next to the line on the side of the board that is "extra" (not the piece you cut off).

 A board on a miter saw with a ruled line, the blade to the left of the line.

In the image above, the cut-out piece is on the right. The line shown is particularly wide for reasons of clarity. Note, however, that the blade only cuts off to the left of the mark. It's better to cut and trim a board too long than to cut it too short.

After cutting your first board, you can lay it on the second board and use it as a measuring stick. Simply draw your line with the straight edge you created, and follow the steps above again when connecting.

Attach your boards to your frame and touch the edges to make sure they are flush and not too long. Crop as required. Then measure the gaps between your two boards to determine the length for the last two parts. Draw lines again, cut them off and cut them as needed.

At the end you should get the following:

 Four boards that form a rectangle.

What You Should Do A test fit of your glass and monitor with all your finished components. Place the glass and monitor on the frame and add these four boards to check if the hardware fits. It's okay if they are not tight. We'll take care of that in later steps.

Now glue the boards together. As already mentioned, the ends of a board absorb (end grain) glue and weaken the connection. Apply glue to both ends of the two shorter pieces, wait for five minutes, and re-apply. Then push the longer boards into position. Make sure they are flush (all edges are aligned).

As above, wood glue has a slow drying time, so you need to maintain a constant pressure. If you have F-clamps, you can now use three to four to put pressure on the boards. If you do not do so, bungee cord will do. Carefully wrap the bungee cord around the rectangle, making sure the corners are at 90 degrees. Then attach the bungee hooks:

  Four pieces of wood arranged in a rectangle with a bungee cord.
Josh Hendrickson

You want to use strong, tight bungee cords. And depending on the strength, you may want to use more than one sentence. The above bungee cables are brand new and fit tightly around the box, so one is enough. But you can add more for a good measure.

Wait for the glue to dry (as per your glue instructions), then remove the cords. Check again if all edges are flush and your box is flat. If the edge of a plate drifts up or down, you can sand it flat.

Gluing the box to the frame

Gluing the box to the frame is relatively easy. Push the glue along the narrow edge of the box in a line and then spread it with your finger or a brush on the wood.

  Edge of a board with glue on it.
Josh Hendrickson [19659003] The goal is to spread the glue well over the wood. However, it does not have to be a thick layer. Take a look at your frame and find out which one looks better in your opinion. Lay this side down on a flat surface (preferably covered with paper). Then place your pen with the adhesive side down on the frame.

  Box attached to the frame
Note that the upper left corner of the frame contains a black stripe. This detail determined this as the inward side. Josh Hendrickson

To apply pressure, it is easiest to use heavy objects. Place something flat, such as cardboard or plywood, on the box, and then place heavy weights, such as paint cans or books, on the edges of the frame. Make sure to keep an even distance to put pressure on the entire box.

  Paint and dye cans sitting on a flat MDF piece over the box frame.
Josh Hendrickson

Wait at least the minimum amount of time you need adhesive specified. When you remove the weights and the flat piece, check your box for gaps and fill it with wood glue as needed. After drying, it's time to sand.

Sanding the frame for pickling and painting

  Frame with pencil wavy lines drawn on the wood.
Josh Hendrickson

Before staining or painting wood, you need to paint wood to sand it properly. Grinding your wood removes splinters, dents and other defects that have arisen during the construction process. If you skip this step, staining and painting will only highlight the imperfections.

If you are new to grinding, the process is pretty simple. Sand as much as possible with the grain of the wood (ie follow the lines that you see in the wood) and do not press with all your strength.

Tip: If you are new to grinding, try drawing wavy lines on your frame as shown above. If the lines have disappeared, you have probably ground enough.

Start with 80 grit sandpaper and then switch to 120 grit and then 220 grit. If you want to paint or want a deeper stain color, skip the 220 grit paper.

After sanding, run your hands over the wood. You should feel a noticeable difference where you have ground. Try to find areas that you missed and grind them as needed.

Do not forget to grind the inside edge of your frame where your monitor is displayed. You can skip the sanding of sections that are not visible.

Pickling your frame

  A wooden frame with stains and an old pair of socks.
Josh Hendrickson

If you have decided to paint your frame frame you can skip this step and the sealing step. Just paint your frame as usual. If you have decided that you can see the appearance of the wood as it is, you can skip the pickling step, but you should not skip the sealing step.

Tip: Skip the brush, use an old pair of socks or T-shirt to apply your stain. Use two sets, one for dyeing and one for wiping.

Before dyeing, wipe off all the sawdust that you have created by sanding the frame. A sticky lint roller works well, but you can also use a slightly moistened paper. Just make sure to dry the wood immediately. If you have a shop, it may be helpful to also suck the sawdust in the area. You do not want sawdust getting into the stain.

To pollute your frame, double-check the direction of your stain to determine the drying times. Normally, a wipe and hold time are displayed. Make a note of these. First, open the can and stir the contents. The most efficient way to apply a stain is to wipe it off. That's why we recommend old socks or a T-shirt. Dip the material in the stain and let it soak up thoroughly. Then swipe over your frame. You do not have to push hard, but try to work it into the wood.

When coloring the vertical services, try to get a smooth line and avoid drops. Stain any part of your frame that will be visible, including the inner edge where the monitor is located.

Wait for the appropriate wiping time and then wipe off any excess stains that are not picked up by the wood. This step is important if you do not wipe the excess stain. The stain dries unevenly.

You will probably find that the frame is not as dark after wiping the excess stain as it is normal. If you want your frame to become darker, wait for the specified after-etching time and repeat these steps until you are satisfied.

Before proceeding to the next step, wait until the stain is completely dry. This is at least the "Restain Time" listed on your can, and the frame should not feel sticky.

Sealing the wood of your frame

  A stained frame with polyurethane, two brushes and an old tee. Shirt.
Josh Hendrickson

Wood stain is decorative; It does not protect your wood from light and other environmental influences, so you have to seal it.

You can use many different end products, but polyurethane (or poly) for wiping is a simple method. All you need is an old T-shirt. Other polyurethanes may require a brush instead.

Open the can again and stir the contents. Then charge your t-shirt or brush. Try to apply in long, even strokes to avoid running lines. When applying on vertical surfaces, try to avoid leaving large poly blobs. Otherwise, it will dry in this way.

Tip: If you've bought a "crystal clear" poly, it looks milky white when applied. When it dries, it becomes clear.

Check the instructions on your can. A dry season and a minimum number of layers are listed. Sand lightly with 220 grit paper after each drying time. Do not use power tools for this step. They grind through the polyurethane and the stain.

The goal is to smooth out all imperfections in the poly layer and not completely remove it. Repeat these steps until you reach the minimum number of layers suggested by your can. You should not need more.

Hanger for your frame

If you want to hang the frame on the wall, you have two options. You can attach sturdy suspension hooks or drill holes in the box into which the wall nails can slide. Both methods work, but you should spread at least three (left, right and center) over the top of the box to evenly distribute the heavyweight.

By drilling you get a balance to the wall profile. For the attachment of hooks, however, no drill is required.

greeting; You have created all the necessary frame components for your Smart Mirror. Now is the time to turn to the hardware.

Adding hardware to your mirror

 Frame box with monitor and recessed glass.

First place your glass and the monitor in the frame box and position them so that they pass correctly through the rectangular hole. You probably have gaps between the monitor and the mirror as well as edges of the frame.

One possibility is to screw in the shims as shown on the left photo above. However, if the space is too tight or the glass is significantly larger than the monitor, the washers will not work. Use a nylon strap instead. Screw in one side and tighten to the other side to measure. Cut a length slightly longer than necessary. Verwenden Sie ein Feuerzeug, um die Schnittkante zu verbrennen, um das Nylonband wieder zu verschließen, und schrauben Sie es dann auf die andere Seite.

Wenn der Monitor und das Glas sicher sind, fügen Sie den Raspberry Pi und die Netzkabel hinzu. Wenn Sie dem Raspberry Pi eine Hülle hinzugefügt haben, können Sie ihn mit einem doppelseitigen Klebeband am Rahmen befestigen.

 Rahmenbox mit festgeschnalltem Monitor und Glas und Himbeer-Pi

Sobald alles positioniert ist Ziehen Sie ein dunkelschwarzes Tuch über das gesamte Setup und kleben Sie es entweder auf den Rahmen oder auf den Rahmen.

 Rahmenbox mit drapiertem schwarzem Tuch.

Fügen Sie ein schwarzes Tuch über den Monitor und Glas verstärkt auch den Spiegeleffekt. Zur Veranschaulichung ist hier eine geteilte Ansicht von Zweiwegeglas mit schwarzem Stoff hinter der linken Hälfte des Spiegels.

 Ein Zweiwegespiegel mit schwarzem Stoff hinter der linken Hälfte zeigt eine bessere Reflexion.
Beachten Sie die linke Hälfte ist dunkler und zeigt eine deutlichere Reflexion des Echos vor dem Spiegel.

Ihre Hardware ist vollständig. Jetzt ist es Zeit, Ihren Raspberry Pi einzurichten und die Magic Mirror-Software zu installieren.

Installieren von Magic Mirror auf dem Raspberry Pi

 Linux-Terminal mit eingegebenem Bash-Befehl.

Zunächst einmal möchten Ihren Himbeer-Pi einrichten, indem Sie die Standardschritte befolgen. Am einfachsten ist es, eine Kopie von NOOBS zu erhalten, um die neueste Version von Raspbian zu installieren.

Dieses Projekt wird von der Magic Mirror-Software unterstützt und hauptsächlich im Terminal und in einem Texteditor installiert und konfiguriert. Sie müssen nicht mit dem Terminal vertraut sein. Sie können die folgenden Befehle kopieren und einfügen.

Zunächst sollten Sie sicherstellen, dass Ihr Raspberry Pi auf dem neuesten Stand ist. Führen Sie die folgenden Befehle aus:

 sudo apt-get update
sudo apt-get upgrade 

Geben Sie bei Aufforderung das root-Passwort ein. Alternativ können Sie su verwenden und alle sudo -Einträge überspringen.

Nachdem alle Aktualisierungen abgeschlossen sind, installieren Sie die Magic Mirror-Software, indem Sie den folgenden Befehl ausführen:

 bash -c "$ (curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"[19659186maleDieSoftwareinstalliertundfordertSiemitzweiOptionenauf:

 Do Möchten Sie pm2 für den Autostart Ihres Magic Mirror verwenden? 

Wenn Sie diese Option aktivieren, wird die Magic Mirror-Software automatisch gestartet, wenn Ihr Raspberry Pi startet. Geben Sie Y ein und drücken Sie die Eingabetaste.

 Möchten Sie den Bildschirmschoner deaktivieren? 

Wenn Sie den Bildschirmschoner nicht deaktivieren, wird die Benutzeroberfläche beeinträchtigt. Geben Sie Y ein und drücken Sie die Eingabetaste.

Danach wird die Software fertig installiert und startet von selbst. Sie müssen jedoch zusätzliche Optionen konfigurieren, also drücken Sie Alt + Tab zurück zum Terminal und geben Sie Folgendes ein:

 pm2 stop MagicMirror 

Die Magic Mirror-Software wird gestoppt und geschlossen.

Konfigurieren der Magic Mirror-Software

<img class="alignnone wp-image-415057 size-full" data-pagespeed-lazy-src="https://www.howtogeek.com/wp-content/uploads/2019/05/xnano-config.jpg.pagespeed.gp+jp+jw+pj+ws+js+rj+rp+rw+ri+cp+md.ic.2PdNDcJ6H_.jpg" alt=" Terminal geöffnet für /boot/config.txt[19459074‹[19659008‹BeimStartenderSoftwaresindmöglicherweiseeinigeDingeaufgefallen:DieAnzeigebefindetsichimhorizontalenModusderKalenderistleereswirdkeinWetterangezeigtunddieUhrzeitistim24-Stunden-FormatKümmernwirunsdarum

Um die Ausrichtung des Bildschirms zu ändern, müssen Sie zunächst eine Datei ändern, in der die Einstellungen beim Start festgelegt werden. Geben Sie im Terminal den folgenden Befehl ein und drücken Sie die Eingabetaste:

 sudo nano /boot/config.txt[19659186[DieDateiConfigtxtwirdimTerminalgeöffnetScrollenSiemitderNach-unten-TastezumEndederDateiundfügenSiedenfolgendenTexthinzu:

 # Drehen Sie die Anzeige vertikal
display_rotate = 1 

Drücken Sie Strg + X, um die Datei zu schließen. Geben Sie Y ein, um zu bestätigen, dass Sie speichern möchten, und drücken Sie anschließend die Eingabetaste, um den Dateinamen config.txt zu bestätigen.

Geben Sie den folgenden Befehl in das Terminal ein, und drücken Sie dann die Eingabetaste:

 sudo reboot 

Your Raspberry Pi wird neu gestartet und Sie sollten sich im Hochformat befinden. Sie können Strg + M drücken, um die Magic Mirror-Oberfläche zu minimieren und das Terminal zu öffnen.

Aktualisieren von Uhrzeit, Kalender, Wetter und Nachrichten

Jetzt konfigurieren wir die Magic Mirror-Oberfläche. Öffnen Sie den Dateimanager und suchen Sie die folgende Adresse:

 / home / pi / MagicMirror / config 

Klicken Sie mit der rechten Maustaste auf die Datei config.js und wählen Sie "Öffnen mit". Erweitern Sie die Programmierkategorie und wählen Sie Geany aus der Liste Liste. Klicken Sie anschließend auf "OK".

 Dateimanager mit geöffnetem Dialogfeld.

Die soeben geöffnete Datei verwaltet die Hauptkonfigurationskomponenten der Magic Mirror-Software. Es wird aus Modulen abgerufen, um Features hinzuzufügen, und Sie konfigurieren hier die Einstellungen dieser Features. Die Magic Mirror-Software wird mit Standardmodulen für Zeit, Wetter, Kalender und Komplimente geliefert.

Um die Zeit in ein 12-Stunden-Format und die Maße in imperial zu ändern, navigieren Sie zu diesem Abschnitt:

 language: "en" ,
Zeitformat: 24,
units: "metric", 

Ändern Sie die 24 in 12 und "metric" in "imperial". Sie sollten haben:

 language: "en",
Zeitformat: 12,
units: "imperial", 

 config.js-Datei mit Zeitformat auf 12 und Einheiten auf imperial

Speichern Sie die Datei. Die Änderung sollte sofort wirksam werden. If you don’t see it, run the following command in the terminal or restart your Raspberry Pi:

pm2 restart MagicMirror

The same configuration file also houses your calendar and weather settings. To add your Google Calendar, you’ll first need your “secret address in iCal format” link from the Google Calendar website.

Open the config.js section again and scroll to the Module: calendar section.

Config.js focused on calendar module

Change “US Holidays” to a name you prefer and delete the URL beginning with “webcal” between the quotation marks. Then paste in your iCal link (be sure to keep the quotes).

Calendar module with updated changes.

To add weather, you will need OpenWeatherMap API keys. Go to the OpenWeatherMap site and sign up for a free account. Then browse to their API section. Generate a key and copy it.

Go back to config.js and scroll to the weather and weather forecast modules.

Config.txt displaying weather modules.

Paste your copied API key into “Your_OPENWEATHER_API_KEY” (be sure to leave the quotes).

Open a browser and head to the OpenWeatherMap city search page. Search for your city and click the result. The browser link will include a number at the end. For example, Cincinnati’s link is:

https://openweathermap.org/city/4508722

Copy the number for your city and paste that into the location ID sections between the quotes. Finally, rename the location from “New York” to the name of your city. You should see something like this:

Weather modules with updated information.

To update the news, change out the current link with your favorite RSS feed. For How-To Geek, that’s:

https://feeds.howtogeek.com/HowToGeek

Rename the title to the appropriate website. If you want more than one news site’s headlines shown, you’ll need to list them in an array like so:

{
 title: "NPR",
 url: "http://www.npr.org/rss/rss.php?id=1001",
},
{
 title: "How-To Geek",
 url: "https://feeds.howtogeek.com/HowToGeek",
 }

Your result should look like this:

Config module showing updated news options.

Congratulations, you’ve completed your smart mirror!

You can customize it even further if you like. For example, you can remove modules like the compliments or add new modules from the Magic Mirror community. Modules let you add features like Google Assistant and Alexa, snowflakes in the winter, or videos from YouTube.

Smart Mirror showing time, date, and calendar.




Source link