@sdetweil What do you mean?
Read the statement by Michael Teeuw here.
Posts
-
RE: Error while starting Magic Mirror
This is my config:
modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "calendar_monthly", position: "top_left", config: { } }, { module: "weather", position: "top_right", config: { weatherProvider: "openweathermap", type: "current", location: "mycity", locationID: "cityID", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "mykey" } }, { module: "weather", position: "top_right", header: "Wettervorhersage", config: { weatherProvider: "openweathermap", type: "forecast", location: "mycity", locationID: "cityID", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "mykey" } }, { module: "MMM-NowPlayingOnSpotify", position: "bottom_left", config: { clientID: "myid", clientSecret: "myid", accessToken: "mytoken", refreshToken: "mytoken" } }, ] -
Error while starting Magic Mirror
Hey guys,
I am not able to start my Magic Mirror with the command pm2 start MagicMirror.There is always this error:
[21.01.2022 14:17.17.199] [ERROR] Whoops! There was an uncaught exception... [21.01.2022 14:17.17.201] [ERROR] TypeError: Cannot read properties of undefined (reading 'on') at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:104:5) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12)I have only installed Spotify and calender_monthly module. Yesterday everythink works fine, now nothing works without changing anything
-
RE: Module with HTTP Request
@jalibu is it possible to change the port in the api?
In my main.ts file I haveawait app.listen(3000);Can I change it to 8080?
-
Module with HTTP Request
Hey guys,
I am creating my own first Magic Mirror 2 Module. The Module is about my substitution plan from school. I developed an API running on my localhost on the raspberry pi 3.The module should make a GET request on my localhost and show the result on the mirror.
I`m new in creating own modules so I am not very experienced. This is my code so far:
Module.register("MMM-VPlan", { defaults: { text: "Vertretungsplan", updateDelay: 10, //*60 für minuten errorMessage: "Der Plan konnte nicht geladen werden" }, start: function(){ var self = this; this.vplan = ""; this.completeRquest = false; this.errorMessage = ""; setInterval(function() { self.updateDom() }, 1000*this.config.updateDelay) }, getStyles: function() { return ["vplan.css"]; }, getDom: function() { var wrapper = document.createElement("div"); updateRequest(); if(this.completeRquest) { if(!errorMessage == "") { wrapper.innerHTML = this.errorMessage; } else { wrapper.innerHTML = this.config.text + " Data: " + this.vplan; } } else { wrapper.innerHTML = "Plan läd..." } this.completeRquest = false; return wrapper; }, updateRequest: function() { var self = this; var params = { "day":"today", } var xhttp = new XMLHttpRequest(); xhttp.open("GET", "localhost:3000/vplan", true); xhttp.onreadystatechange = function() { if (this.readyState === 4) { if (this.status === 200) { self.vplan = this.responseText; self.completeRquest = true; } else { self.errorMessage = this.config.errorMessage; } } }; xhttp.send(JSON.stringify(params)); }, })On the mirror you can see: “UNDEFINED”
I hope someone can help me.
LG 1BlauNitrox - Julius