Giter Club home page Giter Club logo

mmm-eventhorizon's Issues

[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?

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

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.

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?

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?

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!

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

It's broken

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

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.