@tonkxy
Hmmmm… I cannot understand the setCurrentWeatherType
.
Anyway, I recommend you this module; https://github.com/BrianHepler/MMM-WeatherBackground
You need to study how MM module works, at least to train how to use.
You don’t need to pull weather info from an external weather API like Darksky. Already there are many modules showing weather info on MM screen and spitting that info out through notification
.
For example, default weather
module also emit notifications of weather info periodically. All you need to do is catching that notification and consume them in your module.
default weather
module would emit CURRENTWEATHER_TYPE
notification.
You can catch that notification like this.
notificationReceived: function (notification, payload, sender) {
if (notification === 'CURRENTWEATHER_TYPE') {
console.log(payload) // manipulate payload then extract data what you need.
// do your job
}
}
Anyway, Study the above module. That has almost all features you are trying. (except the image source)