<?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[sendNotification help]]></title><description><![CDATA[<p dir="auto">I want to be able to send a value to <a href="https://github.com/mykle1/MMM-EventHorizon" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mykle1/MMM-EventHorizon</a> to change the time used in a count down timer. Right now I can make the module hide with…</p>
<pre><code>this.sendNotification('HIDE_TIMER');
</code></pre>
<p dir="auto">but I cant seem to do much more, how do I change my sendNotification to include a payload to change the date and time in MMM-EventHorizon. I will have to change the notificationReceived in MMM-EventHorizon to I assume…</p>
]]></description><link>https://forum.magicmirror.builders/topic/9534/sendnotification-help</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 08:37:29 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/9534.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Jan 2019 15:51:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to sendNotification help on Fri, 18 Jan 2019 17:44:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jasondreher" aria-label="Profile: jasondreher">@<bdi>jasondreher</bdi></a> said in <a href="/post/50375">sendNotification help</a>:</p>
<blockquote>
<p dir="auto">this.time = payload</p>
</blockquote>
<p dir="auto">probably</p>
<pre><code>this.config.time = payload
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/50376</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50376</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 18 Jan 2019 17:44:00 GMT</pubDate></item><item><title><![CDATA[Reply to sendNotification help on Fri, 18 Jan 2019 17:21:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jasondreher" aria-label="Profile: jasondreher">@<bdi>jasondreher</bdi></a> said in <a href="/post/50371">sendNotification help</a>:</p>
<blockquote>
<p dir="auto">this.time = payload</p>
</blockquote>
<p dir="auto">I added “this.time = payload”, this is using the payload correct?</p>
]]></description><link>https://forum.magicmirror.builders/post/50375</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50375</guid><dc:creator><![CDATA[jasondreher]]></dc:creator><pubDate>Fri, 18 Jan 2019 17:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to sendNotification help on Fri, 18 Jan 2019 17:17:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jasondreher" aria-label="Profile: jasondreher">@<bdi>jasondreher</bdi></a> you didn’t use the payload. Just hide and show. I don’t know the other module.</p>
<p dir="auto">But I would guess u need to start a timer with some elapsed time til the action (from now)</p>
]]></description><link>https://forum.magicmirror.builders/post/50373</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50373</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 18 Jan 2019 17:17:10 GMT</pubDate></item><item><title><![CDATA[Reply to sendNotification help on Fri, 18 Jan 2019 16:54:04 GMT]]></title><description><![CDATA[<p dir="auto">OK so I change my sendNotification to</p>
<pre><code>this.sendNotification('SHOW_TIMER','18:25:25');
</code></pre>
<p dir="auto">and the MMM-EventHorizon notificationReceived to</p>
<pre><code>    notificationReceived: function(notification, payload) {
        if (notification === 'HIDE_TIMER') {
            this.hide(1000);
        } else if (notification === 'SHOW_TIMER') {
            this.show(1000);
            this.time = payload //I added this
            this.updateDom();  //I added this
        }

    },
</code></pre>
<p dir="auto">Thinking the paylaod will update the countdown time but it does nothing… Not sure what I am doing worng. I have tested this quite a few different ways and searched quite a bit…</p>
<p dir="auto">I can tell its doing something as it flickers (like it is refreshing with the updateDom) but the countdown does not reflect the new time.</p>
]]></description><link>https://forum.magicmirror.builders/post/50371</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50371</guid><dc:creator><![CDATA[jasondreher]]></dc:creator><pubDate>Fri, 18 Jan 2019 16:54:04 GMT</pubDate></item><item><title><![CDATA[Reply to sendNotification help on Fri, 18 Jan 2019 16:29:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jasondreher" aria-label="Profile: jasondreher">@<bdi>jasondreher</bdi></a>   just add the payload on to the api call  like this</p>
<pre><code>this.sendNotification('HIDE_TIMER', payload);
</code></pre>
<p dir="auto">‘payload’ can be anything…  a variable (this.variable_name), a literal(‘some literal string’), a dynamically constructed value (‘some value’ + variable_name + ’ right now ')</p>
<p dir="auto">the receiving modules sendNotificationReceived(code, payload, sender) function is responsible for ignoring or processing the payload data according to the shared rules of the sender</p>
]]></description><link>https://forum.magicmirror.builders/post/50369</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50369</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 18 Jan 2019 16:29:48 GMT</pubDate></item></channel></rss>