Read the statement by Michael Teeuw here.
Help configuring the Magic Mirror
-
That’s your whole config?
You have to use at first the config.js.sample file in your config folder. Take this file, manage your entry’s an save it as config.js (without “sample”)
-
@lolobyte I keep seeing that step config.js.sample but I have no idea what it means. I don’t know how to execute it because it keeps coming back with “command not found”
-
@PhilsterM9 Hi!
Put simply, the config.js.sample is a “preconfigured” version of config.js (sort of default settings).
Just do:cd MagicMirror/config cp config.js.sample config.js
Now when you copied the sample config you can customize your mirror with:
nano config.js
Make the changes you want…
When done restart the magic mirror with pm2 or basically restart the Pi (computer).
If you followed the guide you can use pm2 like this to restart the MagicMirror (only):pm2 restart mm
Best regards Snille
-
@Snille Do I have to delete the sample configuration somehow? I copied and pasted what was in the sample configuration file to the “nano config.js” but no when I add any changes it won’t show them but instead the config from the sample. Should I delete it?
Thanks in advance
-
@PhilsterM9 Hi again, no the config.js.sample should still be left in there.
How does your config.js look now? -
No, the MagicMirror use only the right named config.js.
Move to your config folder with following command in your SSH Terminal session:
cd MagicMirror/config
press “Enter” on your Keyboard.
type following command in your SSH Terminal session
ls
and “enter”
what is the result in your SSH Terminal session. What is displayed?
-
@PhilsterM9 Do not delete the sample configuration. Please have a look at the post of @Snille again and go trough them step by step. If you followed the default installation, these commands should work out of the box. After the step
nano config.js
you should end up with a file full of content, with about 100 lines. -
@Snille When I put in the line “cd MagicMirror/config” it allows me to enter commands from the Magic Mirror (as it should) but then when I add the line “cp config.js.sample config.js” it only returns to the next line.
Before, I was trying to add configurations to the sample config but to get to that, I was entering “nano config.js” from the Magic Mirror instead from the pi.
From your last message, I thought that I needed to copy the code from the sample config and paste it into “nano config.js” but from the pi.
Am I doing this right? I am very lost, Thanks -
@lolobyte it says "config.js config.js.sample config.js.save
-
@PhilsterM9 Hi again, maybe I’m missing something…
If you followed the install guide when you installed…
When you SSH in to your Pi (or open a terminal on the desktop of the pi) you should end up in a prompt looking like this:pi@MagicMirror:~ $
Now, type as follows:
pi@MagicMirror:~ $ cd MagicMirror/config/
You should now be in MagicMirror/config/ looking like this:
pi@MagicMirror:~/MagicMirror/config $
To copy a file enter:
pi@MagicMirror:~/MagicMirror/config $ cp config.js.sample config.js
Check if the files where copied with ls both file should be there now:
pi@MagicMirror:~/MagicMirror/config $ ls
Listed like this:
config.js config.js.sample
Now, if you want you can edit your config file:
pi@MagicMirror:~/MagicMirror/config $ nano config.js
Change whatever you need to change…
But you actually don’t have to change anything just for testing it.
Now restart the MagicMirror with pm2 like this:pi@MagicMirror:~/MagicMirror/config $ pm2 restart mm
You should se something like this:
Restarts are now immutable, to update environment or conf use --update-env [PM2] Applying action restartProcessId on app [mm](ids: 0) [PM2] [mm](0) ✓ ┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬──────────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ watching │ ├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼──────────┼──────────┤ │ mm │ 0 │ fork │ 26361 │ online │ 32 │ 0s │ 22% │ 2.3 MB │ disabled │ └──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴──────────┴──────────┘ Use `pm2 show ` to get more details about an app pi@MagicMirror:~/MagicMirror/config $
And your Magic should have started. :)