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.
    Online
    • Profile
    • Following 0
    • Followers 3
    • Topics 25
    • Posts 238
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Module calendar - whole day event

      @MMRIZE
      Oke, thanks for the quick reply. I leave it as is at the moment. It looks great. I’m going to give it a look on an other moment.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Module calendar - whole day event

      @MMRIZE So now my F1 Calendar looks like this.
      SCR-20230801-qdpr.png

      Do you know if it’s possible to get the date and time underneed an item instead of behind?

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Module calendar - whole day event

      @MMRIZE Oke, so if I understand correct, you add a symbol to a calendar and not to a calendar line?

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Module calendar - whole day event

      @MMRIZE I’ve succesfully configured the calendar, but I’m looking how to add different icons to calendar items.
      Example: checkered-flag to F1 time, calendar to appointment, etc.
      I’ve looked in the manual, but I think I miss it. Do you have an example?

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Module calendar - whole day event

      @MMRIZE Thanks, I’m currently using MMM-MyCalendar but I’m going to give it a try this evening.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Module calendar - whole day event

      @MMRIZE what I ment are the truck, recycling and other symbols in front of each row.
      Never seen this before.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: Module calendar - whole day event

      @MMRIZE how do you get different icons in front of the calendar items?
      Is this a default feature? Btw which calendar module are u using?

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: PIR problem RPi 4B, Bullseye 64 bit

      @wyovino No, I’m not using MMM-PIR.
      I’ve documented it on my website, but it is in Dutch ;-)

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

      posted in Troubleshooting
      htilburgsH
      htilburgs
    • RE: PIR problem RPi 4B, Bullseye 64 bit

      I had issues that look the same. After a system crash (defect SD card after 6 years) I could fallback on a backup, but I decided to do a fresh install wih the latest rPi OS. After that my PIR didn’t function anymore. Screen didn’t went of and back on again.

      In my case the solution to put the GL driver back to legacy.

      • sudo raspi-config
      • advanced options
      • GL driver
      • Legacy

      After that my Python script and the PIR worked as they should.p

      posted in Troubleshooting
      htilburgsH
      htilburgs
    • RE: MMM-MyGarbage

      @sifuhall

      I Will have to look in it. Today I have no time.
      I come back tomorrow.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MyGarbage

      @sifuhall

      Did you ran ‘npm install’ afterwards?
      You have to run this in the MMM-MyGarbage directory.

      posted in Utilities
      htilburgsH
      htilburgs
    • RE: MMM-MealViewer

      @sdetweil JSON is perfect:

      0_1576264519518_ff13b851-b585-43c2-a741-02e28faa83e9-image.png

      Thanks for the help so far!! Now I have my data I can play around with it.

      posted in Development
      htilburgsH
      htilburgs
    • RE: MMM-MealViewer

      @sdetweil Almost there I think ;-)

      Whoops! There was an uncaught exception...
      TypeError: Cannot read property '0' of undefined
          at /home/pi/MagicMirror/modules/MMM-MyTVMovies/node_helper.js:28:47
          at Parser.<anonymous> (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/xml2js/lib/parser.js:306:18)
          at Parser.emit (events.js:182:13)
          at SAXParser.onclosetag (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/xml2js/lib/parser.js:264:26)
          at emit (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/sax/lib/sax.js:624:35)
          at emitNode (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/sax/lib/sax.js:629:5)
          at closeTag (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/sax/lib/sax.js:889:7)
          at SAXParser.write (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/sax/lib/sax.js:1436:13)
          at Parser.exports.Parser.Parser.parseString (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/xml2js/lib/parser.js:325:31)
          at Parser.parseString (/home/pi/MagicMirror/modules/MMM-MyTVMovies/node_modules/xml2js/lib/parser.js:5:59)
      

      Has this something to do with the json_data.film[0].titel ??
      Or is it something else?

      When I remove .film[0].titel I got:

      Text is [object Object]
      200[object Object]
      
      posted in Development
      htilburgsH
      htilburgs
    • RE: MMM-MealViewer

      @sdetweil Yeah! That part is working. Now I’ve an other error which has something to do with the xmlToJson function:

      Whoops! There was an uncaught exception...
      TypeError: xml.hasChildNodes is not a function
      

      Any idea?

      posted in Development
      htilburgsH
      htilburgs
    • 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
    • 1
    • 2
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 9 / 12