mykle1 / mmm-eventhorizon Goto Github PK
View Code? Open in Web Editor NEWSimple countdown timer for events. Birthdays, weddings, anniversaries, vacations, etc.
License: MIT License
Simple countdown timer for events. Birthdays, weddings, anniversaries, vacations, etc.
License: MIT License
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¬ification=START_TIMER
Any thoughts?
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
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.
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?
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?
using
justDays: "yes",
does not result in any changes.
Neither does:
using
justDays: true,
Thanks for your great work though so far!
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
This doesn't work. I've followed some of the instructions and it doesn't work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.