MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Time and Weather problems

  • Hi. Just joined and first MagicMirrir project.

    Got all working and changed a few things needed, Now have My Calendar, BBC World News, but time and weather not working as needed.

    With the time and date, it shows the time as:

    Wednesday, August 5, 2020


    with the code


    module: “clock”,

    position: “top_left”


    I want the more UK display

    Wednesday, 05 August, 2020


    I tried adding a config { }, with the code using moment(“DD,MM,YYYY” ), but this just crashed the system, if out of the config {}, it still crashes.

    Never used this system before so very new.

    As for date. I added the module:

    module: “MMM-3Day-Forecast”,
    position: “top_right”,
    header: “3 Day Weather”,
    config: {
    location: “Ipswich”,
    locationID: “Ipswich,uk”, //ID from; unzip the gz file and find your city
    appid: “**************************************”,
    //api_key: “**********************************”,
    lat: 52.062569,
    long: 1.233907,
    units: “M”,
    lang: “en”,
    interval: 900000,

    It says its loading, but never displays, so almost working.

    I’m thinking here the location may be wrong. I took the coordinates from google maps.

    Not sure how to fix either of these, please, if you can, point me in the correct direction.

    Many thanks Vaughn

  • @Vaughn for clock,
    according to the doc,
    you add a field to config called

    dateFormat: "???",

    where ??? follows the doc link here

    u did follow all the instruction on the weather module, right? I don’t see any of the location stuff it the module doc

  • sdetweil

    Ok so I did read this config notes, but did not work. Just had another go.

    with my code, for the clock, as so:

    module: “clock”,
    position: “top_left”
    //config: {
    //timeFormat: “12”, //“dddd, LL”, //“DD/MM/YYYY”,
    //showDate: false,
    All works fine, only date in wrong format. Uncomenting the config, even if left blank inside, the mirror crashes.

    What am I missing please?

    thanks Vaughn

  • Sorry, did have the dateFormat in there, only as that didn’t work, looked at the timeFormate, to see if I could prove the concept.

    Thanks again Vaughn

  • @Vaughn said in Time and Weather problems:

    position: “top_left” < -------- missing comma
    //config: {

    general rules, each line needs to end with a comma (more coming) if there is another named line after it
    if the thing after “:” is a number or true/false, no quotes, else quotes (doesn’t matter which kind, single or double as long as they are matched )

    module: 'clock",
    position: ‘top_left’, // < ------
    config: {
    dateFormat: " ??? " // some string

  • @Vaughn said in Time and Weather problems:

    Wednesday, 05 August, 2020

    following the clock doc link for dateFormat
    Possible values: Docs ->

    “dddd - day of week
    D - day of month
    MMMM - month of year in text
    YYYY” year, numeric

    “dddd, D MMMM, YYYY”

  • FAB 🙂

    YES missed the comma at the top, after position, only excuses was I was hacking, so added a line and then did not know the one above needed the comma.

    Huge thanks

    Now onto the Weather.

    Last post said there was no position included. I thought that was the Log/Lat?

    I know other parts use a position code, I hoped this would be overwritten as I was including the coordinates, as i cannot find any way to read the ‘city.list.json.gz’ file as I am told in many parts this is where to find the location code.

    Nothing I have opens this, any ideas please.

    Thanks again Vaughn

  • @Vaughn I meant the module doesn’t use location codes only lat/lon, so u don’t need to read that file.

    if u are on the pi, gz means zipped, so the gzip command would unzip it.

    a Google search for what file type is gz would have got u this info.

  • @Vaughn can u clarify what the problem was with the dateFormat? seemed pretty easy from the doc

  • YES, as I have now fixed it. The MMM uses the api_key, where as the original forecast code used, appid. Sooo wrong syntax.

    Now working great.

    Many thanks to all for the help. Please how can I show this is sorted, noticed some of your posts show this.

    thanks Vaughn

Log in to reply