<?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-ArduPort]]></title><description><![CDATA[<p dir="auto">I’m having trouble setting up MMM-ArduPort. So if anyone can help…</p>
<p dir="auto">I have to point out that I’m using SAME serial port on arduino for communication with raspberry and RS485 network. For transmiting and receiveing data on RS485 I use fantastic EasyTransfer arduino library.</p>
<p dir="auto">Posible problem:<br />
When arduino receives data from RS485, it gets to TX pin on USB side and never gets to raspberry. Wich is good.<br />
When arduino is sending data, to transmit over RS485, it first have to activate transmision mode on RS485 module.<br />
In this situation, data is being sent from arduino TX to RS485 RX. But it is allso sent to USB RX, and to raspberry. Wich is bad. I gues.</p>
<p dir="auto">Here are symptoms:<br />
MM starts and ArduPort is waiting for arduino.<br />
I connect arduino, ArduPort receives “[status:setup:starting]” and “[status:setup:started]”<br />
ArduPort shows my sensors list and then it removes them and returns to “Waiting for connection…”</p>
<p dir="auto">My arduino code sends “[status:setup:starting]”, waits for 3 seconds and sends “[status:setup:started]” witch is normaly received by Arduport.<br />
But! Arduino then sends request for sensors status to RS485 wich is allso transmited to raspberry. I think that in this moment it switches to “Waiting for connection”.</p>
<p dir="auto">But, again, I have modified MMM-ArduPort.js so it doesen’t disconnect (commented ), and I have aded “this.isArduinoStarting = false;” and “this.isArduinoStarted = true;” right after "case ‘sensor’: "<br />
I modified this so arduino always stays connected, and data should be displayed whenever and whatever sensor data is received. And it actualy does switch to listing my sensors, but, again, sensor data isn’t shown.</p>
<p dir="auto">I taught that EasyTransfer requests that get to PI are chrashing communication, but after my mod, I can see that data is passed normaly and is not affected by EasyTransfer part.<br />
I gues, that part is discarded at this part in <a href="http://arduino.py" target="_blank" rel="noopener noreferrer nofollow ugc">arduino.py</a></p>
<pre><code>match = re.match(rgxData, data)
if match:
            data = data[1:-1]
            case, name, value = data.split(":")
            to_node(case.lower(), {"name": name, "data": value})
</code></pre>
<p dir="auto">Here is photo of data being received on screen /dev/ttyUSB0  (yes… photo. I was in a hurry…)<br />
<img src="/assets/uploads/files/1578411027640-img_20200107_120847384-small.jpg" alt="0_1578411025419_IMG_20200107_120847384 (Small).jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Pictograms between [sensor:name:data] are EasyTransfer requests.</p>
<p dir="auto">I’ve even tryed <a href="https://github.com/Dentrax/MMM-ArduPort/issues/3#issuecomment-479251211" target="_blank" rel="noopener noreferrer nofollow ugc">this</a> modification. It didn’t help.</p>
]]></description><link>https://forum.magicmirror.builders/topic/11958/mmm-arduport</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 10:59:42 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/11958.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jan 2020 15:47:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-ArduPort on Sat, 26 Sep 2020 18:50:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crime" aria-label="Profile: Crime">@<bdi>Crime</bdi></a> could you help this guy</p>
<p dir="auto"><a href="https://forum.magicmirror.builders/topic/13681/is-it-possible-to-ad-an-arduino/53">https://forum.magicmirror.builders/topic/13681/is-it-possible-to-ad-an-arduino/53</a></p>
<p dir="auto">his sketch and module data don’t match.</p>
]]></description><link>https://forum.magicmirror.builders/post/82399</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/82399</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 26 Sep 2020 18:50:28 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sat, 26 Sep 2020 18:46:38 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> thank you so much! it really helped! now my sensors are working as they should!<br />
and how I did not notice this topic before</p>
]]></description><link>https://forum.magicmirror.builders/post/82398</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/82398</guid><dc:creator><![CDATA[Crime]]></dc:creator><pubDate>Sat, 26 Sep 2020 18:46:38 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sat, 26 Sep 2020 17:59:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crime" aria-label="Profile: Crime">@<bdi>Crime</bdi></a> sorry, other topic<br />
see this issue on the module<br />
<a href="https://github.com/Dentrax/MMM-ArduPort/issues/3" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Dentrax/MMM-ArduPort/issues/3</a></p>
]]></description><link>https://forum.magicmirror.builders/post/82397</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/82397</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 26 Sep 2020 17:59:08 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sat, 26 Sep 2020 17:36:05 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> please, more details. I really need help</p>
]]></description><link>https://forum.magicmirror.builders/post/82396</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/82396</guid><dc:creator><![CDATA[Crime]]></dc:creator><pubDate>Sat, 26 Sep 2020 17:36:05 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sat, 26 Sep 2020 15:48:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crime" aria-label="Profile: Crime">@<bdi>Crime</bdi></a> as I posted the other day, someone posted a fix in the issue for the module</p>
<p dir="auto">u have to change some code</p>
]]></description><link>https://forum.magicmirror.builders/post/82393</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/82393</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 26 Sep 2020 15:48:51 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sat, 26 Sep 2020 15:27:57 GMT]]></title><description><![CDATA[<p dir="auto">has anyone solved this problem?<br />
I don’t understand anything at all in JS?<br />
error text from console:</p>
<pre><code>Uncaught (in promise) TypeError: "({0}) ".format is MMM-ArduPort.js:143 
not a function
    at Class.formatValue (MMM-ArduPort.js:143)
    at Class.getDom (MMM-ArduPort.js:250)
    at main.js:111
    at new Promise (&lt;anonymous&gt;)
    at updateDom (main.js:110)
    at Object.updateDom (main.js:542)
    at Class.updateDom (module.js:357)
    at Class.socketNotificationReceived (MMM-ArduPort.js:118)
    at module.js:243
    at r.&lt;anonymous&gt; (socketclient.js:39)
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1601134063308-1.jpg" alt="1.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">help someone, I’ve been trying to run it for a long time !!!</p>
]]></description><link>https://forum.magicmirror.builders/post/82392</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/82392</guid><dc:creator><![CDATA[Crime]]></dc:creator><pubDate>Sat, 26 Sep 2020 15:27:57 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sun, 19 Jan 2020 16:28:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kereknjek" aria-label="Profile: Kereknjek">@<bdi>Kereknjek</bdi></a> that looks good…</p>
<p dir="auto">looks at the MMM-Arduino module, it shows debugging info on the developers window</p>
<p dir="auto">ctrl-shift-i on the keyboard, select the tab labeled ‘console’</p>
<p dir="auto">you can filter out other modules messages by putting part of the module name in the filter field</p>
<p dir="auto">ardu</p>
<p dir="auto">also, have to set developerMode:true in the module config.js section</p>
<pre><code>		    if (self.config.developerMode) {
			      var date = new Date();
			      var time = date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
			      message = self.name + ": (" + self.data.index + ")(" + time + ") " + message;
		    } else { message = self.name + ": " + message; }
		    switch (type) {
			  case "error": Log.error(this.logPrefix + message); break;
			  case "warn": Log.warn(this.logPrefix + message); break;
			  case "info": Log.info(this.logPrefix + message); break;
			  case "dev": if (self.config.developerMode) { Log.log(this.logPrefix + message); } break;
			  default: Log.log(this.logPrefix + message);
		    }
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/68388</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68388</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 19 Jan 2020 16:28:03 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sun, 19 Jan 2020 16:20:35 GMT]]></title><description><![CDATA[<p dir="auto">I tried that.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kereknjek" aria-label="Profile: Kereknjek">@<bdi>Kereknjek</bdi></a> said in <a href="/post/67728">MMM-ArduPort</a>:</p>
<blockquote>
<p dir="auto">Now, when running</p>
<pre><code>python arduport.py
</code></pre>
<p dir="auto">I get this:</p>
<pre><code>{"debug": "SerialPort shell started..."}
{"debug": "Waiting Ardunio to connect on port..."}
{"status": {"data": "connected", "name": "connect"}}
{"status": {"data": "starting", "name": "setup"}}
{"status": {"data": "started", "name": "setup"}}
{"sensor": {"data": "0.02", "name": "Baterija"}}
{"sensor": {"data": "-0.00", "name": "Struja"}}
{"sensor": {"data": "0.00", "name": "Solarno"}}
{"sensor": {"data": "-0.12", "name": "Panel"}}
{"sensor": {"data": "-0.00", "name": "Inverter"}}
{"sensor": {"data": "0.04", "name": "Baterija"}}
{"sensor": {"data": "-0.00", "name": "Struja"}}
{"sensor": {"data": "0.00", "name": "Solarno"}}
</code></pre>
</blockquote>
]]></description><link>https://forum.magicmirror.builders/post/68386</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68386</guid><dc:creator><![CDATA[Kereknjek]]></dc:creator><pubDate>Sun, 19 Jan 2020 16:20:35 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sun, 19 Jan 2020 13:09:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kereknjek" aria-label="Profile: Kereknjek">@<bdi>Kereknjek</bdi></a> said in <a href="/post/67776">MMM-ArduPort</a>:</p>
<blockquote>
<p dir="auto">How do I do that?</p>
</blockquote>
<p dir="auto">on the pi, ctrl-alt-t, will open a terminal window, you can also ssh into the pi</p>
<p dir="auto">then execute the command that the module would use</p>
<pre><code>python .......  whatever
</code></pre>
<p dir="auto">I see u dropped this path, but for other…</p>
]]></description><link>https://forum.magicmirror.builders/post/68370</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68370</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 19 Jan 2020 13:09:25 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Sun, 19 Jan 2020 11:52:26 GMT]]></title><description><![CDATA[<p dir="auto">It seems I’m having isues with Python.</p>
<p dir="auto">I have reinstaled Python and Python3, npm, python-shell and node js. Nothing worked. It was sending errors even with blank arduino, arduino sending only “starting” and “started” commands…<br />
So, due to my lack of knowlege of Python or anything else surrounding ArduPort, I’m abandoning it…</p>
<p dir="auto">To bad. It is very elagant module.</p>
]]></description><link>https://forum.magicmirror.builders/post/68366</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/68366</guid><dc:creator><![CDATA[Kereknjek]]></dc:creator><pubDate>Sun, 19 Jan 2020 11:52:26 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Thu, 09 Jan 2020 21:55:11 GMT]]></title><description><![CDATA[<p dir="auto">How do I do that?</p>
]]></description><link>https://forum.magicmirror.builders/post/67776</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/67776</guid><dc:creator><![CDATA[Kereknjek]]></dc:creator><pubDate>Thu, 09 Jan 2020 21:55:11 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Thu, 09 Jan 2020 14:08:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kereknjek" aria-label="Profile: Kereknjek">@<bdi>Kereknjek</bdi></a> said in <a href="/post/67728">MMM-ArduPort</a>:</p>
<blockquote>
<p dir="auto">MMM-ArduPort.js:286 [MMM-ArduPort]:: MMM-ArduPort: error<br />
MMM-ArduPort.js:286 [MMM-ArduPort]:: MMM-ArduPort: “pyshell-throw”<br />
MMM-ArduPort.js:123 [socketNotificationReceived::error]:</p>
</blockquote>
<p dir="auto">yes, according to the code, this notifies the module that the python script running in the background ended, unexpectedly.</p>
<p dir="auto">I would try running it from the commandshell in the foreground without the MM and see what is going on</p>
]]></description><link>https://forum.magicmirror.builders/post/67740</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/67740</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 09 Jan 2020 14:08:31 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-ArduPort on Thu, 09 Jan 2020 10:44:19 GMT]]></title><description><![CDATA[<p dir="auto">I have reinstaled all original files for arduport and started debuging… Again.:smiling_face_with_open_mouth_cold_sweat:</p>
<p dir="auto">I didn’t mention it before, but I’m running MM on Raspbian lite.<br />
I’ve found  I had problems with python. Force reinstalling modules solved it.</p>
<p dir="auto">I have allso found some errors in <a href="http://arduino.py" target="_blank" rel="noopener noreferrer nofollow ugc">arduino.py</a>,<br />
Had to change:</p>
<pre><code>rgxData = re.compile("[\[][a-zA-Z0-9-].*[\:][a-zA-Z0-9-].*[\:][a-zA-Z0-9-.].*[\]]")
</code></pre>
<p dir="auto">to</p>
<pre><code>rgxData = re.compile("[\[][a-zA-Z0-9\-].*[\:][a-zA-Z0-9\-].*[\:][a-zA-Z0-9\-\.].*[\]]")
</code></pre>
<p dir="auto">and</p>
<pre><code>incoming = self.arduino.readline(self.arduino.in_waiting).decode('ascii').replace('\r', '').replace('\n', '')
</code></pre>
<p dir="auto">to</p>
<pre><code>incoming = self.arduino.readline(self.arduino.in_waiting).decode('ascii', errors="ignore").replace('\r', '').replace('\n', '')
</code></pre>
<p dir="auto">Now, when running</p>
<pre><code>python arduport.py
</code></pre>
<p dir="auto">I get this:</p>
<pre><code>{"debug": "SerialPort shell started..."}
{"debug": "Waiting Ardunio to connect on port..."}
{"status": {"data": "connected", "name": "connect"}}
{"status": {"data": "starting", "name": "setup"}}
{"status": {"data": "started", "name": "setup"}}
{"sensor": {"data": "0.02", "name": "Baterija"}}
{"sensor": {"data": "-0.00", "name": "Struja"}}
{"sensor": {"data": "0.00", "name": "Solarno"}}
{"sensor": {"data": "-0.12", "name": "Panel"}}
{"sensor": {"data": "-0.00", "name": "Inverter"}}
{"sensor": {"data": "0.04", "name": "Baterija"}}
{"sensor": {"data": "-0.00", "name": "Struja"}}
{"sensor": {"data": "0.00", "name": "Solarno"}}
</code></pre>
<p dir="auto">I’m guesing, this should be working now. But ArduPort is still stuck at “Waiting for connection…”</p>
<p dir="auto">Here is C/P from my config.js</p>
<pre><code>              {
              module: "MMM-ArduPort",
              position: "top_right",
              header: "Solarni sustav",
              config:{
                      portname: "/dev/ttyUSB0",
                      updateInterval: 1,
                      animationSpeed: 1000,
                      displayIcons: false,
                      showDescriptopn: true,
                      hideLoading: false,
                      hideWaiting: false,
                      useColors: false,
                      sensors: [
                              {
                              name: "Solarno",
                              description: "Solarni sustav",
                              maxValue: 5,
                              maxFormat: "({0}) ",
                              highestValue: 4,
                              highestFormat: "({0}) Greska - pregrijavanje",
                              highValue: 3,
                              highFormat: "({0}) Greska - preopterecenje",
                              lowValue: 2,
                              lowFormat: "({0}) Backup mod",
                              lowestValue: 1,
                              lowestFormat: "({0}) Ukljuceno",
                              minValue: 0,
                              minFormat: "({0}) Iskljuceno"
                              },
                              {
                              name: "Baterija",
                              description: "Stanje baterije",
                              maxValue: 26,
                              maxFormat: "({0} V) Balansiranje",
                              highestValue: 25.5,
                              highestFormat: "({0} V) 100%",
                              highValue: 24.87,
                              highFormat: "({0} V) 75%",
                              lowValue: 24.2,
                              lowFormat: "({0} V) 50%",
                              lowestValue: 11.74,
                              lowestFormat: "({0} V) 25%",
                              minValue: 23.2,
                              minFormat: "({0} V) 0%"
                              },
                              {
                              name: "Struja",
                              description: "Punjenje ili praznjenje",
                              maxValue: 20,
                              maxFormat: "({0} A) Punjenje",
                              highestValue: 10,
                              highestFormat: "({0} A) Punjenje",
                              highValue: 0,
                              highFormat: "({0} A) ",
                              lowValue: -20,
                              lowFormat: "({0} A) Praznjenje",
                              lowestValue: -40,
                              lowestFormat: "({0} A) Brzo preznjenje",
                              minValue: -60,
                              minFormat: "({0} A) PREOPTERECENJE"
                              },
                              {
                              name: "Panel",
                              description: "Snaga solarnih panela",
                              maxValue: 500,
                              maxFormat: "({0} W)",
                              highestValue: 400,
                              highestFormat: "({0} W)",
                              highValue: 300,
                              highFormat: "({0} W)",
                              lowValue: 200,
                              lowFormat: "({0} W)",
                              lowestValue: 100,
                              lowestFormat: "({0} W)",
                              minValue: 0,
                              minFormat: "({0} W)"
                              },
                              {
                              name: "Inverter",
                              description: "Potrosnja invertera",
                              maxValue: 1000,
                              maxFormat: "({0} W)",
                              highestValue: 800,
                              highestFormat: "({0} W)",
                              highValue: 600,
                              highFormat: "({0} W)",
                              lowValue: 400,
                              lowFormat: "({0} W)",
                              lowestValue: 200,
                              lowestFormat: "({0} W)",
                              minValue: 0,
                              minFormat: "({0} W)"
                              }
                              ]
                      }
              },
</code></pre>
<p dir="auto">EDIT:</p>
<p dir="auto">Here is C/P from chrome console:</p>
<pre><code>Starting module: MMM-ArduPort
MMM-ArduPort.js:286 [MMM-ArduPort]:: MMM-ArduPort: status
MMM-ArduPort.js:286 [MMM-ArduPort]:: MMM-ArduPort: {
    "action": "status",
    "name": "initialized"
}
MMM-ArduPort.js:286 [MMM-ArduPort]:: MMM-ArduPort: error
MMM-ArduPort.js:286 [MMM-ArduPort]:: MMM-ArduPort: "pyshell-throw"
MMM-ArduPort.js:123 [socketNotificationReceived::error]:
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/67728</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/67728</guid><dc:creator><![CDATA[Kereknjek]]></dc:creator><pubDate>Thu, 09 Jan 2020 10:44:19 GMT</pubDate></item></channel></rss>