Read the statement by Michael Teeuw here.
Help configuring the Magic Mirror
-
Hi, I am new to coding and electronics in general so please excuse me if I get anything wrong in my wording (I am also a little new to this forum so I am not sure if this is the right section to put this in).
So basically, I have trouble trying to configure my mirror. I am following each step carefully but even after re-flashing my SD card twice, I am getting stuck at the same step. Whenever I try to change anything in my mirror it says that I need to add a configuration file or to correct it because it might be wrong. So now I am stuck with the default mirror that I use and can’t even change the timezone. I can add in a weather API for weather forecast but not anything else.
This is the line I use to put into the terminal to change my configurations:
cd MagicMirror/config
nano config.jsAnd this is the code that I have:
{ module: 'clock', position: 'top_left' config: { displayType: 'both', analogSize: '150px', analogFace: 'face-005', analogPlacement: 'left' } },
-
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