• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Compliments.json absolute or relative and proper path

Scheduled Pinned Locked Moved Solved Troubleshooting
6 Posts 3 Posters 962 Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    kayakbabe @kayakbabe
    last edited by Apr 28, 2022, 8:24 AM

    @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.

    1 Reply Last reply Reply Quote 0
    • A Offline
      Assassins
      last edited by Apr 28, 2022, 4:08 PM

      You can look here

      1 Reply Last reply Reply Quote 0
      • K Offline
        karsten13 @kayakbabe
        last edited by Apr 28, 2022, 8:50 PM

        @kayakbabe

        it is a good idea to put the compliments.json beside the config.js.

        In the config.js you have to use

        remoteFile: "../../../config/compliments.json"`
        
        K 1 Reply Last reply May 7, 2022, 2:31 AM Reply Quote 1
        • K Offline
          kayakbabe @karsten13
          last edited by May 7, 2022, 2:31 AM

          @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.

          A 1 Reply Last reply May 7, 2022, 5:51 AM Reply Quote 1
          • A Offline
            Assassins @kayakbabe
            last edited by Assassins May 7, 2022, 5:51 AM May 7, 2022, 5:51 AM

            @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’
            }
            },

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy