Read the statement by Michael Teeuw here.
Version 2.30.0 weather module, stuck loading, worked fine before upgrade
-
This gives the ‘undefined, invalid date’ error on the MM
{ module: 'weather', header: 'Current xxxxxxxxxxxxxxx weather: ', position: 'top_right', config: { weatherProvider: "openweathermap", lat: 11111111, lon: 2222222, apiKey: "33333333333" } },
-
@Richard238 and you used real lat/lon
-
Yes, real Lat:Lon used
-
Do the L:L and API key live in the openweathermap.js file, or the config.js file? Or both?
-
@Richard238 all config goes in config.js
Never need to edit any other file -
openweathermap.js is unchanged
WeatherProvider.register("openweathermap", { providerName: "OpenWeatherMap", // Set the default config properties that is specific to this provider defaults: { apiVersion: "3.0", apiBase: "https://api.openweathermap.org/data/", // weatherEndpoint is "/onecall" since API 3.0 // "/onecall", "/forecast" or "/weather" only for pro customers weatherEndpoint: "/onecall", locationID: false, location: false, // the /onecall endpoint needs lat / lon values, it doesn't support the locationId lat: 0, lon: 0, apiKey: "" }, config.js shows
{ module: 'weather', header: 'Current zzzzzzzzzzzzzzzz weather: ', position: 'top_right', config: { //weatherProvider: "openweathermap", providerName: "OpenWeatherMap", type: "current", lat: nnnnnnnnnnn, lon: -nnnnnnnnnnnnn, apiKey: "aaaaaaaaaaaaaaaaaaaaaaaaaaa" //type: 'current', //location: 'xxxxxxxxxxxxxx', //locationID: 'zzzzzzzz', //ID from https://www.openweathermap.org //apiKey: 'aaaaaaaaaaaaaaaaaaaaaaaaaaa' } },
-
providerName: “OpenWeatherMap”
That is not the correct property name
From the doc
https://docs.magicmirror.builders/modules/weather.html#usage
-
-
@Richard238 again show the whole config, xxx out the api key
Start w
position
and config
provider
type ( default is current)
apikey
lat
lonthe 3.0 apikey requires a credit card backing, right?
-
{ module: 'weather', header: 'Current zzzzzzzzzzzzz weather: ', position: 'top_right', config: { weatherProvider: "openweathermap", lat: 111111111111111, lon: 1111111111111111111111, apiKey: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", type: 'current', units: 'config.units' //location: 'zzzzzzzzzzzzzzz', } },
I must have had that API key for aeons, don’t ever remember it having a c/card behind it.
Maybe it’s out-of-date.