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
    • RE: read csv-data and put it in an array

      picture

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

      all values “undefined”

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

      how said:
      if i click on the linenumber of getDom: the blue arrow run to the last line. i can’t stop it or something else … it runs thru

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

      it loops from first entry to last. if the last entry is displayed, it loops once and than going to self.updateDom … for me the correct way …

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

      i cannot place the blue sign on line 118 (cklicking on that number => run to last line …)

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

      return wrapper. all entries undefined, aha.

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

      i clicked on the linenumber and the blue sign went to the last line, though i couldn’t hit line for line …

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

      yes, top, but i will post it, moment:

      		{
      			module: 'perlchamp',
      			position: 'top',
      			header: "Geburtstage",
      			config: {
      				language: "de"
      			}
      
      
      posted in Utilities
      PerlchampP
      Perlchamp
    • RE: read csv-data and put it in an array

      yes it does … i changed innerText to innerHTML but nothing.

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

      displays the last row of the data-string, though the data from first to last are looped. for me it seems correct there …

      posted in Utilities
      PerlchampP
      Perlchamp
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 5 / 9