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.

    remoteFile in compliments module

    Scheduled Pinned Locked Moved Troubleshooting
    71 Posts 14 Posters 88.4k Views 15 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.
    • schlachtkreuzer6S Offline
      schlachtkreuzer6 @jcorraliza
      last edited by schlachtkreuzer6

      @jcorraliza it´s from the MMM-Admin-Interface… after initializing this module, there quotes are everywhere… but sure i will try this too

      1 Reply Last reply Reply Quote 0
      • D Offline
        DvdEnde @schlachtkreuzer6
        last edited by DvdEnde

        @schlachtkreuzer6
        You have tried many things, we can see it.

        Maybe you cleanup the mess a little.
        IN de config/confg.js remove the complete “config” from “module”: “compliments”.

        "config": {
        				"compliments": {
        

        take away the quotes also like @jcorraliza adviced.

        So the config.js looks like this (for your compliment module)

        {
        	module: "compliments",
        	position: "lower_third"
        },
        

        then in the compliments.js you default sould look like this:

        defaults: {
        		updateInterval: 30000,
        		remoteFile: "~/MagicMirror/modules/default/compliments/compliments.json",
        		fadeSpeed: 4000
        	},
        

        It should run.

        1 Reply Last reply Reply Quote 0
        • schlachtkreuzer6S Offline
          schlachtkreuzer6 @jcorraliza
          last edited by

          @jcorraliza haha I can not believe it!!! now it´s working. okay so here is what i did:

          so after ending with an error and resetting all the configs and .js files to default and my latest working config.js (post it above)
          i shut it down
          some hours later i boot it up again, and via putty ssh I copy and paste this code in the config.js:

          {
          	module: 'compliments',
          	position: 'lower_third',
          	config: {
          		remoteFile: 'compliments.json'
          	}
          },
          

          the comliments.js file is still located here: ~/MagicMirror/modules/default/compliments
          then i restart the MM via pm2 restart mm
          now it´s working with the compliments from the readme:

          {
              "morning" : [
                  "heyho"
              ],
              "afternoon" : [
                  "home early?"
              ],
              "evening" : [
                  "finally home"
              ],
                  "fog" : [
                          "fog, oh no :("
                  ]
          }
          
          

          but anyway, the MMM-Admin-Interface changed the config.json to this again ^^:

          {
            "module": "compliments",
            "position": "lower_third",
            "config": {
              "remoteFile": "compliments.json"
            }
          }
          

          many thanks for your help, and time!

          1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User
            last edited by

            hey, sorry for being a bit silent. was travelling with no access to my raspberry. will give your solution a shot, too. why does it have to be a local file, though? my plan was to (in a 2nd step) place the compliments.json in my dropbox folder, so i can easily change the compliments remotely.

            bheplerB D 2 Replies Last reply Reply Quote 0
            • bheplerB Offline
              bhepler Module Developer @Guest
              last edited by

              @skr Because I’m a crap coder in Javascript.

              Sorry for not helping earlier, folks. I was at a wedding and delivering my mirror as a gift. I’ll investigate and see if I can’t improve the mirror code.

              You should not ever have to modify the compliments.js file. You should be able to pull it off with just modifications to the config.js file.

              1 Reply Last reply Reply Quote 3
              • D Offline
                DvdEnde
                last edited by

                @schlachtkreuzer6
                Because it worked with you as it should be, so I changed my whole MM installation.
                I did manage to keep the compliments unchanged too.
                :D I am happy …

                @strawberry-3-141 @yawns thanks guys. Your info helped me too a lot!

                schlachtkreuzer6S 1 Reply Last reply Reply Quote 1
                • D Offline
                  DvdEnde @Guest
                  last edited by

                  @skr I am working on that now.
                  @strawberry-3-141 has some good information in this project:
                  https://forum.magicmirror.builders/topic/240/soccer-standings

                  I am struggling with the CORS at the moment but it is solvable…

                  1 Reply Last reply Reply Quote 0
                  • schlachtkreuzer6S Offline
                    schlachtkreuzer6 @DvdEnde
                    last edited by

                    @DvdEnde Great :) did you manage to run the weather-dependent compliments? My goal is to add all weather conditions based compliments. The normal compliments work, just need some time to load after starting MM from 30 seconds to 3mins. But if a add all of them:

                    day_sunny
                    day_cloudy
                    cloudy
                    cloudy_windy
                    showers
                    rain
                    thunderstorm
                    snow
                    fog
                    night_clear
                    night_cloudy
                    night_showers
                    night_rain
                    night_thunderstorm
                    night_snow
                    night_alt_cloudy_wind
                    

                    in this format:

                     ],
                            "fog" : [
                                    "fog, oh no :("
                     ],
                    ......
                    

                    MM starts to show the default comliments. Any Idea?

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jcorraliza @schlachtkreuzer6
                      last edited by

                      @schlachtkreuzer6 said in remoteFile in compliments module:

                      @DvdEnde Great :) did you manage to run the weather-dependent compliments? My goal is to add all weather conditions based compliments. The normal compliments work, just need some time to load after starting MM from 30 seconds to 3mins. But if a add all of them:

                      day_sunny
                      day_cloudy
                      cloudy
                      cloudy_windy
                      showers
                      rain
                      thunderstorm
                      snow
                      fog
                      night_clear
                      night_cloudy
                      night_showers
                      night_rain
                      night_thunderstorm
                      night_snow
                      night_alt_cloudy_wind
                      

                      in this format:

                       ],
                              "fog" : [
                                      "fog, oh no :("
                       ],
                      ......
                      

                      MM starts to show the default comliments. Any Idea?

                      This is the exact problem I’m running into as well. I can get the remoteFile to work if I just use the default times of day, but if I try using the currentweather objects, it just goes back to the default compliments.

                      schlachtkreuzer6S 1 Reply Last reply Reply Quote 1
                      • schlachtkreuzer6S Offline
                        schlachtkreuzer6 @jcorraliza
                        last edited by

                        @jcorraliza yeah… the only reason why i would use the remote file is the weather stuff, and obviously this feature has a bug, or we are to weak in coding ^^

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 7
                        • 8
                        • 6 / 8
                        • 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