<?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[Module to display a local list?]]></title><description><![CDATA[<p dir="auto">Is there a module to display a list saved locally (or on dropbox)? A module to pull a .txt file or .json?</p>
<p dir="auto">I am using this for a shopping list using <a href="http://any.do" target="_blank" rel="noopener noreferrer nofollow ugc">any.do</a>, I was using todoist but wanted more than one list displayed (and synced with amazon alexa).</p>
<p dir="auto">I tried mmm-backlog from <a href="https://forum.magicmirror.builders/topic/1949/display-values-from-a-json-file-hosted-online/2">https://forum.magicmirror.builders/topic/1949/display-values-from-a-json-file-hosted-online/2</a> but could not get it to work properly for my needs.</p>
]]></description><link>https://forum.magicmirror.builders/topic/5628/module-to-display-a-local-list</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 17:26:44 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/5628.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Dec 2017 20:02:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Module to display a local list? on Wed, 06 Dec 2017 19:15:48 GMT]]></title><description><![CDATA[<p dir="auto">Darn it, I was changing the update time in the module but not the config. It works now, thanks for all your help, this is a fantastic module!!!</p>
]]></description><link>https://forum.magicmirror.builders/post/32010</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/32010</guid><dc:creator><![CDATA[jasondreher]]></dc:creator><pubDate>Wed, 06 Dec 2017 19:15:48 GMT</pubDate></item><item><title><![CDATA[Reply to Module to display a local list? on Wed, 06 Dec 2017 19:10:28 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><br />
Weird. Is Your local file updated periodically? Can you show your config for this module?<br />
I’ve tested it now, and it works definitely.</p>
]]></description><link>https://forum.magicmirror.builders/post/32009</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/32009</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 06 Dec 2017 19:10:28 GMT</pubDate></item><item><title><![CDATA[Reply to Module to display a local list? on Wed, 06 Dec 2017 18:50:15 GMT]]></title><description><![CDATA[<p dir="auto">@Sean said in <a href="/post/32007">Module to display a local list?</a>:</p>
<blockquote>
<p dir="auto">xmlHttp.open(“GET”, url + “?” + Date.now(), true)</p>
</blockquote>
<p dir="auto">I did this but no change, it still will not update…</p>
]]></description><link>https://forum.magicmirror.builders/post/32008</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/32008</guid><dc:creator><![CDATA[jasondreher]]></dc:creator><pubDate>Wed, 06 Dec 2017 18:50:15 GMT</pubDate></item><item><title><![CDATA[Reply to Module to display a local list? on Wed, 06 Dec 2017 18:23:09 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><br />
You are right. I did some mistakes about refreshing. (I didn’t test it. sorry)<br />
I think it was caused by caching.<br />
You can made hot-fix about that.</p>
<p dir="auto">In line 58 of MMM-HTMLBox.js</p>
<pre><code>xmlHttp.open("GET", url, true)
</code></pre>
<p dir="auto">modify it like this;</p>
<pre><code>xmlHttp.open("GET", url + "?" + Date.now(), true)
</code></pre>
<p dir="auto">I think it will work. sorry.</p>
]]></description><link>https://forum.magicmirror.builders/post/32007</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/32007</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 06 Dec 2017 18:23:09 GMT</pubDate></item><item><title><![CDATA[Reply to Module to display a local list? on Wed, 06 Dec 2017 18:10:23 GMT]]></title><description><![CDATA[<p dir="auto">How do I get it to refresh? I added it to “refresh_interval_sec: 60,” but it does not seem to refresh. If I “Ctrl+R” i refreshes and shows changes.</p>
<p dir="auto">Other than that it works great!!!<br />
This is my test pi, the list from HTMLBox is in the upper right.<br />
<img src="/assets/uploads/files/1512583761290-2017-12-06-114646_1680x1050_scrot.png" alt="0_1512583760228_2017-12-06-114646_1680x1050_scrot.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/post/32006</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/32006</guid><dc:creator><![CDATA[jasondreher]]></dc:creator><pubDate>Wed, 06 Dec 2017 18:10:23 GMT</pubDate></item><item><title><![CDATA[Reply to Module to display a local list? on Wed, 06 Dec 2017 11:54:55 GMT]]></title><description><![CDATA[<p dir="auto">I think you can modify <code>MMM-HTMLBox</code> for your purpose. It can read <strong>local html file</strong> and show it on MM.<br />
[card:eouia/MMM-HTMLBox]</p>
]]></description><link>https://forum.magicmirror.builders/post/32002</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/32002</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 06 Dec 2017 11:54:55 GMT</pubDate></item><item><title><![CDATA[Reply to Module to display a local list? on Tue, 05 Dec 2017 17:59:50 GMT]]></title><description><![CDATA[<p dir="auto">No one?<br />
I got mmm-backlog working but it breaks other modules and does not sow up in my remote module so I assume it is missing something.</p>
<p dir="auto">And I tried MMM-HTTPRequestDisplay but cant get it to pull from a local file.</p>
<p dir="auto">Here is my mmm-backlog module (renamed MMM-samslist)<br />
MMM-samslist.js</p>
<pre><code>
Module.register('MMM-samslist',{

	defaults: {
		title: 'List',
    		fileUrl: '',
		units: config.units,
		animationSpeed: 1000,
		updateInterval: 360000, //update every hour
		refreshInterval: 360000 , //refresh every minute		
		timeFormat: config.timeFormat,
		lang: config.language,
		
		initialLoadDelay: 0, // 0 seconds delay
		retryDelay: 2500,
		
		//fileUrl: "http://192.168.43.159:8080/modules/MMM-shoppinglist/list.json"
	},

	// Define required scripts.
	getScripts: function() {
		return ["moment.js"];
	},

	// Define requird styles
	getStyles: function() {
		return ["font-awesome.css"];
	},

	start: function() {
		Log.info('Starting module: ' + this.name);

		this.loaded = false;
		this.sendSocketNotification('CONFIG', this.config);
	},

	getDom: function() {
		
		//var wrapper = document.createElement("ticker");
		//Added
		var wrapper = document.createElement("ticker");
    		wrapper.className = 'dimmed small';

    		var data = this.result;
    		var statElement =  document.createElement("header");
    		var title = this.config.title;
    		statElement.innerHTML = title;
		wrapper.appendChild(statElement);
		//Added


		if (!this.loaded) {
			wrapper.innerHTML = this.translate('LOADING-Jason');
			wrapper.className = "dimmed light small";
			return wrapper;
		}

		if (!this.data) {
			wrapper.innerHTML = "No data";
			wrapper.className = "dimmed light small";
			return wrapper;
		}

		var t = this.data.list;
		var content = document.createElement("div");
		content.innerHTML = "";	
		
		for (var i in t.datasequences) {
			content.innerHTML += t.datasequences[i].title + "&lt;br /&gt;";
			//content.innerHTML += t.title  + " - " + t.datasequences[i].title + "&lt;br /&gt;";
			//for (var j in t.datasequences[i].datapoints) {
			//	content.innerHTML += t.datasequences[i].datapoints[j].title + ": " + t.datasequences[i].datapoints[j].value + "&lt;br /&gt;";
			//}
		}
		
		wrapper.appendChild(content);

		return wrapper;
	},

 	socketNotificationReceived: function(notification, payload) {
    		if (notification === "STARTED") {
				this.updateDom();
			}
			else if (notification === "DATA") {
				this.loaded = true;
				this.processData(JSON.parse(payload));
				this.updateDom();
    		}
	},

	/* processData(data)
	 * Uses the received data to set the various values.
	 *
	 * argument data object - tide information received form worldtides.info
	 */
	processData: function(data) {

		if (!data) {
			// Did not receive usable new data.
			// Maybe this needs a better check?
			return;
		}

		this.data = data;

		this.loaded = true;
		this.updateDom(this.config.animationSpeed);
	}
});
</code></pre>
<p dir="auto">and node_helper.js</p>
<pre><code>'use strict';


const NodeHelper = require('node_helper');
var request = require('request');

module.exports = NodeHelper.create({

	start: function() {
		this.started = false;
		this.config = null;
	},

	getData: function() {
		var self = this;
		
		var myUrl = this.config.fileUrl;
				
		request({
			url: myUrl,
			method: 'GET',
		}, function (error, response, body) {
			if (!error &amp;&amp; response.statusCode == 200) {
				self.sendSocketNotification("DATA", body);
			}
		});

		setTimeout(function() { self.getData(); }, this.config.refreshInterval);
	},

	socketNotificationReceived: function(notification, payload) {
		var self = this;
		if (notification === 'CONFIG' &amp;&amp; self.started == false) {
			self.config = payload;
			self.sendSocketNotification("STARTED", true);
			self.getData();
			self.started = true;
		}
	}
});
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/31989</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/31989</guid><dc:creator><![CDATA[jasondreher]]></dc:creator><pubDate>Tue, 05 Dec 2017 17:59:50 GMT</pubDate></item></channel></rss>