• 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 remotefile

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 2 Posters 806 Views 2 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.
  • A Offline
    alhen18
    last edited by alhen18 Jan 30, 2021, 1:21 PM Jan 30, 2021, 1:20 PM

    Hey, I got some problems with using my remote file for complements. I do now know why i wont load my .json file.
    Here are some of the code used:

    Config.js
    ...
    {
        module: 'compliments',
        position: 'buttom',
        config: {
            updateInterval: 5 * 60 * 100,
            remoteFile: "compliments.json",
        }
    },
    ...
    
    compliments.json
    {
        "anytime" : [
            "Some Text",
            "Another text",
        ],
        "morning" : [
            "Morning text",
            "Another Morning text",
         ],
        ...
    }
    

    When I open the devoloper console in the MagicMirror application, I get this text out and I do not see where my code should make the issue.
    Udklip.PNG

    I do hope that someone can help me, since I do not know where the issue happens.

    S 1 Reply Last reply Jan 30, 2021, 1:39 PM Reply Quote 0
    • S Offline
      sdetweil @alhen18
      last edited by Jan 30, 2021, 1:39 PM

      @alhen18 the remotefile is supposed to start

      “compliments”:{
      }

      use one of the online json validators to make sure its valid

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      A 1 Reply Last reply Jan 30, 2021, 1:56 PM Reply Quote 0
      • A Offline
        alhen18 @sdetweil
        last edited by Jan 30, 2021, 1:56 PM

        @sdetweil Thanks, for the respons, I do not have any problem getting a remote .json file to work, I have tried with yours : https://raw.githubusercontent.com/sdetweil/testcompliments/main/mycompliments.json

        I think that I will just post mine on GitHub and there by also making it easier to edit in it at a later time :)

        S 1 Reply Last reply Jan 30, 2021, 2:07 PM Reply Quote 0
        • S Offline
          sdetweil @alhen18
          last edited by Jan 30, 2021, 2:07 PM

          @alhen18 then what was the problem u reported?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • A Offline
            alhen18
            last edited by Jan 30, 2021, 2:07 PM

            The real problem is that i cant get it to load from a local folder

            S 1 Reply Last reply Jan 30, 2021, 2:09 PM Reply Quote 0
            • S Offline
              sdetweil @alhen18
              last edited by Jan 30, 2021, 2:09 PM

              @alhen18 local folder has to.be in modules tree

              http://localhost:8080/modules/???/whatever.json

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • A Offline
                alhen18
                last edited by Jan 30, 2021, 2:11 PM

                @sdetweil It is also places under /modules/default/compliments/file.json

                And the .json file is build as i would construct a .json fil at any other given point

                S 1 Reply Last reply Jan 30, 2021, 2:17 PM Reply Quote 0
                • S Offline
                  sdetweil @alhen18
                  last edited by Jan 30, 2021, 2:17 PM

                  @alhen18 i dont understand. you say it doesnt work, but then describe how to make it work

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    5/8
                    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