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

Open weather Api 3.0

Scheduled Pinned Locked Moved Utilities
16 Posts 4 Posters 5.1k Views 5 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
    sdetweil @Peter
    last edited by May 4, 2024, 2:28 PM

    @Peter the same config.js has entries for weather (Openweather is the default provider)

    just add the property
    apiVersion: ‘3.0’,

    and replace the other property values with yours

    the doc for weather is here
    https://docs.magicmirror.builders/modules/weather.html

    you do not need to specify anything that is the same as the doc indicates (like provider)

    as the design is your config.js overrides the defaults for a module.

    read the two links in my signature below. I didn’t write them, they are very helpful

    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 @Peter
      last edited by May 4, 2024, 2:29 PM

      @Peter free for limited number of calls per day

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      P 2 Replies Last reply May 4, 2024, 3:14 PM Reply Quote 0
      • P Offline
        Peter @sdetweil
        last edited by May 4, 2024, 3:14 PM

        @sdetweil after adding the version to my config, the weather module does not start.

        {
        module: “weather”,
        position: “top_right”,
        config: {
        weatherProvider: “openweathermap”,
        apiVersion: ‘3.0’,
        type: “current”,
        location: “Apeldoorn”,
        locationID: “2759705”, //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
        apiKey: “xxxxxxxxxxxxxxxxxxxxxxxxxxkey removed”
        }
        },
        It works fine with Api 2.5, but do I need lat, lon instead of Location and Locatio ID?
        It is confusing.
        Peter

        S 1 Reply Last reply May 4, 2024, 3:29 PM Reply Quote 0
        • P Offline
          Peter @sdetweil
          last edited by May 4, 2024, 3:17 PM

          @sdetweil what does this limited number mean?
          If I use the default settings do I stay under the limit?
          Peter

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @Peter
            last edited by May 4, 2024, 3:29 PM

            @Peter there are multiple providers under weather, some need locationId, some need location name, some need lat/lon

            the top section of the doc applies to all providers, and further down is specifics for each provider

            if it works, then it works.

            limited calls per day 1000 I think., so their doc says

            divide seconds per day by 1000

            stay under that rate.

            we will next release fixes July 1, every 90 days

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            P 1 Reply Last reply May 4, 2024, 4:15 PM Reply Quote 0
            • P Offline
              Peter @sdetweil
              last edited by May 4, 2024, 4:15 PM

              @sdetweil thanks for your help but I cannot get it working.
              Maybe somebody else has an idea how to get it working?
              Peter

              S 1 Reply Last reply May 4, 2024, 5:00 PM Reply Quote 0
              • S Offline
                sdetweil @Peter
                last edited by sdetweil May 4, 2024, 5:04 PM May 4, 2024, 5:00 PM

                @Peter I took the sample
                and added my 3.0 api key… no other changes, I commented out provider as openweather is the default
                my 2.5 key did not work

                          {
                      module: "weather",
                      position: "top_right",
                      header: "Weather Forecast",
                      config: {
                        //weatherProvider: "openweathermap",
                        type: "forecast",
                        location: "New York",
                        locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                        apiKey: "mykey"
                      }
                    },
                      {
                        module: "weather",
                        position: "top_right",
                        config: {  // type:"current is default"
                          location: "New York",
                          locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                          apiKey: "mykey", 
                        }
                      },
                

                sorry, had some funky icons in test…
                also had three instances, picked wrong 2… forecast first, current second

                Screenshot at 2024-05-04 12-02-46.png

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                P 1 Reply Last reply May 4, 2024, 5:27 PM Reply Quote 0
                • P Offline
                  Peter @sdetweil
                  last edited by May 4, 2024, 5:27 PM

                  @sdetweil ok, I did the same, so I removed apiVersion:‘3.0’, now it works.
                  But how can I see if it works on version 2.5 or version 3.0?
                  And how do I recognise a version 3.0 Api key?
                  On the site of Openweather I have several Api keys, but how to recognise a version 3.0?
                  Peter

                  S 1 Reply Last reply May 4, 2024, 5:38 PM Reply Quote 0
                  • S Offline
                    sdetweil @Peter
                    last edited by sdetweil May 4, 2024, 5:39 PM May 4, 2024, 5:38 PM

                    @Peter they don’t tell you. I have many as well.

                    they will tell you to try it… not much use

                    version 3 is only one endpoint, onecall
                    I don’t know how to force the module like that, it changes the endpoint based on the type (current, forecast…)

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    P 1 Reply Last reply May 4, 2024, 5:41 PM Reply Quote 0
                    • P Offline
                      Peter @sdetweil
                      last edited by May 4, 2024, 5:41 PM

                      @sdetweil ok, I will see what happens when 2.5 stops working.
                      Have a nice day.
                      Peter

                      N 1 Reply Last reply May 6, 2024, 12:29 AM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/16
                        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