Read the statement by Michael Teeuw here.
Weather forecast only displays 'invalid date'
-
appid
incurrentweather
module is missing a ’Time and date on your raspberry are fine, right?
-
Not sure how I missed that… weird, I swear I put it in there…
Check the time and date of your devices…
-
Thanks for the helpful suggestions.
Date and time are correct on my pi, and the mirror even shows the right date and time.
The config did have the missing ’ in current weather, I apparently accidentally deleted it when I was removing personal info. I edited the above to reflect the current status of my config file.
This was working fine before. About the time I updated the mirror to latest version and added the motion detection module. But it didn’t happen immediately after those events. It was a few days later. I did find a logged issue (that was closed) describing the same thing, after updating the mirror.
-
I’m having the same issue as @Canterrain
Snipp from Clock and Weather modules are below
// Clock { module: "clock", position: "top_center", config: { displayType: "digital", displaySeconds: false, showPeriod: true, showPeriodUpper: false, clockBold: false, showDate: true, showWeek: false, dateFormat : "dddd, MMMM Do YYYY", }, }, // Calendar// Weather - ID from http://www.openweathermap.org/help/city_list.txt { module: "weatherforecast", position: "top_left", header: "7 Day Forecast for ", config: { fade: false, maxNumberOfDays: 7, showRainAmount: true, colored: true, locationID: "2655603", appid: "xxx" }, },
Issue only occurred once I did an update to the MM system to v.2.4.0
-
Same issue here
-
same here.
Is there a possibilty to erase the comma and country code behind the location in the header?!
-
Hello,
same problem for me since the update in 2.4.0… So general update issue probably (looking forward for a solution !:slightly_smiling_face: )
To answer @killing-joke said in Weather forecast only displays ‘invalid date’:
same here.
Is there a possibilty to erase the comma and country code behind the location in the header?!
I did change the following on the file “/MagicMirror/modules/default/weatherferecast/weatherforecast.js” :
// Override getHeader method. getHeader: function() { if (this.config.appendLocationNameToHeader) { //line to change //return this.data.header + " " + this.fetchedLocationName; return "Prévisions Météo Nogent"; // write here what you want... } return this.data.header; },
Here is the result :
You can of course change the line on the way you want to remove only the part you need.
-
@agp42 said in Weather forecast only displays ‘invalid date’:
I did change the following on the file “/MagicMirror/modules/default/weatherferecast/weatherforecast.js” :
Thanks a lot. I got it.
I found a solution on https://github.com/MichMich/MagicMirror/commit/0e2e8d2e2aca2f8d0f1f2eb7b213577fcc4f623a
But I had to change the lines 338 and 339 instead of 336 and 337var day = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("ddd"); var hour = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("H");
into
var day; var hour; if(!!forecast.dt_txt) { day = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("ddd"); hour = moment(forecast.dt_txt, "YYYY-MM-DD hh:mm:ss").format("H"); } else { day = moment(forecast.dt, "X").format("ddd"); hour = moment(forecast.dt, "X").format("H"); }
It works for my MM.
-
Looks like the recent changes here are the culprit. They already figured out what needs to be changed, fixed in an upcoming update. Pull request is in. Get ready to update your mirrors.
-
@bob how did you get you icons to change color as well as your text?