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

Help getting remote compliments working

Scheduled Pinned Locked Moved Solved Troubleshooting
12 Posts 2 Posters 2.3k 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.
  • S Away
    sdetweil @robertybob
    last edited by Jul 26, 2020, 8:09 PM

    @robertybob correct

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    R 1 Reply Last reply Jul 26, 2020, 8:18 PM Reply Quote 0
    • R Offline
      robertybob @sdetweil
      last edited by robertybob Jul 26, 2020, 8:19 PM Jul 26, 2020, 8:18 PM

      @sdetweil Sorry about that, I didn’t realise I wasn’t supposed to edit the .js files within the modules folders, I’ve restored the original compliments.js file.

      My code within config.js now reads:

      {
      module: 'compliments',
      position: 'middle_center',
         config: { 
           remoteFile: '/home/pi/MagicMirror/modules/default/compliments/remote_compliments.js'
         }
      },
      

      however now only the default compliments are shown on the screen

      S 1 Reply Last reply Jul 26, 2020, 8:44 PM Reply Quote 0
      • S Away
        sdetweil @robertybob
        last edited by Jul 26, 2020, 8:44 PM

        @robertybob the doc says

        remoteFile
        

        Path or URL (starting with http:// or https://) to a JSON file containing compliments,

        so. the file needs either the file prefix

        file://
        or the http prefix, assuming the server root
        the server root is /home/pi/MagicMirror
        so
        http://localhost:8080/modules/default/compliments/compliments.json

        json(json) and JavaScript(js) are like each other, but not the same.
        I would put your json file thru one of the online parsers to make sure it’s right, and then use the correct file extension

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Jul 26, 2020, 9:56 PM Reply Quote 1
        • S Away
          sdetweil @sdetweil
          last edited by sdetweil Jul 26, 2020, 10:01 PM Jul 26, 2020, 9:56 PM

          @robertybob actually, looking at it again, your GitHub url should work. if u put that in a browser it downloads a file

          but u need to use the raw link
          remoteFile:‘https://raw.githubusercontent.com/robertybob/MagicMirrorConfigs/master/compliments.json’

          and i put it thru an online validator and the contents look good

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          R 1 Reply Last reply Jul 26, 2020, 10:03 PM Reply Quote 0
          • R Offline
            robertybob @sdetweil
            last edited by Jul 26, 2020, 10:03 PM

            @sdetweil Thank you so much! I spotted a missing comma a few minutes ago, which I’ve now corrected. The raw link works perfectly. Thank you so so much!!!

            S 1 Reply Last reply Jul 26, 2020, 10:25 PM Reply Quote 0
            • S Away
              sdetweil @robertybob
              last edited by Jul 26, 2020, 10:25 PM

              @robertybob awesome!!

              I use this validator, just FYI.
              https://codebeautify.org/jsonvalidator

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              R 1 Reply Last reply Jul 26, 2020, 10:31 PM Reply Quote 0
              • R Offline
                robertybob @sdetweil
                last edited by Jul 26, 2020, 10:31 PM

                @sdetweil I’ve submitted a pull request on the documentation repository so that hopefully no one will require assistance on this in the future ;)

                S 1 Reply Last reply Jul 26, 2020, 11:00 PM Reply Quote 0
                • S Away
                  sdetweil @robertybob
                  last edited by Jul 26, 2020, 11:00 PM

                  @robertybob awesome!

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 1 / 2
                  1 / 2
                  • First post
                    9/12
                    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