A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
MMM-NotificationTrigger
-
@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!", }, }, ], }, ] } },
-
@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.
-
@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.
-
@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.
-
@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!