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.

    Analog + Digital Clock module

    Scheduled Pinned Locked Moved Solved Requests
    38 Posts 5 Posters 49.1k Views 5 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.
    • MichMichM Offline
      MichMich
      last edited by

      Is the red color default? I’d like all the default modules to be B/W…

      KirAsh4K 1 Reply Last reply Reply Quote 0
      • MichMichM Offline
        MichMich
        last edited by

        Very Nice Work By the way! :)

        1 Reply Last reply Reply Quote 0
        • K Offline
          Kevin
          last edited by

          Very nice work, you’re the best, thanks a million for the great work.
          I think it covers my need right now.

          1 Reply Last reply Reply Quote 0
          • KirAsh4K Offline
            KirAsh4 Moderator @MichMich
            last edited by

            @MichMich, read the post above yours … default is gray, not red. A config option will let the user set it to whatever color they want.

            A Life? Cool! Where can I download one of those from?

            1 Reply Last reply Reply Quote 0
            • KirAsh4K Offline
              KirAsh4 Moderator
              last edited by

              Ok, I checked in a PR with the new addition. Current changed/added options in addition the ones already present are:

              displayType: 'digital',  // options are: 'digital', 'analog', or 'both'
              analogSize: '200px',     // This defines how large you want the analog clock to be
              analogFace: 'simple',    // options are: 'simple', 'none', or 'face-###' where ### is a value between
                                       // 001 to 012, inclusive. The 'simple' options displays a simple border, 'none' is no border,
                                       // and the 'face-###' ones are SVG images that can be used as the face for the clock
              analogPlacement: 'bottom', // options are: 'top', 'right', 'bottom', 'left' This option is applicable only
                                         // when the displayType is set to 'both' and defined where you want the clock in relation
                                         // to the digital one
              secondsColor: '#888888'. // this defines what color the seconds hand will be. I like mine red ... like wine.
              

              You can see the displays in a prior post.

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 0
              • KirAsh4K Offline
                KirAsh4 Moderator
                last edited by

                I forgot to mention this: the clock faces are SVG files, so if you want to put a large analog clock in the middle of your mirror, you can, it will scale beautifully. This is a 600 pixels wide clock using the same SVG file as the smaller one in a previous post.

                0_1468167705597_clockLarge.png

                A Life? Cool! Where can I download one of those from?

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Kevin
                  last edited by

                  Great work, is this published somewhere already?
                  How do i get it?

                  1 Reply Last reply Reply Quote 0
                  • KirAsh4K Offline
                    KirAsh4 Moderator
                    last edited by

                    It’s checked into the develop branch. You can grab that and test it out.

                    A Life? Cool! Where can I download one of those from?

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      Kevin @KirAsh4
                      last edited by

                      Sorry, im quite new here, develop branch? Cannot find it. :(

                      1 Reply Last reply Reply Quote 0
                      • KirAsh4K Offline
                        KirAsh4 Moderator
                        last edited by KirAsh4

                        I’m on the road at the moment so I can’t give you a detailed answer, but you can clone the develop branch instead of the master one:

                        git clone - b develop http://github.com/MichMich/MagicMirror

                        Warning: it will overwrite any changes you may have made to local files, just be aware of that.

                        A Life? Cool! Where can I download one of those from?

                        1 Reply Last reply Reply Quote 0
                        • MichMichM Offline
                          MichMich
                          last edited by

                          It’s in the master branch now … :)

                          1 Reply Last reply Reply Quote 0
                          • K Offline
                            Kevin
                            last edited by

                            Thanks alot mate… :bow:

                            1 Reply Last reply Reply Quote 0
                            • KirAsh4K Offline
                              KirAsh4 Moderator
                              last edited by

                              @Kevin, as a side note, if there’s a particular clock face that you like me to create for you, let me know. If you have an example, that will greatly help.

                              A Life? Cool! Where can I download one of those from?

                              1 Reply Last reply Reply Quote 0
                              • pugslyP Offline
                                pugsly
                                last edited by

                                Works great, just one question. I want to put the analog clock in the top_center and don’t want to show the date because I have the digital clock in the top_right position. How do I turn off the date from showing on a 2nd clock module?

                                1 Reply Last reply Reply Quote 0
                                • KirAsh4K Offline
                                  KirAsh4 Moderator
                                  last edited by

                                  At the moment, it’s hard coded in. I’d have to add a config option so it can be turned off when used as a separate module.

                                  A Life? Cool! Where can I download one of those from?

                                  1 Reply Last reply Reply Quote 0
                                  • KirAsh4K Offline
                                    KirAsh4 Moderator
                                    last edited by

                                    Ok, I have it in my dev branch, but I won’t push it up just yet. I’ll wait a bit to see if there are other things that people will request or fixes. But if you must get rid of it now, you can manually edit the 'clock.js' file and delete line 173:

                                    169:    } else if (this.config.displayType === 'analog') {
                                    170:        // Display only an analog clock
                                    171:        dateWrapper.style.textAlign = "center";
                                    172:        dateWrapper.style.paddingBottom = "15px";
                                    173:        wrapper.appendChild(dateWrapper);             <===== that line
                                    174:        wrapper.appendChild(clockCircle);
                                    175:    } else {
                                    

                                    It will only affect the analog clock when used as a separate module as a single clock.

                                    A Life? Cool! Where can I download one of those from?

                                    1 Reply Last reply Reply Quote 0
                                    • KirAsh4K Offline
                                      KirAsh4 Moderator
                                      last edited by

                                      I should point out that this is just a temporary thing, so you can get rid of it. The updated code will give you a config option to disable it, show it above, or below the clock.

                                      A Life? Cool! Where can I download one of those from?

                                      1 Reply Last reply Reply Quote 0
                                      • KirAsh4K Offline
                                        KirAsh4 Moderator
                                        last edited by

                                        @pugsly, I forgot to mention this: new code has been added to the 'develop' branch that allows you to turn off the date display when using the module in analog mode only. Options are 'top' (default) to have it displayed at the top of the clock, 'bottom' to show it on the bottom, or 'false' to completely turn it off.

                                        A Life? Cool! Where can I download one of those from?

                                        1 Reply Last reply Reply Quote 1
                                        • T Offline
                                          trividar
                                          last edited by

                                          someone know why this happend to me after updating MM:
                                          alt text
                                          everything looks fine just the analag clock.

                                          N 1 Reply Last reply Reply Quote 0
                                          • N Offline
                                            nagaculun @trividar
                                            last edited by

                                            @trividar said in Analog + Digital Clock module:

                                            someone know why this happend to me after updating MM:
                                            alt text
                                            everything looks fine just the analag clock.

                                            Happened to me too. It was fine yesterday.

                                            N 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
                                            • 2
                                            • 2 / 2
                                            • 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