magic mirror 2 config examples

Magic Mirror² Config Examples

By Emily Clark
AD

The Magic Mirror 2, an advanced smart mirror platform, offers a myriad of configuration options to tailor your digital experience according to your preferences. Whether you're aiming for a sleek, informative dashboard or an entertaining hub for games and media, understanding the right config examples can help you unlock the full potential of your Magic Mirror 2. Let's diving into detailed examples to guide you through the configuration process.

Before we delve into specific configurations, it's essential to have a basic understanding of the Magic Mirror 2's structure. The platform is built on Node.js and uses Electron to render the user interface. The interface is highly customizable using HTML, CSS, and JavaScript, allowing you to create unique and personalized setups.

Configuring Basics: Module and Layout Settings

The Magic Mirror 2 uses a module-based architecture, enabling you to add, remove, or customize functionality easily. The core configuration file, config.js, is where you'll manage these settings.

AD
GitHub - MicrosoftEdge/magic-mirror-demo: A :zap:Magic Mirror:zap: powered by a UWP Hosted Web App :rocket:
GitHub - MicrosoftEdge/magic-mirror-demo: A :zap:Magic Mirror:zap: powered by a UWP Hosted Web App :rocket:
MagicMirror²
MagicMirror²
DIY Magic Mirror Android Edition - Updated April '17
DIY Magic Mirror Android Edition - Updated April '17

To start, let's configure the basic layout. You can define your mirror's resolution, load animations, and set default modules in the config.js file:

```javascript // Set your mirror resolution here Electron.WEBViewWeb décisions PTSDbeitWidth = 1280; Electron.WEBViewWeb décisionäßigenHeight = 720; // Load custom animation (optional) autoStartAnimations: true, animations: [ { rotation: [0, 270], duration: 5000, animation: "running-dot" } ], // Set default modules defaultModules: [ "clock", "calendar", "current-weather" ], ```

Customizing Default Modules

Magic Mirror 2 comes with a host of pre-installed modules. You can customize these modules to display the information you need most:

two pictures side by side, one with a tablet and the other with an electronic device
two pictures side by side, one with a tablet and the other with an electronic device
Mirror Magic Guide | How to Use Mirrors in Witchcraft, Protection & Manifestation 🪞✨
Mirror Magic Guide | How to Use Mirrors in Witchcraft, Protection & Manifestation 🪞✨
Magic Mirror Complete built video
Magic Mirror Complete built video
```javascript // Configure the clock module modules: [ { module: "clock", position: "top_left", config: { showDate: true, dateFormat: "DD MMMM YYYY", steps: [15, 30], displayType: "analog" } }, // More modules... ], ```

Adding Custom Modules

To extend your Magic Mirror 2's functionality, you can install custom modules. Let's add the "newsfeed" module, which displays news stories from various sources:

```javascript // Install and configure the newsfeed module modules: [ { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "BBC", url: "https://feeds.bbci.co.uk/news/rss.xml" }, { title: "The New York Times", url: "https://rss.nytimes.com/services/xml/rss/nyt/World.xml" } ], updateFrequency: 600000, // 10 minutes showSourceTitle: true, showPublishDate: true } }, // More modules... ], ```

Advanced Configuration: Module Customization and Layout Management

Beyond basic settings, you can delve into advanced configurations to create a truly unique Magic Mirror 2 experience. Let's explore module customization and layout management.

AD

The Magic Mirror 2 uses a config.js file for each module, allowing you to create unique configurations for each installed module. You can find these files in the modules/default directory.

Planning My Smart Mirror Build
Planning My Smart Mirror Build
Screen Mirroring, Miracast
Screen Mirroring, Miracast
Upgrade Guide
Upgrade Guide
36 DIY Mirror Ideas: How To Make Different Kinds Of Mirrors
36 DIY Mirror Ideas: How To Make Different Kinds Of Mirrors
How do two-way mirrors work? – How It Works
How do two-way mirrors work? – How It Works
Touchscreen Smart Mirror
Touchscreen Smart Mirror

Customizing Module CSS

To modify a module's appearance, you can override its CSS. In your custom module directory, create a css folder and add your custom stylesheet inside:

```css /* myCustomModule.css */ .clock { font-size: 4rem; } .date { font-size: 1.5rem; } ```

Managing Layouts

The layouts directory in your Magic Mirror 2 installation contains various layouts you can use or modify. To create a new layout, duplicate an existing one, and make changes to the layout.js and layout.css files:

AD
```javascript // Update layout.js layouts: { myCustomLayout: { "module1": "top_left", "module2": "top_center", "module3": "bottom_bar", // More modules... } }, ```

Now that you've explored various Magic Mirror 2 config examples, you're ready to create a mirror that's uniquely yours. Whether you're displaying smart home controls, stocks, or even Twitter trends, the possibilities are endless. Happy configuring!

AD