Read the statement by Michael Teeuw here.
Compliments.json absolute or relative and proper path
-
@kayakbabe Well, I haven’t played with Docker ever. I also used the #MagicMirrorOS install method because it sounded super fast and easy. That said, I discovered some things about Docker. .And in the process discovered that the compliments.json I created was being erased/deleted/disappeared every time I stopped and started the raspberry pi.
For those who don’t know anything about docker… it’s kind of like a software publishing system where make sure your production server always has the files it is supposed to have and you can throw copies of that production server out super quick. This is a super lame description… but it was the reason I couldn’t solve my path issue. Because the “copy” of MagicMirror didn’t have a compliments.json in any of the folders that I tried to put it, that compliments.json was being removed every time I started up magic mirror from that Docker instance.
So in short I redid my sd card with a manual install and didn’t use any of the alternative methods (no docker image).
I also am able to set my compliments remote file to
remoteFile: “…/…/…/config/compliments.json”
and it works great.and I can now put it anywhere I want on the pi so long as the relative paths are correct. I can keep it from being replaced if I want to update the modules.
-
-
it is a good idea to put the
compliments.json
beside theconfig.js
.In the
config.js
you have to useremoteFile: "../../../config/compliments.json"`
-
@karsten13 that is exactly what I did. I like having it outside the config.js so the config.js doesn’t grow to be a huge file. And so if I mess up when I add to the compliments.json, I won’t break the entire mirror.
I’m adding a whole lot of birthdays and lots of family specific dates. I like having the remoteFile setting so I can keep this data out of config.js.
-
@kayakbabe you Can put you file in to default/compliments
And insert this to config.js{
module: ‘compliments’,
position: ‘bottom_bar’,
config: {
remoteFile: ‘youfiles.compliments.json’
}
},