• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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-NotificationTrigger

Scheduled Pinned Locked Moved System
8 Posts 2 Posters 2.9k Views 4 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.
  • ? Offline
    A Former User @MilkShake
    last edited by A Former User Apr 1, 2020, 8:18 AM Apr 1, 2020, 8:15 AM

    @MilkShake

    It works.

    Anyway, this is more cleaner configuration.

    {
      module: "MMM-NotificationTrigger",
      config: {
        triggers:[
          {
            trigger: "PLAY_SOUND",
            fires: [
              {
                fire:"USER_PRESENCE",
              },
              {
                fire:"SHOW_ALERT",
                payload: {
                  type:"notification",
                  title:"Porten",
                  message: "Der er nogen ved porten!",
                },
              },
            ],
          },
        ]
      }
    },
    
    M 1 Reply Last reply Apr 1, 2020, 10:00 AM Reply Quote 0
    • M Offline
      MilkShake @Guest
      last edited by Apr 1, 2020, 10:00 AM

      @Sean I also tried that. The Alert does not show up in MM. It wakes the screen with USER_PRESENCE and plays the sound, but no Alert.

      ? 1 Reply Last reply Apr 1, 2020, 10:02 AM Reply Quote 0
      • ? Offline
        A Former User @MilkShake
        last edited by Apr 1, 2020, 10:02 AM

        @MilkShake Well, I don’t know why your ALERT module is not working, but as you see the screenshot, it should work. And, probably the reason might not be this module’s responsibility.

        M 2 Replies Last reply Apr 1, 2020, 12:08 PM Reply Quote 0
        • M Offline
          MilkShake @Guest
          last edited by Apr 1, 2020, 12:08 PM

          @Sean Yeah, I see that. When I fire this

          http://MM_IP:8080/remote?action=SHOW_ALERT&message=Der%er%nogen%ved%porten!&title=PORT&timer=10&type=alert

          it displays the alert.

          1 Reply Last reply Reply Quote 0
          • M Offline
            MilkShake @Guest
            last edited by Apr 1, 2020, 12:34 PM

            @Sean I got it to work using:

            {
                  module: "MMM-NotificationTrigger",
                  config: {
                    triggers:[
                      {
                        trigger: "PLAY_SOUND",
                        fires: [
                          {
                            fire:"USER_PRESENCE",
                            payload: function(payload) {
                              return false
                            },
            
                {
                            fire:"SHOW_ALERT",
                          payload: function(payload) {
                            return {
                            type:"notification",
                            title:"Porten",
                            message: "Der er nogen ved porten!"
                            },
                          },
                        ],
                      },
                    ]
                  }
             },
            

            Thanks for helping!

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              8/8
              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