Closed hsukup1 closed 6 years ago
you shouldn't touch the js file and your config should look more like this
{
module: 'MMM-AlarmClock',
position: 'top_right',
config: {
sound: 'blackforest.mp3',
format: 'dddd, h:mm a',
timer: 60000,
volume: 1.0,
touch: false,
alarms: [
{
time: '15:23',
days: [1,2,3,4,5],
title: 'ABC',
message: ''
}
]
}
}
you should probably have another look in the readme for the config options
Thanks for the clarification on the config options. Your readme doesn't show enough detail to know that the "time, days, title, and message" options are the only ones that can be nested in an array under the "alarms" option.
Here is my updated configuration:
{
module: 'MMM-AlarmClock',
position: 'top_right',
config: {
sound: 'https://tunein.com/radio/Top-Dog-In-Country-1029-s31849/?autoplay=1',
format: 'dddd, h:mm a',
timer: 60000,
volume: 1.0,
touch: false,
alarms: [
{
time: '13:32',
days: [6],
title: 'Party Line',
message: 'You're listening to Party Line!',
},
],
},
},
Couple issues: the url works great when you put it directly in a web browser (Chrome or Chromium) to play the radio station...in your module...no sound.
Also, if I want to have other alarms on my MagicMirror, with other sounds, should I just have multiple AlarmClock modules in my config.js file, or is it possible to specify a different sound for each alarm on the same module?
Luckily two days ago someone just did it https://github.com/fewieden/MMM-AlarmClock/pull/14, this allows you to specify the sound per alarm. Checkout the develop branch to test it.
The link you set is not an audio src. I took a closer look at the page and found this as the audio source http://162.244.81.209:8032/stream
give it a try
Fewieden,
Thanks for the help!!! I ended up finding the link to the stream late last night and got that to work. I will try out the developer branch you mentioned. I am just beginning to learn programming so it seems like every hurdle takes so long to figure out but I think I'm at a point where it is getting easier and a bit faster.
I think it is a helpful use of what I am using the AlarmClock module for, so perhaps you can add it as a suggested use on you GitHub repo. Our local radio station has a "Party Line" show every weekday from 9:30 am to 11:00 am and I set this up to automatically play and shut it off at the right time. It is a local "Craigslist" on the radio. Once I found the link to the stream...it works, well, like *Magic***.
One thing I don't like about the MMM-ModuleScheduler module is that it merely 'hides' the module, but I want to get that modified when I find some time so that you can opt to 'disable' and 'enable' modules on a time schedule. I had the radio working on the iFrame module...and I could hide it when I didn't want to see it...but it never shut off audio.
Regards,
Holly Ochidi
On Sun, May 6, 2018 at 4:07 PM, fewieden notifications@github.com wrote:
Luckily two days ago someone just did it #14 https://github.com/fewieden/MMM-AlarmClock/pull/14, this allows you to specify the sound per alarm. Checkout the develop branch to test it.
The link you set is not an audio src. I took a closer look at the page and found this as the audio source http://162.244.81.209:8032/stream give it a try
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fewieden/MMM-AlarmClock/issues/12#issuecomment-386913934, or mute the thread https://github.com/notifications/unsubscribe-auth/AkypurBy-G5kHW9L8RfdyD6rSZ2P33sfks5tv2YugaJpZM4Tue0X .
It's now on master
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 Note: no sound from this webstream, however, changing other defaults updates the format
MagicMirror/config/config.js 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.