fewieden / MMM-AlarmClock

Alarm Clock Module for MagicMirror²
MIT License
47 stars 18 forks source link

FeatureRequest - Start another module when alarm activates. #47

Closed FuryGear closed 8 months ago

FuryGear commented 9 months ago

Good morning

How could one be able to activate/start a module (Like EXT-Spotify) when the Alarm activates.

Regards

Leigh

fewieden commented 9 months ago

@FuryGear what do you mean exactly by starting a module? Modules are started on launch of the Mirror. Do you maybe mean just sending a notification to start playing music?

I assume you mean this module https://github.com/bugsounet/EXT-Spotify

It looks like the module supports the possibility to start playing music from other modules by sending EXT_SPOTIFY-PLAY. Unfortunately sending notifications on alarms is not supported.

But there is another module that should allow you to achieve what you're trying to do, take a look at https://github.com/ianperrin/MMM-ModuleScheduler#scheduling-notifications.

Something similar to this should do it:

{
        module: 'MMM-ModuleScheduler',
        config: {
            // START PLAYING SPOTIFY AT 09:30 EVERY DAY
            notification_schedule: {
                notification: 'EXT_SPOTIFY-PLAY',
                schedule: '30 9 * * *'
            }
        }
    },
FuryGear commented 8 months ago

Perfect. This worked like a charm.

Thank you