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-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

    Scheduled Pinned Locked Moved Utilities
    256 Posts 55 Posters 631.7k Views 57 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 Offline
      sil3ntstorm
      last edited by

      Like now?
      I did it but the clouds or rain are still displayed to me, no change from before. The 3 apps on the mobile all show sun most of the time and at least 10 hours of sun (just like in the past, always sunny and dry in the app and in real but always cloudy and rainy in the MM module)

      {
          module: "MMM-OpenWeatherForecast",
        
          position: "top_right",
          header: "Wettervorschau Schama",
          config: {
            apikey: "XYXYXYXY", //SUPER SECRET
            latitude: 49.039349,     
            longitude: 11.847070,   
            units: "metric",
            iconset: "4c",
            colored: true,
            concise: true,     
            
      			 label_high: "max",
      			 label_low: "min",
      			 label_days: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
      			 label_sunriseTimeFormat: "k:mm",
      			 label_hourlyTimeFormat: "k[h]",
      			 label_hourlyTimeFormat: "k[ Uhr]",
      
      
      
           
            requestDelay: 2000,
            showFeelsLikeTemp: true,
            displayKmhForWind: true,
            showCurrentConditions: true,
            showSummary: false,
            showExtraCurrentConditions: true,
            extraCurrentConditions: {
              highLowTemp: true,
              precipitation: true,
              sunrise: true,
              sunset: true,
              wind: true,
              barometricPressure: false,
              humidity: true,
              dewPoint: false,
              uvIndex: true,
              visibility: false
            },
      
            forecastLayout: "table",
            forecastHeaderText: "",
      
            hourlyForecastTableHeaderText: "Stundenvorschau",
            showHourlyForecast: true,
            showHourlyTableHeaderRow: true,
            hourlyForecastInterval: 3,
            maxHourliesToShow: 5,
            hourlyExtras: {
              precipitation: true,
              wind: true,
              barometricPressure: false,
              humidity: false,
              dewPoint: false,
              uvIndex: false,
              visibility: false
            },
      
            dailyForecastTableHeaderText: "Wochenvorschau",
            showDailyForecast: true,
            showDailyTableHeaderRow: true,
            maxDailiesToShow: 10,
            dailyExtras: {
              precipitation: true,
              sunrise: false,
              sunset: false,
              wind: true,
              barometricPressure: false,
              humidity: false,
              dewPoint: false,
              uvIndex: false
            },
      
          }
        },
      
      
      

      Bild_2022-07-29_150313543.png

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @sil3ntstorm
        last edited by sdetweil

        @sil3ntstorm thats what the web site shows too
        Screenshot at 2022-07-29 08-14-48.png

        accuweather shows similar
        Screenshot at 2022-07-29 08-18-44.png

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sil3ntstorm
          last edited by sil3ntstorm

          The data is read from https://home.openweathermap.org and displayed on the MM, right?
          Since these often do not match for my area, I want to know whether it is possible to store another provider? For example
          https://www.wetteronline.de/wettertrend/hemau

          Bild_2022-07-29_153013910.png

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @sil3ntstorm
            last edited by

            @sil3ntstorm

            correct. the module takes info from the openweathermap api (and the data appears valid from the api and web page)

            but the MMM-OpenWeatherMap module only works with OpenWeather as far as I know.

            I am not aware of the quality of other modules

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • B Offline
              bassin12
              last edited by sdetweil

              I’m having some problems and do not know exactly what is wrong, got this error:

              [29.08.2022 09:51.32.701] [LOG] [MMM-OpenWeatherForecast] 29-Aug-22 09:51 ** ERROR ** Error: Request failed with status code 401

              I get this on my screen

              Captura de tela 2022-08-29 100754.jpg

              I did not do any configuration just using this as a Code:

              {
                                      module: "weather",
                                      position: "top_right",
                                      header: "Weather Forecast",
                                      config: {
                                              weatherProvider: "openweathermap",
                                              type: "forecast",
                                              location: "Suwanee",
                                              locationID: "4225309",
                                              apiKey: "MYKEY"
                                      }
                              },
              
              
                                {
                                  module: "MMM-OpenWeatherForecast",
                                  position: "top_right",
                                  header: "Forecast",
                                  config: {
                                    apikey: "MYKEY", //only string here
                                    latitude: 51.490230,            //number works here
                                    longitude: -0.258810,          //so does a string
                                  }
                                },
              
              S 2 Replies Last reply Reply Quote 0
              • S Offline
                sdetweil @bassin12
                last edited by sdetweil

                @bassin12 said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:

                I did not do any configuration just using this as a Code:

                that is configuration (editing config.js)

                I do not know… the error says the source returned a 401 error code
                not my module… open an issue on the module github page…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @bassin12
                  last edited by

                  @bassin12 also the code block start (the 3 backtics) must be on the start of the line

                  I edited your post to fix that

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @bassin12

                    my config , both work (and the default weather module in both current and forecast mode)

                    {
                    		module: "MMM-OpenWeatherForecast",
                    		position: "top_right",
                    		header: "Wettervorschau Schama",
                    		config: {
                    			apikey: "xxxx",
                    			latitude: 49.039349,
                    			longitude: 11.847070,
                    			units:"metric",
                    			iconset: "4c",
                    			colored: true,
                    			concise: true
                    		}
                    },
                    		{
                    			module: "MMM-OpenWeatherMapForecast",
                    			header: "Weather",
                    			position: "top_left",
                    			classes: "default everyone",
                    			disabled: false,
                    			config: {
                    				apikey: "..",
                    				latitude: "51.506130",
                    				longitude: "-0.090270",
                    				iconset: "4c",
                    				concise: false,
                    				forecastLayout: "table"
                    			}
                    		},
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    B 1 Reply Last reply Reply Quote 0
                    • B Offline
                      bassin12 @sdetweil
                      last edited by

                      @sdetweil
                      When I try the code in the config.js I get this in the logs

                      [29.08.2022 10:22.03.630] [LOG] [MMM-OpenWeatherMapForecast] 29-Aug-22 10:22 ** ERROR ** null
                      [29.08.2022 10:22.03.639] [LOG] [MMM-OpenWeatherForecast] 29-Aug-22 10:22 ** ERROR ** Error: Request failed with status code 401

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @bassin12
                        last edited by

                        @bassin12 said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:

                        [29.08.2022 10:22.03.630] [LOG] [MMM-OpenWeatherMapForecast] 29-Aug-22 10:22 ** ERROR ** null

                        yes, bug in his code…

                        use the code I posted on page one to extend the error reporting

                        but it returns 401 as well…

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          DDE12
                          last edited by

                          Is there a solution for this error? Is it something I’ve done or something in the module code?

                          [MMM-OpenWeatherForecast] 12-Nov-22 23:49 ** ERROR ** Error: Request failed with status code 401

                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            sdetweil @DDE12
                            last edited by

                            @DDE12 401 eror is unauthorized

                            so the apikey you are using has expired

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            D 1 Reply Last reply Reply Quote 0
                            • D Offline
                              DDE12 @sdetweil
                              last edited by

                              @sdetweil
                              I setup the default weather module with OpenWeather and it is working with the key I have. I obtained the key a few days ago. Is it the same key for MMM-OpenWeatherForecast?

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @DDE12
                                last edited by sdetweil

                                @DDE12 no idea

                                the module says go here
                                https://home.openweathermap.org/users/sign_up
                                the default weather openWeathermap provide says
                                https://home.openweathermap.org/users/sign_in

                                so it would seem the same key

                                the module uses this path

                                https://api.openweathermap.org/data/2.5/onecall?"
                                

                                the default module uses this

                                		apiVersion: "2.5",
                                		apiBase: "https://api.openweathermap.org/data/"
                                                        +apiVersion+"onecall?"
                                

                                so, they appear the same

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                D 1 Reply Last reply Reply Quote 0
                                • D Offline
                                  DDE12 @sdetweil
                                  last edited by

                                  @sdetweil
                                  I put in a new key just to see but still have the same 401 error. When I installed the module I got

                                  npm WARN old lockfile
                                  npm WARN old lockfile The package-lock.json file was created with an old version of npm,
                                  npm WARN old lockfile so supplemental metadata must be fetched from the registry.
                                  npm WARN old lockfile
                                  npm WARN old lockfile This is a one-time fix-up, please be patient...
                                  npm WARN old lockfile
                                  
                                  added 4 packages, and audited 391 packages in 50s
                                  
                                  1 package is looking for funding
                                    run `npm fund` for details
                                  
                                  39 vulnerabilities (2 low, 15 moderate, 19 high, 3 critical)
                                  
                                  To address all issues, run:
                                    npm audit fix
                                  
                                  Run `npm audit` for details.
                                  

                                  I did not run audit fix. Is there something that I need to do with the install?

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @DDE12
                                    last edited by

                                    @DDE12 NEVER run audit fix…

                                    i don’t know why the MMM-OpenWeatherForecast is failing ,
                                    other than it says unauthorized. i would open an issue for the author.

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      j.e.f.f Project Sponsor Module Developer
                                      last edited by

                                      @DDE12 Could you share your config? Also be sure put your API key in quotes in the configuration. If you aren’t using quotes, this could be a reason why the module is giving you the 401 error

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        DDE12
                                        last edited by

                                        @j-e-f-f
                                        I can, but I think I figured it out last night without changing anything in MM or the module. I initially signed up for the free account on OpenWeatherMap. Last night I signed up for the One Call by Call https://openweathermap.org/api and MMM-OpenWeatherForecast starting working. Before signing up, I tested my API in a browser at https://api.openweathermap.org/data/2.5/onecall?lat=someLatitude&lon=someLongitude&appid=secretAPI
                                        and at https://api.openweathermap.org/data/3.0/onecall?lat=someLatitude&lon=someLongitude&appid=secretAPI
                                        and both reported 401 error. After signing up, the module began working in MM. This does require a credit card and subscribers get 1000 free calls per day. Subscribers can set the maximum number of calls in their dashboard to prevent going over and getting charged. This doesn’t seem like it would be too much of a problem if users set the module’s config appropriately.

                                        I’m guessing that the module is trying to get data that is no longer free and some API’s are grandfathered ?? Or I misunderstood what type of account I needed from the start.

                                        Where is the API address in the module’s code?

                                        Let me know if I can provide further information.

                                        T S 2 Replies Last reply Reply Quote 0
                                        • T Offline
                                          trividar @DDE12
                                          last edited by

                                          If the Module doesn’t load the informations change ```
                                          “https://api.openweathermap.org/data/3.0/onecall”

                                          to
                                          

                                          “https://api.openweathermap.org/data/3.0/onecall?”

                                          an it should work!
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            sdetweil @DDE12
                                            last edited by

                                            @DDE12 the API url is in the node_helper.js

                                            we recently add a Parm to enable picking v3 of the API vs 2.5 (old free).

                                            the add on modules need to do the same

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            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
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 13
                                            • 13 / 13
                                            • 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