MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Sounds - Play sounds triggered by other Modules

    Scheduled Pinned Locked Moved Utilities
    2 Posts 2 Posters 3.0k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jc21
      last edited by

      MMM-Sounds for any mirror/operating system with Alsa support and speakers attached or built in to the monitor. Full setup instructions in the readme.

      Currently used in my other MMM-IFTTT module.

      To play a sound from another module:

      this.sendNotification('PLAY_SOUND', 'wobble.wav');
      

      or also specifying a delay:

      this.sendNotification('PLAY_SOUND', {sound: 'wobble.wav', delay: 1000}); // 1 second delay
      
      1 Reply Last reply Reply Quote 0
      • cowboysdudeC Offline
        cowboysdude Module Developer
        last edited by

        Interesting… I could add this to the MMM-Mail to play a sound when a new email comes in… nice :)

        1 Reply Last reply Reply Quote 3
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy