Easiest way to do this is to define another icontable for nighttime use and switching to it after sunset…
When i have some time, i’ll look into it…
UPDATE: Who am i kidding ;) Nighttime icons now included…
Easiest way to do this is to define another icontable for nighttime use and switching to it after sunset…
When i have some time, i’ll look into it…
UPDATE: Who am i kidding ;) Nighttime icons now included…
@Pauliolio The issue is with the config. try the following change:
pws: 'pws:IBATTLE3',
@KirAsh4 Well, not strictly true ;) https://forum.magicmirror.builders/topic/157/mmm-opentherm
But yes, you’ll need to fix the source!
@Shockwave Well, it would seem WU is rather ‘loose’ with it’s API implementation…
In your payload the full warning is in the message property. The Wunderground module expects is in the description property (only based on my observation of a single payload by my local station :S ). Ties in with your observation, which is always nice :)
Watch this space for a fix…
UPDATE: fix implemented… The module examines description and message lengths and uses the longest one… Have a go! :)
Hi!
Since new comics only come out on monday, wednesday and friday i made a slight modification (ugly hack) to your node_helper.js…
On non comic days, after getting the current comic, the node_helper will examines the num value and generate a random number between 1 and said value. It will then get the random comic and return it in the payload.
socketNotificationReceived: function(notification, payload) {
var self = this;
console.log("Notification: " + notification + " Payload: " + payload);
if(notification === "GET_COMIC"){
var comicJsonUri = payload.config.dailyJsonUrl;
var comic;
var rndcomic;
var rndUrl;
var body;
var d = new Date();
var n = d.getDay();
request(comicJsonUri, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
if ( this.n == 1 || this.n == 3 || this.n == 5 ) {
self.sendSocketNotification("COMIC", JSON.parse(body));
} else {
this.comic = JSON.parse(body);
this.rndcomic = Math.floor((Math.random() * this.comic.num) + 1);
this.rndUrl = "http://xkcd.com/" + this.rndcomic + "/info.0.json";
request(this.rndUrl, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
self.sendSocketNotification("COMIC", JSON.parse(body));
}
});
}
}
});
}
},
@Snoevit When you remove /astronomy you just modify the api call. The script still tries to place the (now absent) information on the screen. Leave the api call in tact and modify the refresh_dom function in the script. Also further down there’s a windspeedconversion which you could try to modify.
Your api-url would be this:
http://api.wunderground.com/api//conditions/forecast10day/astronomy/alerts/lang:NL/q/pws:IBATTLE3.json
pws stands for personal weather station.
Did you set your locale correctly in config.js? The sunset time for the wunderground module comes from the weatherunderground api so reflects the time at the weatherstation location.
The loctype thing is a bit of a mystery. I copied it of a wunderground generated url. Not entirely sure what it’s for. You could just leave it out i think.
@Shockwave Sorry for the late reply… missed your post here…
It’s not expected behaviour. The entire message should be displayed in the popup. It may have something to do with the
alerttruncatestring : "english:"
property…
Try changing t to an empty string.
Also, could you post the entire result of your api call?
http://api.wunderground.com/api/<apikey>/conditions/forecast10day/astronomy/alerts/lang:EN/q/<value of your pws property>.json
Should be fixed now… Just git pull to update the module
Hi!
EDIT: It probably has to do with vendor.js… The mm prefers the stock wind icons (older set, lacking some icons) over the ones bundled with the module… looking into a fix for that…
Is that the most recent MMM-Wunderground module? There are a few icons missing from the display…
There should be a wind-force icon at the top and an umbrella over the percipiation chance/amount: