Hysen Labs
Library / SDK
joanaz/MMM-MirrorMirrorOnTheWall avatar
joanaz

MMM-MirrorMirrorOnTheWall

MagicMirror² module: Displays text, images, or a Youtube video, and open or close Magic Mirror Modules according to commands heard by Alexa.

100 stars20 forksJavaScriptMIT
01
DEEP OPEN-SOURCE ANALYSIS

Mirror Mirror: Alexa controls your MagicMirror

A MagicMirror module that listens to Alexa through AWS IoT, displays whatever you ask for, and starts or stops other modules by voice command.

02
DEEP OPEN-SOURCE ANALYSIS

What the module does

Mirror Mirror is a module for MagicMirror, the smart mirror platform. It uses the AWS IoT Device Gateway to receive commands from Alexa, then displays text, images, or a video on the mirror and turns other MagicMirror modules on or off according to what it heard. The project is written in JavaScript under the MIT license.

03
DEEP OPEN-SOURCE ANALYSIS

Before it works

Nothing works until two things are in place. You have to set up Alexa, and you have to install the companion MirrorMirrorOnTheWall Alexa Skill, following the linked instructions. Configuration happens in the main config file, and the README notes that you only add variables if you want to change a standard value.

04
DEEP OPEN-SOURCE ANALYSIS

Talking to the mirror

With the skill set up, you start by saying Alexa, start On The Wall, or Mirror Mirror On The Wall if you changed the wake word. Display text commands take the form say something, display text of something, or show text of something. Image commands search the text in braces through a Google Image Search API and show the results with the text, so find snow white or show me pictures of dwarfs works. Video commands route through the Youtube Data API and autoplay on loop. Module control is mapped through a names file that turns official module names into spoken ones, MMM-Globe to globe, currentweather to current weather, and then start, turn on, open, close, turn off, and finish trigger those modules. There are also commands to open or close every module at once, and the README notes that turning the module itself off clears whatever it is showing.

05
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

The module's whole personality is in the commands: voice phrases that map to a mirror doing something visible, from a greeting to a looped video to a module switching on.

06
DEEP OPEN-SOURCE ANALYSIS

Official sources

07
Community notes

Community notes