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.

    How to use the Alert module?

    Scheduled Pinned Locked Moved Troubleshooting
    4 Posts 2 Posters 1.1k 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.
    • K Offline
      keineAhnung123
      last edited by

      Hello,

      Module: https://docs.magicmirror.builders/modules/alert.html

      Is it possible to show an alert via notification?
      I can send notifications with for example MMM-Buttons.
      Is there an example anywhere?

      Thank you :)

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        ashishtank Module Developer @keineAhnung123
        last edited by

        @keineAhnung123 said in How to use the Alert module?:

        MMM-Buttons

        you could do something like this below. I did not tested it my self and it based on documentation of both MMM-Buttons and Alert module.

        {
        	pin: 24,
        	name: "alert",
        	longPress: {
        		title: "Show Alert",
        		message: "Keep pressed for 3 seconds to show alert",
        		imageFA: "alert image here",
        		notification: "SHOW_ALERT",
        		payload: { 
           				  type: 'notification',
           				  title : 'Title of notification', 
        				  message : 'Message text here',
           				  timer : 3000 
        				}
        	},
        	shortPress: undefined
        }
        
        1 Reply Last reply Reply Quote 0
        • K Offline
          keineAhnung123
          last edited by keineAhnung123

          @ashishtank
          Thanks.
          That worked fine :)

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            ashishtank Module Developer @keineAhnung123
            last edited by

            @keineAhnung123 My pleasure.

            1 Reply Last reply Reply Quote 0
            • 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