MagicMirror²¶
MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant. MagicMirror² is built by the creator of the original MagicMirror with the incredible help of a growing community of contributors.
Note
For this guide you should be familiar with the basic concepts of
Prerequisites¶
Node and npm¶
We’re using Node.js in the latest version:
[isabell@stardust ~]$ uberspace tools version show node
Using 'Node.js' version: '14'
[isabell@stardust ~]$
Your website domain needs to be set up:
[isabell@stardust ~]$ uberspace web domain list
isabell.uber.space
[isabell@stardust ~]$
Installation¶
We clone the repository to our home directory and install the application.
[isabell@stardust ~]$ git clone https://github.com/MichMich/MagicMirror
[isabell@stardust ~]$ cd MagicMirror
[isabell@stardust MagicMirror]$ npm install
[…]
[isabell@stardust MagicMirror]$ npm audit fix --force
[…]
[isabell@stardust MagicMirror]$
Configuration¶
After the installation you need to setup your config file.
[isabell@stardust MagicMirror]$ cp config/config.js.sample config/config.js
[isabell@stardust MagicMirror]$
Change the address from localhost
to 0.0.0.0
. You may remove the IP addresses in ipWhitelist
to access your MagicMirror² from everywhere.
address: "0.0.0.0",
Setup daemon¶
Create ~/etc/services.d/magicmirror.ini
with the following content:
[program:magicmirror]
directory=%(ENV_HOME)s/MagicMirror
command=npm run server
autostart=yes
autorestart=yes
After creating the configuration, tell supervisord to refresh its configuration and start the service:
[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE RUNNING pid 26020, uptime 0:03:14
[isabell@stardust ~]$
If it’s not in state RUNNING, check your configuration.
Configure web server¶
Note
MagicMirror² running on port 8080.
To make the application accessible from the outside, configure a web backend:
[isabell@stardust ~]$ uberspace web backend set / --http --port <port>
Set backend for / to port <port>; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$
Updates¶
Note
Check the update feed regularly to stay informed about the newest version.
Stop your service and repeat the installation step.
Tested with MagicMirror² v2.14.0 and Uberspace 7.10.0
Written by: Thomas Kammerer <https://kammerer.tk/>