Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. Dobi
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 6
    • Best 0
    • Groups 0

    Dobi

    @Dobi

    0
    Reputation
    1
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Dobi Follow

    Latest posts made by Dobi

    • RE: Head first developing MM module for extreme beginners

      @sdetweil
      sorry I only updated it on github

      
      notificationReceived: function (notification, payload, sender) {
      		var self = this;
      		switch (notification) {
      			case "DOM_OBJECTS_CREATED":
      				var timer = setInterval(() => {
      					//this.updateDom()
      					self.sendSocketNotification("DO_YOUR_JOB", self.count);
      					console.log(`self.sendSocketNotification("DO_YOUR_JOB", this.count)`, self.sendSocketNotification("DO_YOUR_JOB", self.count))
      					self.sendSocketNotification("DO_YOUR_JOB", self.count)
      					self.subElementUp.innerHTML = "Count UP:" + self.count
      					self.count++
      				}, 1000)
      				break
      		}
      	},
      
      
      posted in Development
      D
      Dobi
    • RE: Head first developing MM module for extreme beginners

      @sdetweil I replaced all this. … calls to self. … but I don’t get a change. Is there a way that I can check to check that I can check that the function is loaded correctly from the kernal?

      posted in Development
      D
      Dobi
    • RE: Head first developing MM module for extreme beginners

      @sdetweil ok, but it dosen’t change something.

      notificationReceived: function (notification, payload, sender) {
      		self = this;
      		switch (notification) {
      			case "DOM_OBJECTS_CREATED":
      				var timer = setInterval(() => {
      					//this.updateDom()
      					self.sendSocketNotification("DO_YOUR_JOB", this.count);
      					console.log(`self.sendSocketNotification("DO_YOUR_JOB", this.count)`, self.sendSocketNotification("DO_YOUR_JOB", this.count))
      					self.sendSocketNotification("DO_YOUR_JOB", this.count)
      					this.subElementUp.innerHTML = "Count UP:" + this.count
      					this.count++
      				}, 1000)
      				break
      		}
      	},
      

      Now i could post a picture of my console
      875c1b85-daa2-4374-b4d3-c833268e7387-grafik.png

      posted in Development
      D
      Dobi
    • RE: Head first developing MM module for extreme beginners

      @sdetweil I gave it a try but without differences 😞
      I made a new git repo : https://github.com/Dobherrmann/MMM-cookbook.git
      Now there I should have the same name in the repo like my module.

      my config. js looks like this (I gave it a position):

       {
            module: "MMM-cookbook",
            position: "middle_center",
            config: {
              header: "My Cookbook",
              foo: "I'm the King of the world!"
            }
          },
      

      I started to debug “my code” a little bit and I found this when I want to send a socket notification:

      self.sendSocketNotification("DO_YOUR_JOB", this.count);
      					console.log("Notfication", this.sendSocketNotification("DO_YOUR_JOB", this.count))
      					this.sendSocketNotification("DO_YOUR_JOB", this.count)
      					this.subElementUp.innerHTML = "Count UP:" + this.count
      

      On my console i get the feedback that “this.sendSocketNotification(“DO_YOUR_JOB”, this.count” is undefined. It looks like that this function is unkown.

      posted in Development
      D
      Dobi
    • RE: Head first developing MM module for extreme beginners

      @sdetweil ahh thank you for these information I will give it a try.

      posted in Development
      D
      Dobi
    • RE: Head first developing MM module for extreme beginners

      Hey guys,

      I’m quite new in developing an own module. I was able to change exiting modules on my magic mirror but now I wanted to create my own module, but I’m not able to get socket communication between my “main” module an the “helper-function”

      I uploaded my module here:
      https://github.com/Dobherrmann/MMM_Testmodul.git
      my Module looks like this on my magic mirror:
      8f60324c-9269-4d1c-b5ae-0e337b316361-grafik.png
      maybe someone can find my mistake(s).

      BR

      posted in Development
      D
      Dobi