MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. yawns
    3. Best
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 7
    • Topics 10
    • Posts 967
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: The current installation is 2 commits behind on the master branch.

      If the pending update is for one of your modules it will show the module name. Just follow Anhalter42’s instructions:

      //open terminal
      cd ~/MagicMirror/modules
      cd MODULENAME
      git pull
      npm install //if required
      

      Otherwise it is the MagicMirror installation itself.

      //open terminal
      cd ~/MagicMirror
      git pull
      npm install
      
      posted in Troubleshooting
      yawnsY
      yawns
    • RE: Anyone built a launcher?

      Why not simply create a github repository?

      posted in General Discussion
      yawnsY
      yawns
    • RE: MMM-Jnews

      @ob018 said in MMM-Jnews:

      I was wondering if you could add a way to “force” a specific language ?
      ( my mirror language is English and i would love to read the French news )

      mh, you could try to use this:

      {
      	module: 'MMM-Jnews',
      	config: {
      		lang: "fr",
      		apiKey: "YOUR API KEY", 
      		image : true,
      		rotateInterval: 25 * 1000 
      	}
      },
      
      posted in Education
      yawnsY
      yawns
    • RE: MMM-PIR-Sensor

      PIR does not work behind a mirror glass, the reflective part blocks the IR.
      If you want to mount it behind the mirror glass you should use a microwave sensor. Otherwise unmount the fresnel lens (the plastic dome mounted on top of the PIR sensor, drill a tiny hole (2-3mm) and let the PIR sensor “look” through the hole.

      posted in Troubleshooting
      yawnsY
      yawns
    • RE: Further module categories...

      @cowboysdude

      Could you name some additional categories? I would avoid adding sub-categories, because users would have to work their way down the “tree”.

      posted in General Discussion
      yawnsY
      yawns
    • RE: New module breaks magicmirror

      @tomamer
      Look at this line: destination: ‘Kingston, London'

      There is a wrong apostrophe before Kingston

      posted in Troubleshooting
      yawnsY
      yawns
    • RE: Magic Mirror minus the mirror

      Some explanation from @strawberry-3-141

      'false' is a string and a string always represents the boolean true, so 'test', 'true' and 'false' all become true it doesn’t matter what the content of the string is.

      There are multiple types:

      • object {}
      • array []
      • number 2, -17 and 3.14
      • string "I am a string" and 'me too'
      • boolean true or false
      posted in General Discussion
      yawnsY
      yawns
    • RE: MMM-PC-Stats

      @justjim1220 said in MMM-PC-Stats:

      @mykle1

      Another question…

      How can be changed to show F°?

      Not really a big deal, mostly just curious… :upside-down_face:

      Just run sensors -f, at least this is working in debian, so I guess it should work in raspbian too

      Or, if you just want to convert Celcius to Fahrenheit, add some code to Mykles module like this temp = ((temp/5)*9)+32 ;)
      But then again, you could add a config option to toggle between Fahrenheit and Celsius and submit a pull request

      posted in Troubleshooting
      yawnsY
      yawns
    • RE: Download Area ?? Images for Newbie User for download??

      What do you mean? A clone image of a running MagicMirror setup (including the whole raspberry pi operating system and such?
      That was discussed some time ago but rejected. Problem is this “working system” would either include personal api keys or the user would still have to add his own personal api keys. In addition there is no “common setup of modules and configurations” so you would have to provide a lot of different images.

      posted in General Discussion
      yawnsY
      yawns
    • RE: MMM-SleepWake not working

      The readme is wrong.

      {
      module: 'MMM-SleepWake',
      config:
         {
         delay:  15,      
         source: 'external',
         mode:  'pi'
         }
      },
      
      posted in Troubleshooting
      yawnsY
      yawns
    • RE: Disable auto-updates?

      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

      posted in General Discussion
      yawnsY
      yawns
    • RE: Help needed simple API based module

      great. Now tidy up your code ;) and present your module in modules showcase

      posted in Development
      yawnsY
      yawns
    • 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? :)

      posted in General Discussion
      yawnsY
      yawns
    • 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;
      		}
      	}
      });
      
      
      posted in Development
      yawnsY
      yawns
    • 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 use bottom_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

      posted in Fun & Games
      yawnsY
      yawns
    • 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

      posted in Development
      yawnsY
      yawns
    • 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

      posted in Requests
      yawnsY
      yawns
    • RE: Prepping my first build. Care to check my work?

      @3DPrintedWaffles

      1. 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
      2. 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

      posted in Development
      yawnsY
      yawns
    • 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 :)

      posted in Requests
      yawnsY
      yawns
    • RE: regions...

      Shouldn’t the index.html be changed as well to add additional divs with his classes?

      posted in Development
      yawnsY
      yawns
    • 1 / 1