<?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[MMM-NBA &#x2F; NBA Scores Module]]></title><description><![CDATA[<p dir="auto">Per @strawberry-3-141’s suggestion I’m relocating this discussion from the NFL Module thread.  I’ve managed to parse data from</p>
<p dir="auto"><a href="http://www.espn.com/nba/bottomline/scores" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.espn.com/nba/bottomline/scores</a></p>
<p dir="auto">using a python program that stores team names, scores, winners and game times.  I can produce this result on the command line:</p>
<p dir="auto"><img src="/uploads/files/1484590473340-parser.jpg" alt="0_1484590474543_parser.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">My current goal is to learn how to execute @strawberry-3-141’s suggestion:</p>
<p dir="auto">“Help: you can run the python script in from inside the node_helper and read the output, then send the data to your module with a socket notification”</p>
<p dir="auto">I have a lot to learn.  I’ve figured out a lot about socket notifications and sending notifications and data between modules.  I think I can probably handle that part.  But I have zero confidence in the process of calling the script and reading output from within the node_helper.  I suspect running the script from node_helper will look similar to this suggestion:</p>
<p dir="auto"><a href="https://github.com/paviro/MMM-Facial-Recognition/blob/master/node_helper.js#L11" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/paviro/MMM-Facial-Recognition/blob/master/node_helper.js#L11</a></p>
<p dir="auto">But the variables are a mystery to me and I don’t know how to read the result.  If anybody can link to a tutorial that will help me understand this process I will be very grateful!  I would much rather learn to do this for myself than have somebody do the work and write the code for me.  Thank you!</p>
]]></description><link>https://forum.magicmirror.builders/topic/1431/mmm-nba-nba-scores-module</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 21:24:05 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/1431.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Jan 2017 18:25:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Wed, 25 Jan 2017 20:33:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/in_a_days" aria-label="Profile: in_a_days">@<bdi>in_a_days</bdi></a> Keep up the good work! I’m in the same boat stumbling through code as I go haha</p>
]]></description><link>https://forum.magicmirror.builders/post/12487</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/12487</guid><dc:creator><![CDATA[Burner911]]></dc:creator><pubDate>Wed, 25 Jan 2017 20:33:51 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Wed, 25 Jan 2017 09:41:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/in_a_days" aria-label="Profile: in_a_days">@<bdi>in_a_days</bdi></a> at least there is a module for the standings <a href="https://forum.magicmirror.builders/topic/1479/mmm-nbaranking-nba-standings">https://forum.magicmirror.builders/topic/1479/mmm-nbaranking-nba-standings</a></p>
]]></description><link>https://forum.magicmirror.builders/post/12408</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/12408</guid><dc:creator><![CDATA[strawberry 3.141]]></dc:creator><pubDate>Wed, 25 Jan 2017 09:41:40 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Wed, 25 Jan 2017 00:58:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/burner911" aria-label="Profile: Burner911">@<bdi>Burner911</bdi></a></p>
<p dir="auto">Still a work in progress!  I’ve managed to pull score data from the espn site, but exchanging the data between the python script and node helper is really challenging me.  I was trying to just reverse engineer one of the other scoring modules, but both my parsing method and lack of javascript experience have made this really really difficult.  I’ve been studying several tutorials and working on building simple modules from scratch just to make sure I understand all the socketNotification exchanges.</p>
<p dir="auto">Now that I’m getting a feel for it, I’ll probably re-write the parser in javascript.  It’s a slow process, but I plan to stay at it until it’s done or someone else makes it first. :)</p>
]]></description><link>https://forum.magicmirror.builders/post/12394</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/12394</guid><dc:creator><![CDATA[in_a_days]]></dc:creator><pubDate>Wed, 25 Jan 2017 00:58:17 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Tue, 24 Jan 2017 23:57:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/in_a_days" aria-label="Profile: in_a_days">@<bdi>in_a_days</bdi></a> How are things going? Any luck so far?</p>
]]></description><link>https://forum.magicmirror.builders/post/12392</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/12392</guid><dc:creator><![CDATA[Burner911]]></dc:creator><pubDate>Tue, 24 Jan 2017 23:57:37 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Tue, 17 Jan 2017 15:47:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/burner911" aria-label="Profile: Burner911">@<bdi>Burner911</bdi></a></p>
<p dir="auto">Still a long way to go, but I’ll keep working at this till I make something work! :)</p>
<p dir="auto">The parser is available here if anybody wants to play around with displaying the data.</p>
<p dir="auto"><a href="https://github.com/in-a-days/MMM-NBA/blob/master/MMM-NBA.py" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/in-a-days/MMM-NBA/blob/master/MMM-NBA.py</a></p>
<p dir="auto">It’s the first original code I’ve written in a very long time so forgive me if it’s not pretty. ;)</p>
]]></description><link>https://forum.magicmirror.builders/post/11419</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/11419</guid><dc:creator><![CDATA[in_a_days]]></dc:creator><pubDate>Tue, 17 Jan 2017 15:47:36 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Tue, 17 Jan 2017 07:28:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/in_a_days" aria-label="Profile: in_a_days">@<bdi>in_a_days</bdi></a> Thank you so much for working on this! I’ve been hoping for an NBA module for a while now</p>
]]></description><link>https://forum.magicmirror.builders/post/11374</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/11374</guid><dc:creator><![CDATA[Burner911]]></dc:creator><pubDate>Tue, 17 Jan 2017 07:28:13 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Mon, 16 Jan 2017 19:25:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/in_a_days" aria-label="Profile: in_a_days">@<bdi>in_a_days</bdi></a></p>
<p dir="auto">yes you will need both imports, as they are used in this function</p>
<p dir="auto">this should pass the full array</p>
]]></description><link>https://forum.magicmirror.builders/post/11294</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/11294</guid><dc:creator><![CDATA[strawberry 3.141]]></dc:creator><pubDate>Mon, 16 Jan 2017 19:25:56 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Mon, 16 Jan 2017 19:24:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/strawberry-3.141" aria-label="Profile: strawberry-3.141">@<bdi>strawberry-3.141</bdi></a></p>
<p dir="auto">These are very helpful.  I assume I will also need to</p>
<pre><code>import sys
import json
</code></pre>
<p dir="auto">at the top of my file?</p>
<p dir="auto">Right now I’m storing data in a few arrays in my .py file.  For example, I have an array where</p>
<pre><code>homeTeam[gameNum]
</code></pre>
<p dir="auto">will display the string of the home team name.</p>
<p dir="auto">Will this pass the full array?</p>
<pre><code>to_node("home teams", homeTeam)
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/11293</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/11293</guid><dc:creator><![CDATA[in_a_days]]></dc:creator><pubDate>Mon, 16 Jan 2017 19:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-NBA &#x2F; NBA Scores Module on Mon, 16 Jan 2017 18:35:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/in_a_days" aria-label="Profile: in_a_days">@<bdi>in_a_days</bdi></a></p>
<p dir="auto">in the python script you will need this function to return a json object to your node helper <a href="https://github.com/paviro/MMM-Facial-Recognition/blob/master/facerecognition/facerecognition.py#L25" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/paviro/MMM-Facial-Recognition/blob/master/facerecognition/facerecognition.py#L25</a></p>
<p dir="auto">in the node_helper you would need this function <a href="https://github.com/paviro/MMM-Facial-Recognition/blob/master/node_helper.js#L9" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/paviro/MMM-Facial-Recognition/blob/master/node_helper.js#L9</a></p>
<p dir="auto">what variables are unclear to you, name them and we can try to explain them</p>
]]></description><link>https://forum.magicmirror.builders/post/11287</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/11287</guid><dc:creator><![CDATA[strawberry 3.141]]></dc:creator><pubDate>Mon, 16 Jan 2017 18:35:04 GMT</pubDate></item></channel></rss>