Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    MMM-CountUP (COVID19 example)

    Utilities
    5
    28
    464
    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
      sdetweil @sonicgoose last edited by

      @sonicgoose @Bromley47’s problem was he put the config on the wrong module definition in config.js

      1 Reply Last reply Reply Quote 0
      • bhepler
        bhepler Project Sponsor last edited by

        I haven’t played with this module yet. Does it require a specific date format? “2020-04-01” can be written as “2020-01-04” depending on which country you’re using as a default format.

        It has been my experience that Javascript is absolutely rubbish with dates.

        B 1 Reply Last reply Reply Quote 0
        • B
          Bromley47 @bhepler last edited by

          @bhepler The read me for this module shows the date format as YYYY-MM-DD so I entered 2020-03-16 because I wanted it to run from 16th March 2020 which up until today is 33 days, but it only shows 2 days on the Mirror?

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @Bromley47 last edited by sdetweil

            @Bromley47 try 2020-02-16

            I bet he didn’t adjust the month. Date/moment code uses 0 as january
            I opened issue on the module github site
            https://github.com/bibaldo/MMM-CountUP/issues/3

            B 1 Reply Last reply Reply Quote 0
            • B
              Bromley47 @sdetweil last edited by

              @sdetweil Hi Sam - thanks for your continued interest in this - I tried the 2020-02-16 date but still showing 2 day??

              S 1 Reply Last reply Reply Quote 0
              • S
                sdetweil @Bromley47 last edited by sdetweil

                @Bromley47 ok, so the problem is in default (showFullDate = false) he truncates the year/month/week count,
                but does NOT adjust number of days… my original guess was wrong, so the date is the one u want to count from.

                I have submitted a pull request to fix this…

                ||
                || bibaldo’s repo has integrated the fix i provided, I am closing my repo
                || May 8, 2020
                ||

                when he merges my fix, you can git pull in the .original folder
                rename them back and delete mine

                B S 2 Replies Last reply Reply Quote 1
                • B
                  Bromley47 @sdetweil last edited by

                  @sdetweil Fantastic Sam - many thanks - managed to edit with the help of my son who’s well into JavaScript (says it pays the mortgage!) and now shows the correct number of days etc. The remaining problem I have is that to restart the MM when I have done any mods. (such as this one) I have to power off the Raspberry O, which is a bit of a faff. I have tried to use the instructions on git hub by MichMich (Auto starting Magic Mirror) but when I run pm2 restart mm it says Process or Namespace mm not found.
                  I can only think the Magic Mirror is called by another name but how do I find that out?

                  pi@raspberrypi:~ $ pm2 restart mm
                  Use --update-env to update environment variables
                  [PM2][ERROR] Process or Namespace mm not found

                  S 2 Replies Last reply Reply Quote 0
                  • S
                    sdetweil @Bromley47 last edited by

                    @Bromley47 pm2 status will show the names… if u used my installation script it is call MagicMirror
                    you can also use the number pm2 restart 0

                    B 1 Reply Last reply Reply Quote 0
                    • S
                      sdetweil @Bromley47 last edited by

                      @Bromley47 so you didn’t use my repo with the fix?

                      B 1 Reply Last reply Reply Quote 0
                      • B
                        Bromley47 @sdetweil last edited by

                        @sdetweil id │ name │ mode │ ↺ │ status │ cpu │ memory │
                        ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
                        │ 0 │ mmstart │ fork │ 0 │ online │ 0% │ 2.4mb │
                        └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴───

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 2 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy