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

Weather Location / Calendar Format / Fast boot

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 5 Posters 9.9k 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.
  • M Offline
    mbartels @clebo99
    last edited by May 25, 2016, 3:41 PM

    @clebo99 I’ve typed “Hamburg, Germany” as location. Maybe I’ll try “Hamburg, DE”? Bizarrely the current weather is right. Just the forecast is not right every time. And I put the same location on both modules.

    1 Reply Last reply Reply Quote 0
    • C Offline
      clebo99
      last edited by May 25, 2016, 4:11 PM

      I don’t “think” you need a fan for the Pi being on all the time as it doesn’t put out a lot of heat, but I’ll defer to others in the forum about that as I’m kind of a NOOB here as well. In the example on the weather web page, they seem to have you spell out the entire country if you are in Europe.

      1 Reply Last reply Reply Quote 0
      • K Offline
        KirAsh4 Moderator @mbartels
        last edited by May 25, 2016, 4:34 PM

        @mbartels said in Weather Location / Calendar Format / Fast boot:

        • Weather: The displayed weather forecast is not the same like when I manually search for my location at openweathermap. There are some (major) differences in the forecast. How can I be sure that the right location is chosen? And is it possible to display the name of the location on top of the current weather?

        Visit 'http://www.openweathermap.org' and type in your city (only), let it show you what it finds and pick the correct one. Note how it’s written there, and copy it the same way into your config. For example, for my city, rather than putting in 'Boulder,CO', I had to use 'Boulder,US', which is technically correct, however there are other US cities named 'Boulder' that evidently OpenWeatherMap does not know about.

        • Calendar Format: Although I set the language at the config file to “de”, the calendar format is Month/Day. But I would like to have it the other way and also to have the term “Today” translated. How do I do that?

        That’s having to set the proper 'language' setting in the (main) config file. Note that not all elements will be translated.

        • Fast Boost: As I will build the mirror into my bathroom, I have the chance to use the electricity which is controlled by the light switch and I would save energy, when no one is in the bathroom. But therefore the boost of the Raspberry Pi 3 has to be much more fast. is ist possible to just boost the MagicMirror? Or to fasten the booth otherwise?

        A Raspberry Pi run a complete operating system that will require time to boot up. There’s no 'inta-on' for that. My recommendation is to leave the rPi on at all times, and turn off the monitor. Keep in mind that a monitor will also take a few seconds to turn up, so again, no 'insta-on' for that. The fastest way possible is to leave it all on, but turn off the display output on the rPi. Then trigger it back on with a sensor. Search the forums for 'PIR sensor' …

        A Life? Cool! Where can I download one of those from?

        M 1 Reply Last reply May 25, 2016, 5:14 PM Reply Quote 0
        • M Offline
          mbartels @KirAsh4
          last edited by May 25, 2016, 5:14 PM

          @KirAsh4 thanks for your help!

          I’ve tried to correct the weather location in the way you told me and yes, it has to be “Hamburg,DE”. But still there are some differences in the forecast and in the actual content on openweather.org. Maybe thats normal, I can live with that.

          The language is already on “DE”, so “Today” has to be a term that isn’t “translatable”. But here has to be a way, to display the Dates in the Day/Month order or not?

          I think I will do the connecting, which @paviro preffered.

          1 Reply Last reply Reply Quote 0
          • K Offline
            KirAsh4 Moderator
            last edited by May 25, 2016, 5:40 PM

            Right, the wiki states that not all elements will be translated.

            A Life? Cool! Where can I download one of those from?

            1 Reply Last reply Reply Quote 0
            • K Offline
              KirAsh4 Moderator
              last edited by May 25, 2016, 5:41 PM

              And I have also noticed some big discrepancies with OpenWeatherMap and my local weather. So you’re not alone there.

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 0
              • M Offline
                mochman Module Developer
                last edited by mochman May 25, 2016, 7:57 PM May 25, 2016, 7:49 PM

                I modified the default module to look for a lat/long or a locationID before it uses the name you put in the config.js.
                The location ID is specific and unambiguous so you shouldn’t get any location errors.

                If you want to modify your code to use a locationID (which you can get here) put this in weatherforecast.js

                in your config.js in the weatherforecast config: { section add:

                locationID: 'YOUR_LOCATION_ID',

                under the “defaults” section add:
                locationID: "",

                change getParams: function()… to

                getParams: function() {
                   var params = "?";
                   if(this.config.locationID !== "") {
                      params += "id=" + this.config.locationID;
                   } else {
                      params += "q=" + this.config.location;
                   }
                   params += "&units=" + this.config.units;
                   params += "&lang=" + this.config.lang;
                   params += "&cnt=" + (((this.config.maxNumberOfDays < 1) || (this.config.maxNumberOfDays > 16)) ? 7 : this.config.maxNumberOfDays);
                   params += "&APPID=" + this.config.appid;
                   return params;
                },
                

                Moderator note: Please use proper markdown for easier reading.

                M 1 Reply Last reply May 29, 2016, 11:03 AM Reply Quote 0
                • M Offline
                  mbartels @mochman
                  last edited by May 29, 2016, 11:03 AM

                  @mochman Thanks for your help. I’ll try it, when I am working the next time on my Magic Mirror.

                  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