<?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[Python in to the magic mirror.]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I heave a raspberry running with python and a magic mirror modules.<br />
In the python project I heave a string variable that I want to display in a line of the mirror.<br />
I m a little bit of noob with all this and im learning bit by bit.</p>
<p dir="auto">Can anyone tell me how to do this. what I need to program in the python code and what I need to use for module.</p>
<p dir="auto">Please let me know.</p>
<p dir="auto"><img src="/assets/uploads/files/1548242089218-schermafbeelding-2019-01-23-om-12.12.30.png" alt="0_1548242086835_Schermafbeelding 2019-01-23 om 12.12.30.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/topic/9591/python-in-to-the-magic-mirror</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 06:00:49 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/9591.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Jan 2019 11:15:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 24 Jan 2019 13:08:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a><br />
If possible, Instead image, post code itself.<br />
Anyway, You’d better to read docs more carefully.</p>
<p dir="auto"><strong>MMM-P2000.js</strong></p>
<pre><code class="language-js">/// MMM-P2000.js

Module.register("MMM-P2000", {
  getDom: function() {
    var e = document.createElement("div")
    e.id = "DISPLAY"
    return e
  },
  notificationReceived: function(notification, payload, sender) {
    switch(notification) {
      case "DOM_OBJECTS_CREATED":
        var timer = setInterval(()=&gt;{
          this.sendSocketNotification("GIVE_ME_DATA")
        }, 1000)
        break
    }
  },
  socketNotificationReceived: function(notification, payload) {
    switch(notification) {
      case "HERE_IS_DATA":
        var e = document.getElementById("DISPLAY")
        e.innerHTML = payload
        break
    }
  },
})
</code></pre>
<p dir="auto"><strong>node_helper.js</strong></p>
<pre><code>/// node_helper.js
const spawn = require("child_process").spawn
var NodeHelper = require("node_helper")

module.exports = NodeHelper.create({
  socketNotificationReceived: function(notification, payload) {
    switch(notification) {
      case "GIVE_ME_DATA":
        this.job()
        break
    }
  },
  job: function() {
    var process = spawn("python", ["/home/pi/src/test.py"])
    process.stdout.on("data", (data)=&gt;{
      console.log(data)
      this.sendSocketNotification("HERE_IS_DATA", data)
    })
  }
})
</code></pre>
<p dir="auto">I didn’t test. I wrote this code with only my brain. so there could be errors, but you can catch the concept.</p>
]]></description><link>https://forum.magicmirror.builders/post/50730</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50730</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 24 Jan 2019 13:08:11 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 01 Feb 2019 12:31:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
Yes one time start the python and it will run.</p>
]]></description><link>https://forum.magicmirror.builders/post/51241</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51241</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Fri, 01 Feb 2019 12:31:26 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 01 Feb 2019 12:30:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a><br />
You can put <code>var process = spawn("python", ["/home/pi/src/P2000.py"])</code><br />
into <code>start</code> function if you want to execute when module is successfully loaded.</p>
<p dir="auto">Or you can make some <code>START</code> notification from main module then use it as trigger for execution. You can use <code>socketNotificationReceived</code> function to that purpose.</p>
<p dir="auto">Or, you can terminate spawned child process when it becomes needless.</p>
]]></description><link>https://forum.magicmirror.builders/post/51240</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51240</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 01 Feb 2019 12:30:53 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 01 Feb 2019 12:30:02 GMT]]></title><description><![CDATA[<p dir="auto">does your python script continue to run once its  started?   the design of the node helper starting the script every second depends on the script ending…</p>
<p dir="auto">or as you have found you will kill the system (doesn’t matter, pi or larger)…</p>
<p dir="auto">you could do it your suggested way… but typically, one would add code in the notification received to start it once…</p>
]]></description><link>https://forum.magicmirror.builders/post/51239</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51239</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 01 Feb 2019 12:30:02 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 01 Feb 2019 12:26:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> @Sean<br />
Hello Guys Thank you for your vallueed help!</p>
<p dir="auto">I found out that the spawn function is called every time. so in a couple of minuts the spawn function has called 100 python projects. and this is blocking the raspberry</p>
<p dir="auto">I changed is to this: and now im going to Import the project of sdetweil in the software. But it is no more blocking.<br />
thank you guys</p>
<pre><code>/// node_helper.js



const spawn = require("child_process").spawn



var NodeHelper = require("node_helper")


var process = spawn("python", ["/home/pi/src/P2000.py"])




module.exports = NodeHelper.create({



  socketNotificationReceived: function(notification, payload) {



    switch(notification) {



      case "GIVE_ME_DATA":


	

        this.job()



        break



    }



  },



  job: function() {

	
    
    process.stdout.on("data", (data)=&gt;{

      console.log(data)

      var result = String.fromCharCode.apply(null, new Uint16Array((data)))

      this.sendSocketNotification("HERE_IS_DATA", result)



    })



  }



})


</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/51238</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51238</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Fri, 01 Feb 2019 12:26:39 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 01 Feb 2019 03:04:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a> i submitted a pull request to your repo. this code runs for hours and hours…<br />
tiny changes from yours…</p>
<p dir="auto">the biggest is that  the module filename is changed to match the name of the project<br />
(but that isn’t why it hung)… I actually don’t know the cause on your side…</p>
<p dir="auto">please download my code and try it out… let me know</p>
]]></description><link>https://forum.magicmirror.builders/post/51226</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51226</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 01 Feb 2019 03:04:23 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 20:09:15 GMT]]></title><description><![CDATA[<p dir="auto">Very interested in this project… I have a python script to control my thermostat and was wondering how to get port it over…this may give me some answers :)</p>
]]></description><link>https://forum.magicmirror.builders/post/51217</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51217</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Thu, 31 Jan 2019 20:09:15 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 16:00:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
it is almost 50 char long. Im making a screen movie to let you see what I meen so it will become clear.<br />
Send it you in a couple of minutes</p>
<p dir="auto">Please see the full movie and notice the fail at 1:41<br />
<a href="https://www.youtube.com/watch?v=VBYL1j4p2aI&amp;feature=youtu.be" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=VBYL1j4p2aI&amp;feature=youtu.be</a></p>
]]></description><link>https://forum.magicmirror.builders/post/51185</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51185</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Thu, 31 Jan 2019 16:00:21 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 14:57:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a> I wrote a little hello world python script to send data. All that is working as expected so far</p>
<p dir="auto">How big is the data buffer your python script sends?</p>
]]></description><link>https://forum.magicmirror.builders/post/51182</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51182</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 31 Jan 2019 14:57:08 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 14:54:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
hello ! Thank you for your help so far.</p>
<p dir="auto">The python project is running fine on it selfs.</p>
<p dir="auto">But wenn I use it with the magic mirror the buffer of the magic mirror is filling. And freezes.</p>
<p dir="auto">the python project is made in combination with a Antenna.<br />
Setup looks like <a href="https://nl.oneguyoneblog.com/2016/08/09/p2000-ontvangen-decoderen-raspberry-pi/#comment-488" target="_blank" rel="noopener noreferrer nofollow ugc">https://nl.oneguyoneblog.com/2016/08/09/p2000-ontvangen-decoderen-raspberry-pi/#comment-488</a></p>
<p dir="auto">so you’ll need to have data from the Multimom to get different information to send to the mirror</p>
]]></description><link>https://forum.magicmirror.builders/post/51181</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51181</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Thu, 31 Jan 2019 14:54:37 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 14:45:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a> so far I don’t see the same crash error…</p>
<p dir="auto">I did have to make some minor changes…</p>
<p dir="auto">Module name to match the git repo name<br />
path to a python script<br />
and change the display handling…<br />
rule is ONLY content change location is getDom()…<br />
other routines should store data and  call updateDom(0 to signal that there ARE changes to display</p>
<p dir="auto">I’m gonna let it run for a while…</p>
]]></description><link>https://forum.magicmirror.builders/post/51179</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51179</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 31 Jan 2019 14:45:37 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 13:52:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a> i don’t see the python module</p>
<p dir="auto">you can add it to the directory and repo temporarily, then remove it later</p>
]]></description><link>https://forum.magicmirror.builders/post/51178</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51178</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 31 Jan 2019 13:52:24 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 13:44:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> fixed sorry</p>
]]></description><link>https://forum.magicmirror.builders/post/51177</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51177</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Thu, 31 Jan 2019 13:44:44 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 13:41:53 GMT]]></title><description><![CDATA[<p dir="auto">@sean<br />
Hello Sean,<br />
The problem is not the python project. But I think the buffer is filling up ore something.</p>
<p dir="auto">At this point all the massages are displayed on the mirror and after 15 min the mirror is freeze.</p>
<p dir="auto">So im looking in to it.</p>
]]></description><link>https://forum.magicmirror.builders/post/51175</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51175</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Thu, 31 Jan 2019 13:41:53 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 13:36:55 GMT]]></title><description><![CDATA[<p dir="auto">sorry, the is no PUBLIC repo there</p>
]]></description><link>https://forum.magicmirror.builders/post/51174</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51174</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 31 Jan 2019 13:36:55 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Thu, 31 Jan 2019 13:34:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
Hallo Thank you for you’re Replay</p>
<p dir="auto">I managed to upload the project on git hub ( new experience for me )<br />
I uploaded the magic mirror Module ( P2000) I made and the node helper.</p>
<p dir="auto">And I added the Python project.</p>
<p dir="auto">The python project works fine on it self. But wenn I call ( spawn ) the python. The magic mirror application stops and freezes.</p>
<p dir="auto">I think the flush/write fills the buffer and wenn it is it full the application is stoped.</p>
<p dir="auto"><a href="https://github.com/paulvanderheijden90/MMM-P2000-python-connect" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/paulvanderheijden90/MMM-P2000-python-connect</a></p>
<p dir="auto">Here is the link</p>
]]></description><link>https://forum.magicmirror.builders/post/51173</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51173</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Thu, 31 Jan 2019 13:34:14 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Wed, 30 Jan 2019 13:23:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a>  can u put your project on github and tell me where it is… I will look at it later today (us time)</p>
]]></description><link>https://forum.magicmirror.builders/post/51126</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51126</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 30 Jan 2019 13:23:37 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Wed, 30 Jan 2019 09:33:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a><br />
I have no idea about Python. I think you’d better reboot once or twice per daily to maintain RPI to be stable. You can do it with <code>cron</code> automatically.<br />
The better approach would be implementing your job as native nodeJS MagicMirror module instead external python script.</p>
]]></description><link>https://forum.magicmirror.builders/post/51121</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51121</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 30 Jan 2019 09:33:06 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Wed, 30 Jan 2019 09:28:51 GMT]]></title><description><![CDATA[<p dir="auto">@sean<br />
Hello Sean,<br />
like I posted yesterday the app is running now. And it is showing wat I need to display. So im very happy.</p>
<p dir="auto">But…<br />
After a time ( more after a couple of runs ) the magic mirror app is crashed and freezed. So noting is updating any more.</p>
<p dir="auto">My feeling is telling that the buffer were I put in the string value is filling up.</p>
<p dir="auto">wenn i run the python script without the mirror it is running fine.</p>
<p dir="auto">Please can you give me a help?</p>
]]></description><link>https://forum.magicmirror.builders/post/51120</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51120</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Wed, 30 Jan 2019 09:28:51 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Wed, 30 Jan 2019 09:29:22 GMT]]></title><description><![CDATA[<p dir="auto">Hello @Sean,<br />
Again thank you for the help. As I say after your help it was possible for me to “print” a string variable on the magic mirror module through python.<br />
But is was not able to put my P2000 alarm from the fire department on my screen. I noticed that it was a problem in the python script of the alarm.<br />
I used the stdout.write function again. like you told me. but I needed to add the flush function as wel.<br />
so now it is</p>
<pre><code>sys.stdout.write("hallo ik ben Paul")
sys.stdout.flush()

</code></pre>
<p dir="auto">And then it was working !<br />
so thank you and here the result:</p>
]]></description><link>https://forum.magicmirror.builders/post/51067</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/51067</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Wed, 30 Jan 2019 09:29:22 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 25 Jan 2019 13:33:43 GMT]]></title><description><![CDATA[<p dir="auto">@sean So sorry you’re totally right…  I was little bit confused by all the “at” conclusens.<br />
Im sorry I could had fixed that. And I did !</p>
<p dir="auto">Now it is working !!!<br />
So very nice ! im going to put this in my P2000 Raspberry python Programma. and will heave a lot of play with it.</p>
<p dir="auto">I will post/ show you the and result !</p>
]]></description><link>https://forum.magicmirror.builders/post/50802</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50802</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Fri, 25 Jan 2019 13:33:43 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 25 Jan 2019 13:24:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a> said in <a href="/post/50799">Python in to the magic mirror.</a>:<br />
Your log is telling you what is wrong.<br />
See the 76 line of <code>node_helper.js</code>.  There could be missing <code>)</code> after argument list.</p>
]]></description><link>https://forum.magicmirror.builders/post/50800</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50800</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 25 Jan 2019 13:24:33 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 25 Jan 2019 13:19:51 GMT]]></title><description><![CDATA[<p dir="auto">@sean said in <a href="/post/50798">Python in to the magic mirror.</a>:</p>
<blockquote>
<p dir="auto">Crashing? show me th</p>
</blockquote>
<pre><code>App threw an error during load
/home/pi/MagicMirror/modules/MMM-P2000/node_helper.js:76
}.call(this, exports, require, module, __filename, __dirname); });
                                                            ^

SyntaxError: missing ) after argument list
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:606:28)
    at Object.Module._extensions..js (module.js:653:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at loadModule (/home/pi/MagicMirror/js/app.js:127:17)
Whoops! There was an uncaught exception...
/home/pi/MagicMirror/modules/MMM-P2000/node_helper.js:76
}.call(this, exports, require, module, __filename, __dirname); });
                                                            ^

SyntaxError: missing ) after argument list
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:606:28)
    at Object.Module._extensions..js (module.js:653:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at loadModule (/home/pi/MagicMirror/js/app.js:127:17)
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
Launching application.


</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/50799</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50799</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Fri, 25 Jan 2019 13:19:51 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 25 Jan 2019 13:18:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/paulvanderheijden90" aria-label="Profile: paulvanderheijden90">@<bdi>paulvanderheijden90</bdi></a><br />
Crashing? show me the error log.</p>
]]></description><link>https://forum.magicmirror.builders/post/50798</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50798</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 25 Jan 2019 13:18:39 GMT</pubDate></item><item><title><![CDATA[Reply to Python in to the magic mirror. on Fri, 25 Jan 2019 13:15:42 GMT]]></title><description><![CDATA[<p dir="auto">@Sean Hello Sean,<br />
I was thinking somting was wrong because I see the buffer printing in the terminal showing:</p>
<p dir="auto">Buffer 48 61 6c 6c 6f 20 49 6b 20 62 65 6e 20 50 61 75 6c&gt;</p>
<p dir="auto">i was trying to figure out the text line that it was representing but it was not showing something.</p>
<p dir="auto">So im happy you came up with the solution for the buffer.</p>
<p dir="auto">Unfortunly wenn at the var result code the magic mirror is crashing again and im not able to debug.<br />
Can you please heave a look at it</p>
<pre><code>/// node_helper.js

const spawn = require("child_process").spawn

var NodeHelper = require("node_helper")



module.exports = NodeHelper.create({

  socketNotificationReceived: function(notification, payload) {

    switch(notification) {

      case "GIVE_ME_DATA":

        this.job()

        break

    }

  },

  job: function() {

    var process = spawn("python", ["/home/pi/src/test.py"])

    process.stdout.on("data", (data)=&gt;{
	
      console.log(data)

      var result = String.fromCharCode.apply(null, new Uint16Array((data))

      this.sendSocketNotification("HERE_IS_DATA", result)

    })

  }
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/50796</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/50796</guid><dc:creator><![CDATA[paulvanderheijden90]]></dc:creator><pubDate>Fri, 25 Jan 2019 13:15:42 GMT</pubDate></item></channel></rss>