There is no automatic update of any of these three sources.
You receive notifications only, if there is an update for magic mirror or a module. To get rid of this you can simply remove the update notification module from your config file
Read the statement by Michael Teeuw here.
Best posts made by yawns
-
RE: Disable auto-updates?
-
RE: Help needed simple API based module
great. Now tidy up your code ;) and present your module in modules showcase
-
RE: How do I delete my MagicMirror Forum Account?
You can’t. Only @administrators (not Moderators) can delete your account.
Just out of curiosity: why do you want to leave? :) -
RE: Display values from a JSON file hosted online
Quick and dirty, but should get you going :)
You have to use the node_helper, because using XMLHttpRequest would result in an “origin error”.
MMM-backlog.js
/* global Module */ /* Magic Mirror * Module: MMM-backlog * * By Stefan Krause http://yawns.de * MIT Licensed. */ Module.register('MMM-backlog',{ defaults: { units: config.units, animationSpeed: 1000, updateInterval: 1000 * 3600, //update every hour refreshInterval: 1000 * 60 * 10, //refresh every minute timeFormat: config.timeFormat, lang: config.language, initialLoadDelay: 0, // 0 seconds delay retryDelay: 2500, fileUrl: "https://www.dropbox.com/s/k1t6mjjc3knxp3a/dataset.json?raw=1" }, // 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("div"); if (!this.loaded) { wrapper.innerHTML = this.translate('LOADING'); 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.graph; var content = document.createElement("div"); content.innerHTML = ""; for (var i in t.datasequences) { content.innerHTML += t.title + " - " + t.datasequences[i].title + "<br />"; for (var j in t.datasequences[i].datapoints) { content.innerHTML += t.datasequences[i].datapoints[j].title + ": " + t.datasequences[i].datapoints[j].value + "<br />"; } } 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); } });
node_helper.js
'use strict'; /* Magic Mirror * Module: MMM-backlog * * By Stefan Krause http://yawns.de * MIT Licensed. */ 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 && response.statusCode == 200) { self.sendSocketNotification("DATA", body); } }); setTimeout(function() { self.getData(); }, this.config.refreshInterval); }, socketNotificationReceived: function(notification, payload) { var self = this; if (notification === 'CONFIG' && self.started == false) { self.config = payload; self.sendSocketNotification("STARTED", true); self.getData(); self.started = true; } } });
-
MMM-icanhazdadjoke - Fetch a random joke
Description
Per request by WNG_Brady this module fetches a random joke in JSON format from icanhazdadjoke.com and shows it on screen.
Please note the jokes differ in length. So you should use the maxWidth value to adjust it to your specific MagicMirror layout and to avoid overlapping with other modules. Based on the location you choose maxWidth of course differ. If you usebottom_bar
you could use the entire width of the screen if you want to. If you use it in between other modules you should set a limit.Download
[card:yawnsde/MMM-icanhazdadjoke]
Version history
Initial release
-
RE: call API (no CORS), used to do it with php proxy
Instead of using the XMLHttpRequest in your main module file you use request() in node_helper
Take a look at this code: https://forum.magicmirror.builders/topic/5743/mmm-solartemp
I’m sure you will understand the workflow. If not, just let us know what you have and where you are stuck
-
RE: Fuel Monitor for Austria
@strawberry-3.141 said in Fuel Monitor for Austria:
@schlachtkreuzer6 would be great if someone is able to integrate this into my fuel module for germany :)
That was my first thought as well. Would require a switch to choose between Germany and Austria and as such send different requests. I might be able to look at that on Sunday
-
RE: Prepping my first build. Care to check my work?
- Most tv’s show stuff like “signal lost” on screen when you disable hdmi in raspberry to hide the screen, and in some tv’s you cannot disable that
- Cheap tv’s have a poor resolution. The 32" I bought for some bucks only runs 1366x768 and text on your mirror (calendar for example) looks blurry.
But you can still live with it. I will use mine to see if we actually use the magic mirror at all. Then I can still invest money in a better display add replace it
-
RE: FB Bday List
@iMAGiC said in FB Bday List:
@plybz18 in your fb events, you can copy bday link form bottom left.
And then add it as a calendar :)
-
RE: regions...
Shouldn’t the index.html be changed as well to add additional divs with his classes?