Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable alarm popup on Magic Mirror #20

Open
hco125 opened this issue Dec 12, 2018 · 8 comments
Open

How to disable alarm popup on Magic Mirror #20

hco125 opened this issue Dec 12, 2018 · 8 comments

Comments

@hco125
Copy link

hco125 commented Dec 12, 2018

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.

@fewieden
Copy link
Owner

I know that there are some music/radio modules. But then you would need a more complex setup to trigger them in a specific time frime. I think the easiest option is that I will add a config option for you.

@hco125
Copy link
Author

hco125 commented Dec 22, 2018 via email

@fewieden
Copy link
Owner

The plan is to do it in the hackathon fewieden/MagicMirror-Hackathon#8 and then it will be available as an update.

@hco125
Copy link
Author

hco125 commented Dec 23, 2018 via email

@fewieden
Copy link
Owner

You can test it now #22

  1. Go to the module directory cd ~/MagicMirror/modules/MMM-AlarmClock
  2. Change to the develop branch git checkout develop
  3. Test and report

@hco125
Copy link
Author

hco125 commented Dec 29, 2018

Tested it. Popup alert is gone. Works beautifully! Thanks. How do I change back to the normal branch after the update is available?

The timer no longer stops the alarm after 1 min.

Here's my config:

		{
			module: 'MMM-AlarmClock',
			config: {
				alarms: [
					{
						time: '00:19', //must be 24 hr format
						days: [1,2,3,4,5,6], //Sunday=0, Saturday=6
						title: 'KBRX - Party Line',
						message: 'Party Line',
						sound: 'http://162.244.81.209:8032/stream?autoplay=1',
					},
				],
				timer: 60000, //in milliseconds
				volume: 1.0,
				touch: false,
				format: 'ddd, h:mm A',
				fade: false,
				fadeTimer: 60 * 1000, //change 1st operand to specify seconds, how long fade into alarm before volume is set
				fadeStep: 0.005, //0.5%, inc volume this percent amount each second until fadeTimer is reached
				popup: false,
			},
		},

@fewieden
Copy link
Owner

The problem is you don't have a position for the module specified. Since I'm using now nunjuck templates this is required.

Your config should look similar to this (you don't need to specify the options with default values if you don't change them):

{
  module: 'MMM-AlarmClock',
  position: 'top_right',
  config: {
    alarms: [
      {
	time: '12:44', //must be 24 hr format
	days: [1,2,3,4,5,6], //Sunday=0, Saturday=6
	title: 'KBRX - Party Line',
	message: 'Party Line',
	sound: 'http://162.244.81.209:8032/stream?autoplay=1',
      },
    ],
    popup: false
  },
},

After the update is available you can do git checkout master && git pull in the module directory.

@hco125
Copy link
Author

hco125 commented Dec 29, 2018

fewieden,

I usually put all config options in my config.js file so that I can tweak them later if I want to, without having to look up the options again, even if I do leave them set at the defaults at the time.

Adding a position fixed the issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants