GithubHelp home page GithubHelp logo

fewieden / mmm-alarmclock Goto Github PK

View Code? Open in Web Editor NEW
47.0 11.0 18.0 1.05 MB

Alarm Clock Module for MagicMirror²

License: MIT License

CSS 1.71% JavaScript 94.26% Nunjucks 4.02%
magicmirror alarm alarm-clock touch-compatible webstream localstream

mmm-alarmclock's People

Contributors

2hochan avatar fewieden avatar mjtice avatar plosxh avatar slametps avatar ybbet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmm-alarmclock's Issues

New module based on MMM-AlarmClock

Hi,

I have an idea of modules based on MMM-AlarmClock

I would like to give compliments instead:

That every hour it displays a message ("It is 1pm" when it is 1pm for 1 min) without the borders nor the focus nor sounds just a notification, as compliment messages

Is that possible?

Thank you very much I am French

Sound problem

Platform (Hardware/OS): Raspberry Pi 3 B

Node version: v10.4.0

MagicMirror version: 2.4.0

Module version: 1.1.0

Description of the issue: I enable the sound output by hdmi but the alarm sound is not working. I can see the alarm on screen. I configure the Fadetimer to 1sec (my sound is 6sec). But, no sound comes out of the speaker.
Any idea ?

Alarm sound unexpected behaviour

Platform (Hardware/OS): RPI-4 / Raspbian GNU/Linux 11 (bullseye). Official 7" touch screen.

Node version: v18.17.1

MagicMirror version: 2.24.0

Module version: 2.0.1
Description of the issue: At alarm time, the alert shows and the audio file is played. Touching the screen closes the visual alert but the sound file continues to play. It plays 3 times before stopping of its own accord.
This is with the minimal example entry to config as in readme.
Have tried a fresh OS and mm install.

Is this normal? I expected the sound to stop when touching the screen. If normal, what can I change it to get expected behaviour?

Thank you!

ShellExec

Hey there,

this is more a feature request. I would love to see an option to run Shell commands in case of alarm. This way I could turn on/turn off my light in alarm case..

optional: shell commands in case of touch after alarm and shell command if no one touches.

https://github.com/gfischershaw/MMM-Touch/blob/master/MMM-Touch.js got that ShellExec to work

Thanks for module!!

Use random song?

Do you know if it is possible to have the alarm select a random file from the sounds folder when the alarm goes off?

I have been looking into the code but I know very little with regards to javascript so I haven't been able to find a way.

Thanks for making such an awesome module!

Suggestion

Platform (Hardware/OS):
Any
Node version:
Current
MagicMirror version:
ANY
Module version:
Dev
Description of the issue:
Not an issue a suggestion for enhancement. Why not just make this a clock with an alarm clock? Makes much more sense. You could show the time and if there's an alarm show that under the time... Just and idea.

Alarm does not stop when using a unique event

Hi There,
The module works fine when alarm is set for a daily, weekly, etc... repeat. However, when I set it for a single event it's firing at the right time but does not stop (I do not have a touch screen device, touch parameter set to false).

Here are my settings in the MMM-AlarmClock.js file:
defaults: {
sound: 'alarm.mp3',
touch: false,
volume: 1.0,
format: 'D MMM, HH:mm',
timer: 15 * 1000 // 15 seconds
},

... and in the config.js file:
{
module: 'MMM-AlarmClock',
position: 'top_center',
config: {
alarms: [
{time: "18:30", days: ["8 Apr"], title: "Soccer", message: "Get ready for soccer training!"},
],
}
}

I have the same problem when I set "format" to 'DD:MM, HH:mm' and "time" and "days" to time: "18:30", days: [08:04],...

I hope this helps,
Best regards,
Eric.

How to disable alarm popup on Magic Mirror

Platform (Hardware/OS): Raspberry Pi 3B, Raspbian Stretch

Node version: ?

MagicMirror version: 2.5.0

Module version: latest as of 12/12/18

I am very inexperienced in programming so I have been stumbling along trying to set up my MagicMirror.

Your module works perfectly for my purposes of playing a radio show every week day at a certain time on a non-touch enabled screen. However, the popup that will not disappear as the alarm is active is incredibly frustrating. Is there a way to disable the alarm popup from occurring so that the radio show will play in the background without covering up the rest of my modules and disrupting my flow of information for an hour each weekday.

I have looked through the files in this module but cannot figure out how to disable the alarm popup without disrupting the alarm reset and such...

If this is not easily accomplished, do you know of another module that would play from a radio stream URL at a specified time each day for a specified length of time each day?

Regards.

Default configs not changed with entry in config.js & Webstream not playing

Platform (Hardware/OS): RPi3 B/Raspbian Jessie

Node version: ??

MagicMirror version: 2.3.1

Module version: 1.1.0

Description of the issue: module.config entries in MagicMirror/config/config.js file do not override defaults set in MagicMirror/modules/MMM-AlarmClock/MMM-AlarmClock.js file (see screenshots).

Also, webstream plays nothing, when changed to the default in MMM-AlarmClock.js (does not override default if set in config.js).

MagicMirror/modules/MMM-AlarmClock/MMM-AlarmClock.js change of defaults
image
Note: no sound from this webstream, however, changing other defaults updates the format

MagicMirror/config/config.js
image
Notes: Options time, days, title, message, timer, volume, & touch work as expected. Options sound & format do not overide defaults set in MMM-AlarmClock.js file.

turn off the alarm by clicking on the USB mouse

Platform (Hardware/OS): RaspberryPi 3 Model B+, Raspbian

Node version: 8.10.0

MagicMirror version: 2.2.2

Module version: 1.1.0

Description of the issue: Hope to turn off the alarm by clicking on the USB mouse.

the alarm won't stop!

when the time reaches the alarm time, it wont start!
i've noticed something that the time of the alarm is written in AM but my raspberry pi and MagicMirror is in 24h format.. maybe this has to do with why it isn't working.. but i don't know how to fix it! please help

Issue for converting montly or bi-monthly recurring

Platform (Hardware/OS):
rpi4
Node version:

MagicMirror version:
Last version
Module version:

Description of the issue:
It is not an ıssue, I am trying to convert alarm module into each sunday monthly or bi-monthly (8 weeks) sunday.
How can i achieve this ?

Popup to dismiss alarm isn't appearing when alarm goes off

Platform (Hardware/OS): Raspberry Pi Model B Rev 1.2

Node version: 20.15.0

MagicMirror version: v2.28.0

Module version: 2.0.2

Description of the issue:

Display: Raspberry Pi 7-inch Touchscreen

I'm looking for some help/advice here.

I've been using MMM-AlarmClock for quite a while and been very happy. I recently rebuilt my system with the latest MagicMirror and Raspbian and modules and now when the alarm goes off, I no longer get the popup that you can click on to dismiss the alarm. I've tried a bunch of different configuration options, and it doesn't appear.

This is my config:

	{
	    disabled: false,
	    module: 'MMM-AlarmClock',
	    position: 'top_center',
	    config: {
		alarms: [
		    { time: "06:00", days: [1,2,3,4,5], title: "Wake Up if you feel like it", message: "You DON'T have to go to work today!!!", sound: "https://fm909.wbur.org/wbur_www" },
		    { time: "15:13", days: [0,1,2,3,4,5,6], title: "Temp alarm", message: "Testing 123", sound: "https://fm909.wbur.org/wbur_www" },

		],
		timer: 3600000, 
		format: "dd H:mm",
		touch: true,
		popup: true,
		fade: true,
		fadeTimer: 30000,
		fadeStep: 0.0333,
	    }
	},

This is what my screen looks like before the alarm goes off:
before
and this is what my screen looks like while the alarm is going off:
after

Am I doing something wrong? Thanks for any advice you can provide.

Alarm doesn't stop on touch

Platform (Hardware/OS): Raspberry Pi 3 B

Node version: v10.15.2

MagicMirror version: 2.8.0

Module version: 1.1.0

Description of the issue:
When an alarm goes off with touch enabled, I expect that the alert will disappear, the sound will stop, and the scrim over the main MM display will go away. Instead, after several touches, the alert finally goes away, but the sounds and scrim stay up until the 60 seconds ends.

                {
                        module: "MMM-AlarmClock",
                        position: "top_right",
                        touch: "true",
                        config: {
                                alarms: [
                                        {time: "21:33",  days: [0], title: "Test", message: "Test Message!", sound: "alarm.mp3"}
                                ],
                        }
                },`

Per-alarm timeout not working

Platform (Hardware/OS): Raspberry Pi 3 Model B Rev 1.2, Raspbian GNU/Linux 12 (bookworm)

Node version: 20.15.0

MagicMirror version: v2.28.0

Module version: 2.0.2

Description of the issue:

From my testing, the per-alarm "timer" value is ignored.

I have tried both with and without an overall "timer" value being set. The overall timer value is used whether or not a per-alarm timer is set. If there is no overall timer value set, then the per-alarm value of "timer" seems to be ignored and the default per-alarm timer of 1 minute is used.

Here is a summary of my testing:

overall              per-alarm                    result
-------------------------------------------
set                  not set                         overall value is used
set                  set                             overall value is used
not set              set                             default overall 1-minute value is used
not set              not set                         default overall 1-minute value is used

Looking at the code, if I'm reading it right, it appears the per-alarm timer is ignored if "touch" is enabled:

            let timer = this.config.timer;
            // If the alarm has specific timer and if MM is not touch, we use the alarm timer.
            if (typeof this.next.timer !== 'undefined' && !this.config.touch) {
                timer = this.next.timer;
            }
            if (!this.config.touch) {
                alert.timer = timer;
            }

Is there a way to set per-alarm timeouts even if you have "touch" enabled?

Here is what my config looks like:

	{
	    disabled: false,
	    module: 'MMM-AlarmClock',
	    position: 'top_center',
	    config: {
		alarms: [
		    { 
			time: "06:00",
			days: [1,2,3,4,5], 
			title: "Wake Up for work",
			message: "You have to go to work today",
			sound: "https://fm909.wbur.org/wbur_www",
			timer: 60 * 60 * 1000 
		    },
		    { 
			time: "11:28", 
			days: [0,1,2,3,4,5,6],
			title: "Test alarm",
			message: "Will it blend?",
			sound: "https://fm909.wbur.org/wbur_www",
			timer: 30 * 1000 
		    },
		],
		// overall timer setting commented out
		// timer: 60 * 60 * 1000, 
		format: "dd H:mm",
		touch: true,
		popup: true,
		fade: true,
		fadeTimer: 30000,
		fadeStep: 0.0333,
	    }
	},

In this example (with the overall "timer setting commented out), "Test alarm" goes off at 11:28, but doesn't stop after 30 seconds. Instead, it continues until the (default) 60 seconds and then stops.

Wake Option?

Platform (Hardware/OS):
Raspberry Pi - Rasbian

Node version:
I'm not sure.

MagicMirror version:
Latest

Module version:
Not yet added.

Description of the issue:
I'm trying to integrate Snowboy to wake/sleep the display. However, I also want to integrate your alarm module into my mirror. The only conflict is that the screen would be asleep while the alarm is going off. I have my audio defaulted to my HDMI. Is it possible to have a feature where the LCD screen can wake up when the alarm goes off? If there is already a feature like this, can you please link it?

I'm new to this. I'm sorry.

Thank you,
Bryan

Not getting the popup

Platform (Hardware/OS):Pi 3B

Node version: 10.17.0

MagicMirror version: 2.9.0

Module version: 2.0.0

Description of the issue: Just installed the MMM-AlarmClock on my new setup MagicMirror. I somehow can't get it to work properly. This is what I put in the config-file:

{ module: "MMM-AlarmClock", position: "top_center", config: { alarms: [ {time: "18:15", days: [0,1,2,3,4,5,6], title: "Test", message: "something in writing",}, ], format: "ddd HH:mm", popup: true, fade: false, } },

  1. The alarm starts at the time i program it in the config and ends after a minute. But never during this time I get to see the popup as in the example shown on this page. I added "popup: true" to the config file (knowing that this should be the default value) with no effekt.
    Any ideas what I might be doing wrong?

  2. Then what I also can't figure out: The first "beep" of the alarm sound is at normal volume. Every "beep" that follows is quieter - as if fare away. I tried different speakers and headphones - all with the same result. What could cause that?

  3. I also tried combining the alarm clock module with MMM-Button. But I can't get any response from pressing the button. I checked the button with the little python program from http://razzpisampler.oreilly.com/ch07.html The button works. It's just that I can't get the alarm to stop by pressing the button. This is the code in my config file:
    { module: "MMM-Button", config: { buttonPIN: 12, clickDelay: 500, notificationMessage: "STOP_ALARM", } },

Thank you for any help. I'm quite new to this and I really can't figure out what I'm missing. I tried a lot, googled my way through a lot of websites...

edit: I'm sorry for the messy code. It doesn't show the line-breaks as I idended.

Automatic turn off

Hi there,
Sorry if you have already mentioned this just that i cant see it is there a way so the pop up atomaticly goes away after a minute or a time just because i dont have a touch screen?

Sound and Screen Dimming

Platform (Hardware/OS): Raspberry Pi

MagicMirror version: 2.1.1

Module version: 1.10

Description of the issue:
I would like my Mirror to wake me up in the morning. But I am currently having 2 problems with the Alarm Clock Module

Firstly, The Sound does not play out of my speaker. But Using omxplayer in terminal, I do get sound

Secondly, After I dismiss the Alert. The Screen Stays Dim. The only way to get the brightness back is to exit magic mirror and launch it again.

The Module Config is below

{
	module: 'MMM-AlarmClock',
	position: 'top_right',
	config: {
		alarms: [
			{time: "7:30", days: [1,2,3,4,5], title: "Good Morning", message: "Time to get up"},
			],
		touch: 'true'
		sound: 'music.mp3'
		}
},

Thanks alot
JCas01

FeatureRequest: Touch set an alarm

What do you think about the possibility to set an alarm when you're using a touch screen? Do you think this would be possible? I'm seeing more and more people using a touch screen and the magic mirror software. I want to use it as an "alarm clock" but where I can set the time dynamically before going to bed :) Do you think it would be doable?

Syntax Error when adding to config.js (Solved)

Platform (Hardware/OS):
Raspian Pi (

Node version:
V12.13
MagicMirror version:
Latest Version
Module version:
Latest Version
Description of the issue:
Im completely new to this , I add this between the calendar and compliments after the }, and before the {

{
module: 'MMM-AlarmClock',
position: 'top_right',
config: {
alarms: [
{time: "18:30", days: [2,4], title: "Soccer", message: "Get ready for soccer training!", sound: "alarm.mp3"},
...
],
...
}
}

Then I get this error

Starting MagicMirror: v2.9.0
Loading config ...
WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:60
],
^

SyntaxError: Unexpected token ]
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:678:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)
Loading module helpers ...
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: helloworld.
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: updatenotification
Sockets connected & modules started ...
Launching application.
Shutting down server...
Stopping module helper: updatenotification
pi@raspberrypi:~/MagicMirror $

When I remove it, it works as per normal....

Module won't show on screen even with config placed

Platform (Hardware/OS): Raspberrypi 3B+ / raspberry OS

Node version: 20.10.0

MagicMirror version: 2.26.0

Module version: 2.0.2

Description of the issue:
I did a 'git clone' of this module and added it to the config file as required using the example alarm. The module doesn't show on the screen nor does any alarm fire.

my config as I have it:
{
module: 'MMM-AlarmClock',
position: 'top_left',
format: 'ddd, h,mmA',
config: {
alarms: [
{time: "18:30", days: [0,1,2,3,4,5,6], title: "test", message: "none", sound: "alarm.mp3"},
],
}
},

Add Alert via API

Hi,

is there a way to create an alert config by API? I have the MagicMirror connected with kalliope and would like to display a reminder i can set there by voice, to show up and run on the screen as well.

Many thanks
Stefan

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.