A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
help converting code for module...
-
const exec = require('child_process').exec var NodeHelper = require("node_helper") module.exports = NodeHelper.create({ socketNotificationReceived: function(noti, payload) { if (noti == "GIVE_ME_RESULT") { setTimeout(()=>{ exec("C:\WINDOWS\system32\get-temperature", //I don't know WINDOWS system at all. Is it right? (err, sto, ste) => { if (!err) { this.sendSocketNotification("HERE_IS_RESULT", sto) } else { console.log("Error", err) } } ) }, 1000) } } })
It isn’t tested. But you can catch the idea.