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.2k 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.
    • 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
            • bheplerB Offline
              bhepler Module Developer
              last edited by bhepler

              Okay, I have the weather integration working. I’ll spare you the process I went through to figure it out, but the short version is that I am a worse developer than I originally suspected. The remoteFile capability works by replacing the three compliment arrays (morning, afternoon & evening). The weather integration works (sensibly, IMHO) by adding weather-specific compliments to the existing arrays.

              So in order to get them both working, you need to specify both the original arrays and the weather-specific arrays. You can delete any weather-specific arrays you wish, but you must have the morning, afternoon & evening arrays. Copy & paste this compliments.json file to your mirror and then modify accordingly.

              {
                "morning": ["Morning compliment"],
                "afternoon": ["Afternoon compliment"],
                "evening": ["Evening compliment"],
                "day_sunny" : [
                  "Day Sunny Compliment 1",
                  "Day Sunny Compliment 2"
                ],
                "day_cloudy" : [
                  "Day Cloudy Compliment 1",
                  "Day Cloudy Compliment 2"
                ],
                "cloudy" : ["Cloud 1"],
                "cloudy_windy" : ["Cloud windy"],
                "showers" : ["Showers"],
                "rain" : ["Rain"],
                "thunderstorm" : ["Thunderstorm"],
                "snow" : ["Snow"],
                "fog" : ["Fog"],
                "night_clear" : ["Night clear"],
                "night_cloudy" : ["Night Cloudy"],
                "night_showers" : ["Night showers"],
                "night_rain" : ["Night Rain"],
                "night_thunderstorm" : ["Night thunderstorm"],
                "night_snow" : ["Night Snow"],
                "night_alt_cloudy_wind": ["Night Cloudy Winds"]
              }
              

              I’m going to work on this a bit and hopefully the next release of the MirrorMirror software will be a bit more friendly. As an aside, I’ve noticed that the weather integration technique continually adds to the arrays. So the memory usage will grow and grow at whatever frequency you set the compliment refresh. This isn’t terrible, as straight text doesn’t take a whole lot of memory. But it may have unintended effects if you leave your mirror running for months at a time or if you are expecting a true randomization of the compliments you enter.

              schlachtkreuzer6S R 2 Replies Last reply Reply Quote 2
              • schlachtkreuzer6S Offline
                schlachtkreuzer6 @bhepler
                last edited by schlachtkreuzer6

                @bhepler okay a bit weird^^ anyway thank you! It worked perfecly!
                @Steff the config above :)

                1 Reply Last reply Reply Quote 0
                • R Offline
                  roramirez Core Contributors @bhepler
                  last edited by

                  @bhepler said in remoteFile in compliments module:

                  I’m going to work on this a bit and hopefully the next release of the MirrorMirror software will be a bit more friendly. As an aside, I’ve noticed that the weather integration technique continually adds to the arrays. So the memory usage will grow and grow at whatever frequency you set the compliment refresh. This isn’t terrible, as straight text doesn’t take a whole lot of memory. But it may have unintended effects if you leave your mirror running for months at a time or if you are expecting a true randomization of the compliments you enter.

                  Hi, when I worked in this feature I remember was a flashing about this.

                  If you can help how improved this is welcome :)

                  Easy module development with MagicMirror Module Template

                  J 1 Reply Last reply Reply Quote 0
                  • SnilleS Offline
                    Snille Module Developer
                    last edited by

                    Hi! I’m using a separate compliments file (for each user). I’ve noticed that when I use non english characters they are not shown correctly.
                    The complement in the picture should say: “Tänk positivt”.
                    Now it says:
                    0_1485080075531_charaters.png

                    If I don’t use a compliments file and put the compliments directly in the config, it works fine.

                    What to do? :)

                    Best regards Snille

                    If you cant find it, make it and share it!
                    Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                    strawberry 3.141S 1 Reply Last reply Reply Quote 0
                    • strawberry 3.141S Offline
                      strawberry 3.141 Project Sponsor Module Developer @Snille
                      last edited by

                      @Snille did you save the compliments file as utf8 encoded?

                      Please create a github issue if you need help, so I can keep track

                      SnilleS 1 Reply Last reply Reply Quote 1
                      • SnilleS Offline
                        Snille Module Developer @strawberry 3.141
                        last edited by

                        @strawberry-3.141 I had not, now I did and it works! :)
                        Thank you!

                        If you cant find it, make it and share it!
                        Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

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