@bradley1982 Did use pm2 for example ? Then you could try to use the command: “pm2 logs ” (most of the times mm.sh) to check the logs.
Could you try to share those logs so we can take a look?
@bradley1982 Did use pm2 for example ? Then you could try to use the command: “pm2 logs ” (most of the times mm.sh) to check the logs.
Could you try to share those logs so we can take a look?
@elmago we could translate your text, but if you want an answer it would be great if you ask your question in English.
@earnestrichards My first suggestion would be to update to version 2.15.0, because there are multiple changes done to the calendar module.
@sdetweil Thank you!
It was because I opened one tab and then closed it, open a new one but the timer was still running indeed. When in the future I want to do something with the mechanisme I need to solve this ;)
Now I now how notifications work in practice, I can finish my own module :)
Hi all,
I tried to follow the following instructions First module to make my first module.
I have it running on my Raspberry PI, but it results in showing only the original count value of 100000 and doesn’t count down. My question is: what am I doing wrong?
Javascript file
/* Magic Mirror
* Module: name of module
*
*/
//Register module
Module.register("MMM-DutchGarbageCalendar", {
defaults: {
foo: "I'm alive!"
},
//Start function
start: function (){
count = 0
},
//getDom Function
getDom: function() {
var element = document.createElement("div")
element.className = "myContent"
element.innerHTML = "Hello, World! " + this.config.foo
var subElement = document.createElement("p")
subElement.id = "COUNT"
element.appendChild(subElement)
return element
},
//NotificationReceived
notificationReceived: function(notification, payload, sender) {
switch(notification) {
case "DOM_OBJECTS_CREATED":
var timer = setInterval(()=>{
this.sendSocketNotification("DO_YOUR_JOB", this.count)
console.log("notificationReceived: DO_YOUR_JOB:")
this.count++
}, 1000)
break
}
},
//socketNotificationReceived
socketNotificationReceived: function(notification, payload) {
switch(notification) {
case "I_DID":
var elem = document.getElementById("COUNT")
elem.innerHTML = "Count:" + payload
console.log("socketReceived:" + payload)
break
}
},
})
node_helper
var NodeHelper = require('node_helper');
var request = require('request');
module.exports = NodeHelper.create({
start: function() {
this.countDown = 100000
},
socketNotificationReceived: function(notification, payload) {
console.log("Payload: =" + this.payload);
switch(notification){
case "DO_YOUR_JOB":
this.sendSocketNotification("I_DID", (this.countDown - payload))
console.log("Payload 2: = " + payload);
break
}
},
});
Who can help me out?
Thanks! I will update when the module is published.
First I need to solve some issues :)
Hi there,
I’m working on a new module and created the necessary files on my Raspberry PI. Now trying to solve some stuff to get it operational, however when the module is done: what is the best way to publish it?
Does somebody has a kind of documentation about this?
Many thanks!