MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Time and Weather problems

    Scheduled Pinned Locked Moved Troubleshooting
    15 Posts 2 Posters 3.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Do not disturb
      sdetweil @Vaughn
      last edited by sdetweil

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

      dateFormat: "???",
      

      where ??? follows the doc link here
      https://docs.magicmirror.builders/modules/clock.html#configuration-options

      u did follow all the instruction on the weather module, right? I don’t see any of the location stuff it the module doc
      https://github.com/nigel-daniels/MMM-3Day-Forecast

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • V Offline
        Vaughn
        last edited by

        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

        S 1 Reply Last reply Reply Quote 0
        • V Offline
          Vaughn
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @Vaughn
            last edited by

            @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
            }
            }

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil
              last edited by

              @Vaughn said in Time and Weather problems:

              Wednesday, 05 August, 2020

              following the clock doc link for dateFormat
              Possible values: Docs -> https://momentjs.com/docs/#/displaying/format/

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

              “dddd, D MMMM, YYYY”

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • V Offline
                Vaughn
                last edited by

                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

                S 2 Replies Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @Vaughn
                  last edited by

                  @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.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @Vaughn
                    last edited by

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

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • V Offline
                      Vaughn
                      last edited by

                      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

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @Vaughn
                        last edited by

                        @Vaughn you didn’t open an issue, just a topic. so it can’t be closed/resolved

                        can u clarify the problem with the dateFormat field. why you couldn’t solve this on your own.
                        maybe we need to fix something in the doc, or something else.

                        the intent is to give users, even those with limited experience, access to clear and direct info, so that they don’t become disillusioned with some of the complexities.

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • V Offline
                          Vaughn
                          last edited by

                          The issue was I used the wrong call for the key. This I think was as I had been trying so many, I had got stuck on this city.list.json file I could not open. the original code insists it is required for your location. I’m still not fully sure I have the correct location.

                          To get mine:

                          I first went to the MMM world map site.
                          Here I saw a full map with all the cities and their weather locations. Mine was 35, I think, Ipswich
                          I added this to my code. I also added the Lon and Lat, hoping they would take the correct info.

                          The forecast looks OK, similar to that on the TV earlier, so maybe I got it correct.

                          this is my working code:

                          {
                          module: “MMM-3Day-Forecast”,
                          position: “bottom_left”,
                          header: “3 Day forecast”,
                          config: {
                          location: “Ipswich”,
                          locationID: “35”, //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                          api_key: “correct call for key”, // weatherbit
                          //appid: “Old call for key”,
                          lat: 52.062569,
                          long: 1.233907,
                          units: “M”,
                          lang: “en”,
                          interval: 900000
                          }
                          },
                          Now the LocationID:“”, I got from a map. No idea where this was from, cant find it again, but think its OK. If it is wrong please let me know.

                          Main area Of problem I had was in reading the city.list.json file. Does this need a program to read? as noting I found would open it. I presume, there is a program/code you can use that finds the locationID with just the city name or, Long/Lat numbers?

                          this is the area I feel needs a little more explanation for novices like me please :-)

                          Hope this helps Vaughn

                          S 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @Vaughn
                            last edited by sdetweil

                            @Vaughn once again, that module, MMM-3Day-Forecast, doesn’t use the city list file, so it doesn’t matter.

                            but, net, you appear not to be reading the documentation for the modules you are using. ( the module that DOES use the file gives instructions, which h u have copied, but still not read)

                            //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                            

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • V Offline
                              Vaughn
                              last edited by

                              the gz file I did try to unzip, but this was on the PC, Win10, and this failed.

                              Sis not know the code/way to unzip in the pi.

                              Did read the notes, but then understanding is another thing. Missing a comer, is sooo important, but not seen, if not known it should be there. Your comment, ;more comers;, was the key thanks

                              S 1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @Vaughn
                                last edited by

                                @Vaughn
                                Sis not know the code/way to unzip in the pi.

                                did u ask anyone? that exact phrase on Google would have got u the answer.

                                I still haven’t answered on the actual date format problem

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0

                                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                With your input, this post could be even better 💗

                                Register Login
                                • 1 / 1
                                • First post
                                  Last post
                                Enjoying MagicMirror? Please consider a donation!
                                MagicMirror created by Michael Teeuw.
                                Forum managed by Sam, technical setup by Karsten.
                                This forum is using NodeBB as its core | Contributors
                                Contact | Privacy Policy