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

    Posts

    Recent Best Controversial
    • RE: read csv-data and put it in an array

      why for TODAY ? and not for current MONTH ?
      getDon:

      	getDom: function() {
      		var self = this;
      		var wrapper = document.createElement("div");
      		
      		// tell MM to call and get our content
      Log.log("LOOK >>>>>>" + JSON.stringify(this.active_birthdays))    // add this line
      			self.updateDom();                          // before this line in the notification code..
      
      		for(var birthday of Object.keys(this.active_birthdays)) {
      			for(var name of this.active_birthdays[birthday]) {
      				var m = document.createElement("div");
      				Log.log("BIRTHDAY >> " + birthday);
      				Log.log("NAME >> " + name);
      				m.innerText = birthday + " " + name;
      				wrapper.appendChild(m);
      			}
      		}
      
      		// pass the created content back to MM to add to DOM.
      		return wrapper;
      	}
      
      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      the columns are:
      birth, name

      and is called “birthdays.csv”

      the data are:
      23.01.1987,Thomas Roth

      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      before you do this. stop. i make an error. the code you posted is not in the notification section. it’s in the getDom section … so i placed it there. was this wrong ?

      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      i get this for each entry (here i only posted one of them):

      [2020-05-02 17:50:36.803] [LOG]    LOOK >>>>>>{} (/home/dirk/MagicMirror/modules/MMM-Logging/node_helper.js:34 Class.socketNotificationReceived)
      

      empty: {}

      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      and where i have to place it ?

      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      hi sam :-)
      see my module-file. why i don’t get values for the Log.log(); statements ?

      	// this is the major worker of the module, it provides the displayable content for this module
      	getDom: function() {
      		var self = this;
      		var wrapper = document.createElement("div");
      		Log.log("this.active_birthdays >>>>> ", this.active_birthdays);
      
      		for(var birthday of Object.keys(this.active_birthdays)) {
      			for(var name of this.active_birthdays[birthday]) {
      				var m = document.createElement("div");
      				Log.log("BIRTHDAY >> " + birthday);
      				Log.log("NAME >> " + name);
      				m.innerText = birthday + " " + name;
      				wrapper.appendChild(m);
      			}
      		}
      
      		// pass the created content back to MM to add to DOM.
      		return wrapper;
      	}
      
      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      don’t worry about me and sleep well.

      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      the same see picture i did send to you. it’s line 122 => stop => refresh => and than like posted before
      no does nothing … ok never mind. coming from germany it’s now 06:00 in the morning did’t sleep …

      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      122 => next => marks “return”(131) => next => marks end of 131 => next => jumped to main.js

      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      yes i did. all variables are correct

      posted in Utilities
      PerlchampP
      Perlchamp
    • 1 / 1