Giter Club home page Giter Club logo

mmm-eventhorizon's Introduction

MMM-EventHorizon

Simple countdown timer for events.

Examples

  • Small, medium and large options

Installation

  • git clone https://github.com/mykle1/MMM-EventHorizon into the ~/MagicMirror/modules directory.

Config.js entry and options

{
disabled: false,
module: 'MMM-EventHorizon',
position: 'bottom_center',
config: {
    timezone: "n179",                     // See Timezone chart at bottom
    units: "1",          // 1=no units, 2=units initial only, 3=units abbr singular, 4= units abbr plural, 5= units full name
    justDays: "",                         //  yes or no // For longer countdowns. Displays ONLY days remaining
    size: "large",                        // small, medium or large
    countUp: "yes",                       // Count up after timer ends
    date: "2019-07-04",                   // YYYY-MM-DD format ONLY
    time: "00:00:01",                     // (HH:MM:SS)    Exact time you want timer to end
    text1: "Describe event",              // 2 lines of text during timer
    text2: "And here too!",               // 2 lines of text during timer
    text1Color: "FFFFFF",                 // Hex color codes
    text2Color: "62FF00",                 // Hex color codes
    timerColor: "FFFFFF",                 // Hex color codes
    endText1: "When timer ends",          // 2 lines of text when timer ends
    endText2: "Say something here",       // 2 lines of text when timer ends
    endText1Color: "FFFFFF",              // Hex color codes
    endText2Color: "62FF00",              // Hex color codes
    timerUpColor: "FFFFFF",               // Hex color codes
    colorpc: "000",                       // color of the background 000 = black, t = transparent
  }
},

Go to this page and obtain your timezone code https://forum.magicmirror.builders/topic/9514/contribute-to-a-module-volunteers-wanted-easy

Or choose from the list below!

Or choose from the text file "Timezone codes" included with this module.

Timezone codes

The time codes can be taken from the corresponding file. The file is sorted by countries and cities. Please send any additions via the MagicMirror forum in the correct format (, , ) to me. I will then add the table and sort your entries.

Special thanks to @spitzlbergerj,

who made some nice additions to the module.

mmm-eventhorizon's People

Contributors

mykle1 avatar spitzlbergerj avatar

Stargazers

Stef Jones avatar RM98329 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar Cederic Privat avatar  avatar doug-doug the mighty avatar  avatar

Watchers

E:V:A avatar James Cloos avatar  avatar  avatar  avatar

mmm-eventhorizon's Issues

justDays= "yes", not working

using

justDays: "yes",

does not result in any changes.
Neither does:
using

justDays: true,

Thanks for your great work though so far!

[Feature] Adding customized countdown timer

I was looking for a way to add a 2 minute countdown timer, instead of a fixed time that's hard-coded in the .js file.
My suggestion:

notificationReceived: function(notification, payload) {
        if (notification === 'HIDE_TIMER') {
            this.hide(1000);
        } else if (notification === 'SHOW_TIMER') {
            this.show(1000);
        } else if (notification === 'START_TIMER') {
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();
            this.config.date = yyyy + '-' + mm + '-' + dd;

            var now = today.getTime()+2*60000;
            var hours = String(Math.floor((now / (1000 * 60 * 60)) % 24)).padStart(2, '0');
            var minutes = String(Math.floor((now / (1000 * 60)) % 60)).padStart(2, '0');
            var seconds = String(Math.floor((now / 1000) % 60)).padStart(2, '0');
            this.config.time = hours + ':' + minutes + ':' + seconds;
            this.show(1000);
            this.updateDom();
        }
    },

I thought I'd activate it using MMM-Remote-Control's API function.
I wasn't able to use the API function, but this seems to work just fine:
http://localhost:8080/remote?action=NOTIFICATION&notification=START_TIMER

Any thoughts?

Timer not right

Hi, I have a countdown timer set for an event at 7:30pm or 19:30, and it is showing 02:35:18 at the current time of 3:54pm. I am in CST, and the clock on my RaspberryPi, and MagicMirror are both correct. Timer is an hour off.

It's broken

This doesn't work. I've followed some of the instructions and it doesn't work.

customizable time zone and colors

Hi,

I live in Germany, so I had to adjust the time zone. I also wanted to adjust the colors of the fonts and the background.

So I added these parameters to the module.

Here is the changed MMM-EventHorizon.js
MMM-EventHorizon.zip

The addition for the readme could be taken directly from the js file.

Would you like to use it as a new version? Then I would not have to follow the changes with updates of you ;-)

Thanks
Josef

Second Line Text

No matter what I do to try and delete the second line text I get "Try here now".....how can I just have one line text?

Module is not showing up after update

Hey,

I have been using this one for a more than a year now, and a few weeks ago I had my MM updated the module is not showing up anymore.

The funny thing is that, there are no errors that I can see anywhere, not on files and not on debugger.

I am suspecting that the new version of electron that MM is using is simply blocking the iframe method in there.

If I open it from a browser, it works. Which is odd.

So it sounds like there is a difference between the previous version of electron on the MM project and the new one.

Have you experienced this? Do you have any tip on how I could debug that?

The command with electron that is failing to show the module is like this:

/home/pi/MagicMirror/node_modules/electron/dist/electron --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=10586796995701231033,8744753150483581898,131072 --enable-features=WebComponentsV0Enabled --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess --lang=en-US --service-sandbox-type=network --shared-files=v8_context_snapshot_data:100

MagicMirror 2.20.0
NodeJS 16.18.1
Electron 11.4.9

Changing color

Hi, sorry if this is a dumb question, but I seem to be having trouble changing the color of my event. I added everything to the custom.css file, located in /home/pi/magicmirror/css, but nothing happens. Can you help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.