Read the statement by Michael Teeuw here.
Magic Mirror Default Weather Module
-
I’m just getting started with my magicmirror project, and having varying success.
I’ve tried a couple of 3rd Party weather modules, but have settled on the default on as I like the simplicity of it.I’ve managed to configure it to show the current weather, but want to be able to view a forecast. However following the config instructions etc, changing it to a forecast just results in it appearing as loading on the screen.
I’m using weatherbit.io as the provider and config.js is set as follows
module: "weather", position: "top_right", config: { apibase: "https://api.weatherbit.io/v2.0", weatherEndpoint: "/current", apiKey: "MY API KEY" lat: MY LATITUDE lon: MY LONGITUDE
weather.js
defaults: { weatherProvider: "weatherbit" type: "current",
this results in the correct display on magicmirror, however changing the endpoint to “/forecast”, “/daily” or “/forecast/daily” and the type to “forecast”, “daily” or “forecast/daily” just results in the loading icon.
Can anyone shed some light please?
Thanks
-
@bicolorbore586 do not edit the base source files, all configuration is done in config.js
remove the API base and endpoint, don’t need to set them, the code does that
set the provider and type
(use the lastest release, 2.21, as we fixed a couple configs to always use the type)also set the initialLoadDelay:1
-
@sdetweil Hi Sam, I’m probably not following this correctly, but I appear to be in a worse position than before in the fact that none of my modules now load.
-
@bicolorbore586 eh? sounds like a typo in the config
in the MagicMirror folder do
npm run config:check
-
@bicolorbore586 mine looks like
{ module:"weather", position: "top_left", config:{ type:"current", weatherProvider:"weatherbit", lat:30.956, lon:-97.435, initialLoadDelay:1, units:'imperial', apiKey:"your key" } },
both type:“current” and type:“forecast” work
-
@sdetweil all sorted now, I took the config out and put it back in fresh as I couldn’t work out where the typo/formatting error was. All tickety-boo now. Thanks for your help!