As in the article MagicMirror - Installing the required software As already mentioned, the basic functionality of the MagicMirror software can be expanded using various plugins. Where you can find these plugins and how to install them is described in the following article.
Safety instructions
I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/
Affiliate links/advertising links
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂
Requirements
Helpful articles:
Before you start the installation, you should have prepared the RaspberryPi so that it is accessible via the network and controllable via SSH. The MagicMirror software should also be set up.
The following articles describe what has to be done to prepare the RaspberryPi so far:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH
MagicMirror - Installing the required software
Required material:
-no-
Required material:
In the following list you will find all the parts you need to implement this article.
Find the desired module
In the very informative Github https://github.com/MichMich/MagicMirror/ there is, among other things, a list of all available 3rd party modules: https://github.com/MichMich/MagicMirror/wiki/3rd-party-modules
All modules are listed there, including a brief description.
Für diesen Artikel wird als Beispiel das Modul „MMM-NetworkConnection“ installiert.
You can find it in the list above or under the link: https://github.com/slametps/MMM-NetworkConnection
The installation of the modules is almost always very identical.
Das Modul „MMM-NetworkConnection“ zeigt auf eurem MagicMirror aktuelle Werte zur Qualität Eurer Internetverbindung an.
Log in to the RaspberryPi via SSH
To start, you must first log in to the Rasp Pi with Putty via SSH. How to do this is in the article RaspberryPi - Control the RaspberryPi via SSH described.
Installing the module
In most cases, a small step-by-step guide is already provided on the GitHub page of the respective module.
The procedure is almost always very similar.
1. copy the module files from the GitHub to your RaspberryPi
To do this, first change to the module directory of your MagicMirror installation.
By default, you can switch there with the following command:
cd ~/MagicMirror/modules
Now you have to copy the GitHub files of the desired module into your module folder.
This can be done with the following command:
git clone https://github.com/slametps/MMM-NetworkConnection.git
Wobei der Link „https://github.com/slametps/MMM-NetworkConnection.git“ dem Link zu dem gewünschten Modul entspricht. Beachtet dabei aber, dass dem Link noch ein „.git“ angehängt werden muss.
2. install any required software components
In many cases, the MagicMirror modules require other software components in order to function correctly. These must therefore be installed beforehand.
The practical thing is that almost every module comes with an installation script.
To install, simply change to the module directory and then start the installation.
Switches with
cd ~/MagicMirror/modules/MMM-NetworkConnection
into the module directory and starts the installation with the command
npm install
3. editing the MagicMirror configuration file
Bisher habt Ihr die benötigten Dateien und Softwarekomponenten installiert. Nun müsst Ihr der MagicMirror Software nur noch „bescheid geben“, dass dort ein Modul schlummert, dass beim nächsten Start des MagicMirrors geladen werden soll. Außerdem könnt Ihr dann noch ein paar Einstellungen zum Modul angeben.
To inform the MagicMirror software of all these settings, you must first open the configuration file. This can be done with the following command
sudo nano ~/MagicMirror/config/config.js
{ module: 'MMM-NetworkConnection', position: 'top_right', config: { } }
An dieser Stelle könnt ihr euer Modul auch noch „feiner“ einstellen. Es gibt oft viele zusätzliche Konfigurationsmöglichkeiten. Für dieses Modul gibt es zum Beispiel noch folgende Konfigurationsmöglichkeiten
(Quote from the GitHub)
ConfigOptions
option default Description updateInterval
600000ms
(10 minutes)how often should the devices states refreshed maxTime
5000
millisecondshow long to do speed test initialLoadDelay
2500
millisecondshow long to delay to load the module decimals
1
how many decimals for the round displayTextStatus
true
display connection text status or not animationSpeed
2500
millisecondsspeed of the update animation
For example, if you wanted to change the updateInterval - i.e. the time interval after which the module display is updated - the complete configuration part of the module would read as follows:
{ module: 'MMM-NetworkConnection', position: 'top_right', config: { updateInterval: "300000" } }
Dabei steht die „300000“ für die Zeit nach der das Modul aktualisiert wird.
The other settings are added in the same way.
If you do not explicitly specify the settings in the configuration file, the module uses the default settings.
4. transfer of the settings
You do not need to do anything else to apply the settings, except save and close the configuration file. The changes will then be recognized automatically and applied if there are no errors in the configuration file.
If the new module is not loaded automatically, you can also restart MagicMirror manually. This is described at the end of the following article:
MagicMirror - Set up autostart
More information
https://github.com/MichMich/MagicMirror
https://github.com/MichMich/MagicMirror/wiki/3rd-party-modules
https://github.com/slametps/MMM-NetworkConnection
https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners
Have fun with the project
I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂
PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂