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.

    MMM-OpenWeatherMapForecast Doesn't display imperial units

    Scheduled Pinned Locked Moved Troubleshooting
    21 Posts 6 Posters 9.2k Views 6 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 Do not disturb
      sdetweil @rslohs
      last edited by sdetweil

      @rslohs its not “Units”, its “units”

      this system is case sensitive, every letter matters

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        rslohs @sdetweil
        last edited by sdetweil

        @sdetweil that’s what I’m using in the config file.

        {
        module: "MMM-OpenWeatherMapForecast",
        header: "Schoolcraft, MI Weather",
        position: "top_right",
        classes: "default everyone",
        disabled: false,
        config: {
        apikey: "aaaaaaaa",
        latitude: "aaaaaaa",
        longitude: "aaaaaa",
        iconset: "4c",
        concise: false,
        forecastLayout: "table",
        units: "imperial",
        }
        },
        
        S 1 Reply Last reply Reply Quote 0
        • S Offline
          scumbelly @rslohs
          last edited by

          @rslohs

          A little late to weigh in but I can verify that imperial setting does not affect the Pop amount. It remains metric. Everything else is imperial.

          Sorry.

          1 Reply Last reply Reply Quote 0
          • S Offline
            scumbelly @rslohs
            last edited by

            @rslohs

            Guess what? I was trying to troubleshoot an issue in this module re: scale and noticed the .js file has changed wind calculations and the following…

            units: {
            accumulationRain: {
            imperial: “mm”,
            metric: “mm”,
            “”: “mm”
            },
            accumulationSnow: {
            imperial: “mm”,
            metric: “mm”,
            “”: “mm”
            },
            windSpeed: {
            imperial: “mph”,
            metric: “m/s”,
            “”: “m/s”
            }
            },

            So it looks like imperial might work for you now. I’m not going to test because I need the older .js which I had to modify to get some calculations in kph to work .

            Cheers

            1 Reply Last reply Reply Quote 0
            • J Offline
              JohnGalt
              last edited by

              My instance of this module also displays rainfall in “mm”, even though I have set units = “imperial” for the MagicMirror system as a whole and also in the module configuration.

              I see that the Open Weather site has a page specifying “API response parameters with available units of measurement” (https://openweathermap.org/weather-data). There one finds a parameter table specifying Parameter and Description - as well as columns for “Standard”, “Metric” and “Imperial”.

              The interesting thing is this: the table specifies temperatures correctly (“Kelvin”, “Celsius”, “Fahrenheit”) but for rain it calls out “mm”, “mm”, “mm” - or other variants for different fields, e.g.: “mm/hr” and “mm/hour”.

              As such, I am inclined to just give up and accept the module’s behavior as a quirk of how Open Weather parses what it is getting from the NWS - but I thought i would see if anyone has a better idea.

              kayakbabeK 1 Reply Last reply Reply Quote 0
              • kayakbabeK Offline
                kayakbabe @JohnGalt
                last edited by

                @JohnGalt have you tried MMM-OpenWeatherForecast instead? It seems to work better for me adn it uses the OpenWeather Map api too.

                J 3 Replies Last reply Reply Quote 0
                • J Offline
                  JohnGalt @kayakbabe
                  last edited by

                  @kayakbabe - Thanks for the tip. Can you tell me which one you use? A quick web search shows several modules with the same name. These two look like top contenders:

                  https://github.com/jclarke0000/MMM-OpenWeatherForecast
                  https://github.com/themaxgoldman/MMM-OpenWeatherForecast

                  kayakbabeK 1 Reply Last reply Reply Quote 0
                  • J Offline
                    JohnGalt @kayakbabe
                    last edited by

                    @kayakbabe PS: another issue with MMM-OpenWeatherMapForecast is that it doesn’t respect the “disabled: true” configuration. I had seen this before and ignored it since the module is active, but when I went in to disable it in preparation for trying one of the others, I am reminded that I cannot just disable it. I CAN put " /* and */ " around the whole thing of course, but that is just clunky, and more importantly may signal more serious coding issues.

                    S 1 Reply Last reply Reply Quote 0
                    • J Offline
                      JohnGalt @kayakbabe
                      last edited by

                      @kayakbabe FWIW, i installed the jclarke0000 module, and so far it looks pretty good - thanks again!

                      1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @JohnGalt
                        last edited by

                        @JohnGalt disabled is an mm config option, not a module option. it goes not to the module line, outside the module config:{} section

                        here is the doc on all the mm config options for a module.

                        these are separate from the module config options inside the config:{} section

                        https://docs.magicmirror.builders/modules/configuration.html#example

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        J 1 Reply Last reply Reply Quote 1
                        • J Offline
                          JohnGalt @sdetweil
                          last edited by

                          @sdetweil - Thanks Sam - I guess I was and am confused.

                          Below are two code snips showing the subject module and one other. Both are designated to be disabled with the “disabled: true” instruction outside the config section. The top one still operates, while the bottom one [and every other module I have edited this way] is disabled. So, it’s not a big deal and I will keep an eye out for how I do things. Thanks again.

                          {module: "MMM-OpenWeatherMapForecast", // https://github.com/MarcLandis/MMM-OpenWeatherMapForecast NOTE: See also https://github.com/sdetweil/MMM-OpenWeatherMapForecast
                            disabled: true,
                            header: "", // "Weather"
                            position: "top_right",
                            classes: "default everyone",
                            disabled: false,
                            config: {
                              apikey: "xxxxxxxxxxxxx",
                          ------------------------------------------------------------------------------- 
                          {module: "MMM-Temperature", // https://github.com/Tom-Hirschberger/MMM-Temperature
                            disabled: true,
                            header: "Office Temp + Humidity",
                            position: "top_right", // bottom_right
                            config: {
                             sensors: [
                          
                          S 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @JohnGalt
                            last edited by

                            @JohnGalt I need to see the rest in between

                            top one has disabled twice, true and false

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            J 1 Reply Last reply Reply Quote 0
                            • J Offline
                              JohnGalt @sdetweil
                              last edited by

                              @sdetweil - Ah crap, having both disabled: true AND disabled: false would do it!! :) I’m sure the system would execute the last command. Thanks for putting a second set of eyes on it.

                              S 1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @JohnGalt
                                last edited by

                                @JohnGalt yes, last occurrence wins

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0
                                • kayakbabeK Offline
                                  kayakbabe @JohnGalt
                                  last edited by kayakbabe

                                  @JohnGalt
                                  I see you got your module choice working.
                                  jclarke0000 is the one I’m using.

                                  J 1 Reply Last reply Reply Quote 1
                                  • J Offline
                                    JohnGalt @kayakbabe
                                    last edited by

                                    @kayakbabe - thanks for letting me know. I will keep an eye on the one I am using and if I see issues, will try the other one.

                                    1 Reply Last reply Reply Quote 0

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better 💗

                                    Register Login
                                    • 1
                                    • 2
                                    • 1 / 2
                                    • 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