<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Syntax of MMM-NotificationTrigger]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I am having difficulties with the syntax of MMM-NotificationTrigger. I have this syntax working (semi):</p>
<pre><code>{
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!"
                    }
                },
              }
            ],
          },

        ]
      }
},
</code></pre>
<p dir="auto">I need to add a trigger using webhook for the notification “Open_Gate” that fires a local script. Every time I change the syntax it seems to get broken. Can anyone help?</p>
]]></description><link>https://forum.magicmirror.builders/topic/13006/syntax-of-mmm-notificationtrigger</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 02:32:35 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/13006.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Jun 2020 09:53:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Syntax of MMM-NotificationTrigger on Mon, 08 Jun 2020 10:17:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milkshake" aria-label="Profile: MilkShake">@<bdi>MilkShake</bdi></a> Got it to work using:</p>
<pre><code>{
   module: "MMM-NotificationTrigger",
   config: {
     useWebhook:true,
	 triggers:[
	   {
	      trigger: "PLAY_SOUND",
		  fires: [
		    {
			fire: "USER_PRESENCE",
			payload: function(payload) {
                  return false
                }
			}
		  
	   ]
	 },
	 {
	    trigger: "OPEN_GATE",
		fires: [
		   {
		   fire: "OPENING_THE_GATE",
		   exec: "sudo python /home/pi/open_gate.py"
		   }
		]
	 },
   ]
  }
},
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/76780</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/76780</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Mon, 08 Jun 2020 10:17:36 GMT</pubDate></item><item><title><![CDATA[Reply to Syntax of MMM-NotificationTrigger on Fri, 05 Jun 2020 14:10:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milkshake" aria-label="Profile: MilkShake">@<bdi>MilkShake</bdi></a> So IFTTT makes a webrequest that looks like this:</p>
<p dir="auto">URL: <a href="https://MMPUBLICURL/webhook" target="_blank" rel="noopener noreferrer nofollow ugc">https://MMPUBLICURL/webhook</a><br />
Method: POST<br />
Content type: application/json<br />
Body: { “sender”: { “name”:“IFTTT” }, “notification”: “OPEN_GATE”}</p>
<p dir="auto">I thought I could do something like:</p>
<pre><code>{
module: "MMM-NotificationTrigger",
      config: {
        useWebhook: true,
        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!"
                    }
                },
              }
            ],
          },
		  {
			trigger: "OPEN_GATE",
			fires: [
				exec: "home/pi/open_gate.py"
			],
		  
		  
		  },
        ]
      }
},
</code></pre>
<p dir="auto">What is the correct syntax to fire a script?</p>
]]></description><link>https://forum.magicmirror.builders/post/76623</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/76623</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Fri, 05 Jun 2020 14:10:37 GMT</pubDate></item></channel></rss>