https://github.com/janloebel/mmm-touchalarm
Touchable Alarm Clock Module for MagicMirror2
https://github.com/janloebel/mmm-touchalarm
alarm alarm-clock magicmirror2 touch touchable touchscreen
Last synced: about 1 year ago
JSON representation
Touchable Alarm Clock Module for MagicMirror2
- Host: GitHub
- URL: https://github.com/janloebel/mmm-touchalarm
- Owner: JanLoebel
- License: mit
- Created: 2019-01-30T19:46:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T09:16:02.000Z (over 7 years ago)
- Last Synced: 2025-01-27T06:12:44.292Z (over 1 year ago)
- Topics: alarm, alarm-clock, magicmirror2, touch, touchable, touchscreen
- Language: JavaScript
- Size: 435 KB
- Stars: 1
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Touchable Alarm Clock Module for MagicMirror2
## Dependencies
* An installation of [MagicMirror2](https://github.com/MichMich/MagicMirror)
## Installation
1. Clone this repo into `~/MagicMirror/modules` directory.
1. Configure your `~/MagicMirror/config/config.js`:
```
{
module: 'MMM-TouchAlarm',
position: 'bottom_left',
config: {
snoozeMinutes: 10, // I want to snooze longer
alarmTimeoutMinutes: 5, // Stop the alarm automatically after 5 minutes
alarmSoundFile: 'blackforest.mp3', // Play some birds
alarmSoundFadeSeconds: 60 // Increase the volume slowly
// ...
}
}
```
## (Currently) Known limitations
* If you snooze, the alarm time will be updated. So the next day you have to reset the alarm and reduce it by the snoozed time.
* If you close an alarm it will not be automatically be reset for the next day, you've to click the bell again.
## Config Options
| **Option** | **Default** | **Description** |
| --- | --- | --- |
| `minutesStepSize` | `5` | Increasing/Decreasing the minutes in the configuration screen with this step size. |
| `snoozeMinutes` | `5` | Alarm will be fired again in x minutes after snoozing. |
| `alarmTimeoutMinutes` | `5` | Stop the alarm automatically after this amount of minutes. |
| --- | --- | --- |
| `alarmSound` | `true` | Should an alarm sound be played. |
| `alarmSoundFile` | `'alarm.mp3'` | Name and extension of your alarm sound. File needs to be placed in `~/MagicMirror/modules/MMM-TouchAlarm/sounds`. Standard files are `alarm.mp3` and `blackforest.mp3`. Alternatively specify a web stream `http` or `https`. |
| `alarmSoundMaxVolume` | `1.0` | The maximum volume of alarm (between 0.0 and 1.0). |
| `alarmSoundFade` | `true` | Should the alarm sound file be faded. |
| `alarmSoundFadeSeconds` | `30` | Within how many seconds should the alarm reach the configured `alarmSoundMaxVolume`. |
| | | |
| **Expert Options** | | |
| `debug` | `false` | If set to `true` it will show some debug information in the console. |
| `alarmStoreFileName` | `alarm.json` | File name to store information even if the Magic Mirror restarts. |
## Alarm Sounds
There are already two alarm sounds:
* [alarm.mp3](http://www.orangefreesounds.com/mp3-alarm-clock/) | From Alexander licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
* [blackforest.mp3](http://www.orangefreesounds.com/coo-coo-clock-sound/) | From Alexander licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
## Notifications
More notifications will be implemented as soon as wished.
### Outgoing
* `MMM-TouchAlarm-ALARM-CHANGED` -> will be send `hour`: number, `minutes`: number, `active`: boolean, `nextAlarm`: moment-timestamp
* `MMM-TouchAlarm-ALARM-FIRED` -> will be send `hour`: number, `minutes`: number
* `MMM-TouchAlarm-ALARM-SNOOZE` -> will be send `hour`: number, `minutes`: number
## Special Thanks
Special thanks to [fewieden](https://github.com/fewieden/) for creating [MMM-AlarmClock](https://github.com/fewieden/MMM-AlarmClock) which helped a lot to create this project.