<?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[Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have been trying to display a notification on my MM upon the receival of a HTTP request that comes from my gate. When womeone pushes the button at the gate, the gate is able to do a HTTP request.</p>
<p dir="auto">It is setup to request: <a href="http://MYMM:8090/webhook" target="_blank" rel="noopener noreferrer nofollow ugc">http://MYMM:8090/webhook</a></p>
<p dir="auto">When that is fired I receive a 200:OK.</p>
<p dir="auto">In my config I have:</p>
<pre><code>{
      module: "MMM-NotificationTrigger",
      config: {
        useWebhook:true,
        triggers:[
          {
            trigger: "SHOW_ALERT",
            fires: [
              {
                fire:"SHOW_ALERT",
                payload:{
                        "title": "PORTEN",
                        "message": "Der er nogen ved porten",
                        "timer":5000
                        },
              },
            ],
          },
        ]
      }
 },
</code></pre>
<p dir="auto">Can anyone point me in the right direction?</p>
<p dir="auto">Much appreciated :)</p>
<p dir="auto">Br,<br />
Lars</p>
]]></description><link>https://forum.magicmirror.builders/topic/19016/receive-a-http-request-and-subsequently-wake-up-display-and-display-alert-notification</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 04:11:53 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19016.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Sep 2024 11:44:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Wed, 02 Oct 2024 06:57:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> said in <a href="/post/120069">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milkshake" aria-label="Profile: MilkShake">@<bdi>MilkShake</bdi></a> said in <a href="/post/120063">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto">It works when I include the notification in the URL like this:</p>
<p dir="auto"><a href="http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR</a></p>
</blockquote>
<p dir="auto">Simply, you can use this.</p>
<pre><code>http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
</code></pre>
<blockquote>
<p dir="auto">That is the <code>GET</code> method.</p>
</blockquote>
<p dir="auto">for the shellscript, your trial seems right, but you should take care for the path and the permission.<br />
I think this would be right. (It depends on your environment)</p>
<pre><code>exec: "bash /home/Kragh/monitor_on.sh",
// OR
exec: ". /home/Kragh/monitor_on.sh",
</code></pre>
</blockquote>
<p dir="auto">Well, I got it working, sort off.</p>
<p dir="auto">I cannot get <a href="http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR</a> to work. It returns a 200:OK but nothing is displayed.</p>
<p dir="auto">I have to use <a href="http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR</a> for it to work.</p>
]]></description><link>https://forum.magicmirror.builders/post/120224</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120224</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Wed, 02 Oct 2024 06:57:50 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Wed, 02 Oct 2024 17:19:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> said in <a href="/post/120232">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milkshake" aria-label="Profile: MilkShake">@<bdi>MilkShake</bdi></a> said in <a href="/post/120224">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto">I cannot get <code>http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR</code> to work. It returns a 200:OK but nothing is displayed.</p>
</blockquote>
<pre><code>http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
</code></pre>
<p dir="auto">read carefully.</p>
</blockquote>
<p dir="auto">You are absolutely correct. Thanks for pointing it out.</p>
]]></description><link>https://forum.magicmirror.builders/post/120273</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120273</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Wed, 02 Oct 2024 17:19:50 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Wed, 02 Oct 2024 12:36:51 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> said in <a href="/post/120224">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto">I cannot get <code>http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR</code> to work. It returns a 200:OK but nothing is displayed.</p>
</blockquote>
<pre><code>http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
</code></pre>
<p dir="auto">read carefully.</p>
]]></description><link>https://forum.magicmirror.builders/post/120232</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120232</guid><dc:creator><![CDATA[MMRIZE]]></dc:creator><pubDate>Wed, 02 Oct 2024 12:36:51 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Wed, 02 Oct 2024 06:57:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> said in <a href="/post/120069">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milkshake" aria-label="Profile: MilkShake">@<bdi>MilkShake</bdi></a> said in <a href="/post/120063">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto">It works when I include the notification in the URL like this:</p>
<p dir="auto"><a href="http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR</a></p>
</blockquote>
<p dir="auto">Simply, you can use this.</p>
<pre><code>http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
</code></pre>
<blockquote>
<p dir="auto">That is the <code>GET</code> method.</p>
</blockquote>
<p dir="auto">for the shellscript, your trial seems right, but you should take care for the path and the permission.<br />
I think this would be right. (It depends on your environment)</p>
<pre><code>exec: "bash /home/Kragh/monitor_on.sh",
// OR
exec: ". /home/Kragh/monitor_on.sh",
</code></pre>
</blockquote>
<p dir="auto">Well, I got it working, sort off.</p>
<p dir="auto">I cannot get <a href="http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR</a> to work. It returns a 200:OK but nothing is displayed.</p>
<p dir="auto">I have to use <a href="http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR</a> for it to work.</p>
]]></description><link>https://forum.magicmirror.builders/post/120224</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120224</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Wed, 02 Oct 2024 06:57:50 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 18:36:06 GMT]]></title><description><![CDATA[<p dir="auto">Oh well, succeded in turning the display on as well:</p>
<pre><code>{
        module: "MMM-NotificationTrigger",
        config: {
                useWebhook: true,
                triggers: [
                        {
                                trigger: "SOMEONE_AT_THE_DOOR",
                                fires: [
                                        {
                                                fire: "SHOW_ALERT",
                                                exec: "vcgencmd display_power 1",
                                                payload: {
                                                        title: "PORTEN",
                                                        message: "Der er nogen ved porten!",
                                                        timer: "20000",
                                                }
                                        }
                                ]
                        }

                ]
        }
},
</code></pre>
<p dir="auto">Last thing to do is to also play the doorbell. I need to configure the speaker on the rasp4 first.</p>
]]></description><link>https://forum.magicmirror.builders/post/120070</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120070</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Mon, 30 Sep 2024 18:36:06 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 18:32:58 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> said in <a href="/post/120063">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto">It works when I include the notification in the URL like this:</p>
<p dir="auto"><a href="http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR</a></p>
</blockquote>
<p dir="auto">Simply, you can use this.</p>
<pre><code>http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
</code></pre>
<blockquote>
<p dir="auto">That is the <code>GET</code> method.</p>
</blockquote>
<p dir="auto">for the shellscript, your trial seems right, but you should take care for the path and the permission.<br />
I think this would be right. (It depends on your environment)</p>
<pre><code>exec: "bash /home/Kragh/monitor_on.sh",
// OR
exec: ". /home/Kragh/monitor_on.sh",
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/120069</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120069</guid><dc:creator><![CDATA[MMRIZE]]></dc:creator><pubDate>Mon, 30 Sep 2024 18:32:58 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 15:27:58 GMT]]></title><description><![CDATA[<p dir="auto">Also, do you know the syntax for executing a shell script in MMM-NotificationTrigger?</p>
<p dir="auto">I though it would be like this:</p>
<pre><code>{
        module: "MMM-NotificationTrigger",
        config: {
                useWebhook: true,
                triggers: [
                        {
                                trigger: "SOMEONE_AT_THE_DOOR",
                                fires: [
                                        {
                                                fire: "SHOW_ALERT",
                                                exec: "home/Kragh/monitor_on.sh",
                                                payload: {
                                                        title: "PORTEN",
                                                        message: "Der er nogen ved porten!",
                                                        timer: "10000",
                                                }
                                        }
                                ]
                        }
                ]
        }
}

</code></pre>
<p dir="auto">monitor_on.sh is set as executionable.</p>
]]></description><link>https://forum.magicmirror.builders/post/120062</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120062</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Mon, 30 Sep 2024 15:27:58 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 14:52:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> All I have is this:</p>
<p dir="auto"><a href="https://www.doorbird.com/downloads/manual_d10x_en_de.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.doorbird.com/downloads/manual_d10x_en_de.pdf</a></p>
<p dir="auto">It works when I include the notification in the URL like this:</p>
<p dir="auto"><a href="http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR" target="_blank" rel="noopener noreferrer nofollow ugc">http://MMIP:8090/remote?action=NOTIFICATION&amp;notification=SOMEONE_AT_THE_DOOR</a></p>
<p dir="auto">That is sweet. Now I need to exec a shell script also.</p>
]]></description><link>https://forum.magicmirror.builders/post/120063</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120063</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Mon, 30 Sep 2024 14:52:13 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 14:31:21 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><br />
Could you share the doc? Let’s look inside together.</p>
]]></description><link>https://forum.magicmirror.builders/post/120061</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120061</guid><dc:creator><![CDATA[MMRIZE]]></dc:creator><pubDate>Mon, 30 Sep 2024 14:31:21 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 14:02:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> said in <a href="/post/120055">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milkshake" aria-label="Profile: MilkShake">@<bdi>MilkShake</bdi></a><br />
<img src="/assets/uploads/files/1727703790654-24fb8089-36b9-4131-96bf-5f1e7ad12574-image-resized.png" alt="24fb8089-36b9-4131-96bf-5f1e7ad12574-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">First, What request method and body is emitted from the gate?<br />
It should be something like;</p>
<ul>
<li>endpoint : <code>http://MYMM:8090/webhook</code></li>
<li>requestMethod : <code>"POST"</code></li>
<li>requestHeader: <code>"Content-type: application/json"</code></li>
<li>requestBody :  (</li>
</ul>
<pre><code class="language-json">{
  notification: "SOMEONE_AT_THE_DOOR"
}
</code></pre>
<blockquote>
<p dir="auto">If you select “GET” as requestMethod, you may need to deliver the notification as parameter instead of requestBody JSON</p>
</blockquote>
<p dir="auto">Then you can configure like this.</p>
<pre><code class="language-javascript">{
	module: "MMM-NotificationTrigger",
	config: {
		useWebhook: true,
		triggers: [
			{
				trigger: "SOMEONE_AT_THE_DOOR",
				fires: [
					{
						fire: "SHOW_ALERT",
						payload: {
							title: "Someone arrives home",
							message: "Welcome back home!",
							timer: "10000",
						}
					}
				]
			}
		]
	}
},
</code></pre>
</blockquote>
<p dir="auto">Thanks man! I will try that out. I think the doorbird appliance is using application/json POST requests, even though that is hard to find in the documentation.</p>
]]></description><link>https://forum.magicmirror.builders/post/120058</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120058</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Mon, 30 Sep 2024 14:02:36 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 13:52:07 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><br />
<img src="/assets/uploads/files/1727703790654-24fb8089-36b9-4131-96bf-5f1e7ad12574-image-resized.png" alt="24fb8089-36b9-4131-96bf-5f1e7ad12574-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">First, What request method and body is emitted from the gate?<br />
It should be something like;</p>
<ul>
<li>endpoint : <code>http://MYMM:8090/webhook</code></li>
<li>requestMethod : <code>"POST"</code></li>
<li>requestHeader: <code>"Content-type: application/json"</code></li>
<li>requestBody :  (</li>
</ul>
<pre><code class="language-json">{
  notification: "SOMEONE_AT_THE_DOOR"
}
</code></pre>
<blockquote>
<p dir="auto">If you select “GET” as requestMethod, you may need to deliver the notification as parameter instead of requestBody JSON</p>
</blockquote>
<p dir="auto">Then you can configure like this.</p>
<pre><code class="language-javascript">{
	module: "MMM-NotificationTrigger",
	config: {
		useWebhook: true,
		triggers: [
			{
				trigger: "SOMEONE_AT_THE_DOOR",
				fires: [
					{
						fire: "SHOW_ALERT",
						payload: {
							title: "Someone arrives home",
							message: "Welcome back home!",
							timer: "10000",
						}
					}
				]
			}
		]
	}
},
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/120055</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120055</guid><dc:creator><![CDATA[MMRIZE]]></dc:creator><pubDate>Mon, 30 Sep 2024 13:52:07 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 13:16:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> said in <a href="/post/120052">Receive a HTTP request and subsequently wake up display and display alert/notification</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milkshake" aria-label="Profile: MilkShake">@<bdi>MilkShake</bdi></a><br />
What is the request body from the gate? “SHOW_ALERT”? I think it would be better to emit other dedicated custom  notification other than “SHOW_ALERT”.</p>
</blockquote>
<p dir="auto">It is just a webhook that is meant to get cached by MMM-NotificationTrigger module, that in turn should be able to send notifications to the Alert module.</p>
]]></description><link>https://forum.magicmirror.builders/post/120059</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120059</guid><dc:creator><![CDATA[MilkShake]]></dc:creator><pubDate>Mon, 30 Sep 2024 13:16:06 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 13:10:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> he is trying to get the alert module popup</p>
]]></description><link>https://forum.magicmirror.builders/post/120054</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120054</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 30 Sep 2024 13:10:59 GMT</pubDate></item><item><title><![CDATA[Reply to Receive a HTTP request and subsequently wake up display and display alert&#x2F;notification on Mon, 30 Sep 2024 13:08:40 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><br />
What is the request body from the gate? “SHOW_ALERT”? I think it would be better to emit other dedicated custom  notification other than “SHOW_ALERT”.</p>
]]></description><link>https://forum.magicmirror.builders/post/120052</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/120052</guid><dc:creator><![CDATA[MMRIZE]]></dc:creator><pubDate>Mon, 30 Sep 2024 13:08:40 GMT</pubDate></item></channel></rss>