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

    Posts

    Recent Best Controversial
    • RE: MMM-MealViewer

      Mmmm… not working yet…
      My current node_helper.js:

      const NodeHelper = require('node_helper');
      const request = require('request');
      
      module.exports = NodeHelper.create({
      
          start: function() {
              console.log("Starting node_helper for: " + this.name);
          },
      	
      	// Changes XML to JSON
      	xmlToJson: function(xml) {
      		
      		// Create the return object
      		var obj = {};
      
      		if (xml.nodeType == 1) { // element
      			// do attributes
      			if (xml.attributes.length > 0) {
      			obj["@attributes"] = {};
      				for (var j = 0; j < xml.attributes.length; j++) {
      					var attribute = xml.attributes.item(j);
      					obj["@attributes"][attribute.nodeName] = attribute.nodeValue;
      				}
      			}
      		} else if (xml.nodeType == 3) { // text
      			obj = xml.nodeValue;
      		}
      
      		// do children
      		if (xml.hasChildNodes()) {
      			for(var i = 0; i < xml.childNodes.length; i++) {
      				var item = xml.childNodes.item(i);
      				var nodeName = item.nodeName;
      				if (typeof(obj[nodeName]) == "undefined") {
      					obj[nodeName] = xmlToJson(item);
      				} else {
      					if (typeof(obj[nodeName].push) == "undefined") {
      						var old = obj[nodeName];
      						obj[nodeName] = [];
      						obj[nodeName].push(old);
      					}
      					obj[nodeName].push(xmlToJson(item));
      				}
      			}
      		}
      		return obj;
      	},
      		
      	
      	getMTVM: function(url) {
      		request(url, function(err, res, body) {
      		// if no error and server was happy
      			if(err == null && res.statusCode ==200){
      			console.log(body);
      			var json_data = this.xmlToJson(body)
      			console.log("Text is " + json_data.film[0].titel)
      			}
      		});
      	},
      
      
          socketNotificationReceived: function(notification, payload) {
              if (notification === 'GET_MTVM') {
                  this.getMTVM(payload);
              }
          }
      });
      
      

      In the dev console I get an error:

      Whoops! There was an uncaught exception...
      TypeError: this.xmlToJson is not a function
      
      posted in Development
      htilburgsH
      htilburgs
    • RE: MMM-MealViewer

      So in my case the URL produces:

      0_1576260496007_7fa5a24c-528a-4697-9557-2a9058df2860-image.png image url)

      json_data.SD[0].SPEED@attributes.TEXT will be:

      json.data.film[0].titel    --> 'Bellicher: Cel'
      

      Correct?

      posted in Development
      htilburgsH
      htilburgs
    • RE: MMM-MealViewer

      @sdetweil , I’ve found them, but I don’t know how to use it in combination with the URL that creates the XML.

      Indeed the last one with no extra libs looks promising. I tried to simply add this in the node_helper.js but getting stuck at how to use it.
      I’ve looked into all the MMM Modules but cannot seem to find an example.

      posted in Development
      htilburgsH
      htilburgs
    • RE: MMM-MealViewer

      @cowboysdude, I’m looking for the part where you “change” the XML data to JSON data. I’m trying to write a new MMM, but the data is presented in XML. I like the have it in JSON, so I can use it.

      Maybe I read over it, but I cannot figure out where you do this.

      posted in Development
      htilburgsH
      htilburgs
    • RE: MMM-MyTraffic

      Because this is an english forum, I prefer to speak english ;-)
      The problem is unknown to me. I’ve tried it several times, but it’s loading within a few seconds.

      Maybe you didn’t apply filters in the roads?
      Then it’s trying to load the complete list.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyTraffic

      @timm-rombouts, currently not.
      I’m working on a new release, but due to not having a lot of time, it’s taking me more time.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyPrayerTimes

      @zam many thanks and ramadan mubarak!

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyTraffic

      @Caimin I see what you mean. I will take a look at it in a few days. Currently I’m having a short leave with the family.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Where are you from?

      Eindhoven, Netherlands.
      Home town of PSV and Philips.

      posted in General Discussion
      htilburgsH
      htilburgs
    • RE: Motion Sensor/PIR

      @BandNerd1002
      If you understand Dutch :winking_face:
      I din’t use a MM Module, because that didn’t work for me. I like the mirror to blank even if MM is not running. So I use this alternative Python script.

      http://magicmirror.tilburgs.com/pir-configuratie/

      posted in Troubleshooting
      htilburgsH
      htilburgs
    • RE: 2nd try Smart Mirror, 30" monitor and 110cm wide

      Looks great!

      posted in Show your Mirror
      htilburgsH
      htilburgs
    • MMM-MyTraffic

      Description
      This a module for Magic Mirror². MMM-Mytraffic is a MagicMirror module for DUTCH traffic information, using real-time information from the ANWB.

      Screenshot
      alt text

      alt text

      Download
      [card:htilburgs/MMM-MyTraffic]

      Extra
      I’m not an experienced programmer and do this for fun. Feel free to suggest any ideas.

      Version
      16-04-2019 - v1.0.0 - Initial Release
      17-04-2019 - v1.1.0 - Add preferredRoads Selection
      18-04-2019 - v1.2.0 - Select Large or Small icons and information

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Buienradar dont refresh

      Module name is MMM-Buienradar.
      Just installed it, but see no problem. Tried different zoom levels and they all work.

      Only thing I can see is an error in the Javascript, but that doesn’t keep the module from working (it’s a bit messy).

      posted in Troubleshooting
      htilburgsH
      htilburgs
    • RE: Sync private iCloud calendar with MagicMirror

      You can make a iCloud Family Calendr ‘public’ by following the next steps:

      On an iPhone

      • Go to Calendar app
      • At the bottom you see ‘calendar’
        click on it
      • click on the ‘i’ behind the family calendar
        go to the bottom and make sure ‘public calendar’ is selected
      • select option ‘share’ and then select copy
        Now you have the public url and can use

      On a Mac

      • open calendar app
      • select the family calendar on the left
      • right click on the ‘wifi’ symbol
      • select settings for sharing
      • select public calendar and you can copy the url
      posted in Tutorials
      htilburgsH
      htilburgs
    • RE: MMM-MyGarbage

      @RdP, great it worked out for you!

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyGarbage

      @RdP
      You can use this module by creating your own Garbage Schedule file with the name garbage_schedule.csv An example file garbage_schedule.csv is added.

      Create a CSV based on the following template:

      WeekStarting,green,gray,blue
      03/07/18,1,0,1
      03/14/18,1,1,1
      03/21/18,1,0,1
      03/28/18,1,1,1

      Default there are 3 bins defined (green, gray and blue) If you need more garbage bins, simply add an extra column in the garbage_schedule.csv file. The name is the color you like the bin to have. In you case ‘yellow’.

      Add lines for each garbage pickup date as needed. The date format needs to be specified as MM/DD/YY (e.g.: 05/28/18 for 28-May-2018)

      Succes!

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyGarbage

      @rvanuden :hugging_face: :thumbs_up_light_skin_tone:

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyGarbage

      @werffje :thumbs_up_light_skin_tone:

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyGarbage

      @Chris62 Good to hear it’s fixed.
      You can do both

      • Remove the unused column entirly
      • Fill the unused column with zero’s

      As of version v1.2.0 you can also use you’re own column names, as long as they are color names. The garbage bin is showed in the color of the name of the column.

      example
      WeekStarting,Green,Brown
      04/15/19,1,1

      0_1555064642027_MMM-MyGarbage-colors.png

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: My first Mirror (45cm x 65cm) with 24" monitor (Netherlands)

      @Screwyoudriver (Currently) it’s not possible to read ical files. One of the reasons is that every waste company uses it’s own formats / dates / ect. I will gone take a look at that in the near future, but currently I’ve not enought spare time :disappointed_face:

      En bedankt! :face_with_stuck-out_tongue_winking_eye:

      posted in Show your Mirror
      htilburgsH
      htilburgs
    • 1
    • 2
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 10 / 13