Read the statement by Michael Teeuw here.
MMM-DHT-Sensor
-
U need another set of braces starting before “module”
And ending after the close brace of config
This new close brace, also needs a trailing comma
-
@sdetweil i tried it but then there was a black screen with the massage i should create a correct config.js file.
Befor i added the DHT-module, my MagicMirror was running. Here is my complete config.js file:
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "en", timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "currentweather", position: "top_right", config: { location: "Castrop-Rauxel", locationID: "", //ID from http://www.openweathermap.org/help/city_list.txt appid: "447e7403ed196c5dcfc895a3b85dd6b4" } }, { module: "weatherforecast", position: "top_right", header: "Wettervorhersage", config: { location: "Castrop-Rauxel", locationID: "", //ID from http://www.openweathermap.org/help/city_list.txt appid: "447e7403ed196c5dcfc895a3b85dd6b4" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "Tagesschau", url: "http://www.tagesschau.de/xml/rss2" }, { title: "BILD News", url: "https://www.bild.de/rss-feeds/rss-16725492,feed=news.bild.html" }, { title: "Kicker News", url: "http://rss.kicker.de/news/aktuell" }, { title: "Kicker BVB", url: "http://rss.kicker.de/team/borussiadortmund" } ], showSourceTitle: true, showPublishDate: true } }, { module: 'MMM-soccer', position: 'bottom_left', config: { api_key: 'c7c930952f7a4d73951b33b2386d30c1', colored: false, show: 'GERMANY', leagues: {"GERMANY":430}, } }, { module: "MMM-DHT-Sensor", position: "bottom_right", config: { sensorTyp: "11", sensorPIN: "7", updateInterval: "2000 ms", animationSpeed: "0", titleText: "Raumtemperatur", units: "metric", } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;} -
Please try it this way:
{ module: "MMM-DHT-Sensor", position: "bottom_right", config: { sensorTyp: 11, sensorPIN: 7, updateInterval: 2000, animationSpeed: 0, titleText: "Raumtemperatur", units: "metric", } }, -
@yawns same problem, nothing else than a black screen
-
Try please without the comma the last line.
units: "metric" -
@steff92 said in MMM-DHT-Sensor:
@yawns same problem, nothing else than a black screen
But you did run
npm installin~/MagicMirror/modules/MMM-DHT-Sensor? -
@binia doesn’t work
-
@yawns yes i did
-
cut and paste your entire config, and paste into jslint.com,
at the bottom of the screen checknode.js, long lines, single quotes, and whitespace mess
may have to comment out a few trailing commas…
should find the problem, if its config text related…
otherwise
start the mm from the commandline on the pi and see what the error reports,
-
jslint suggests removing the extra trailing commas
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "en", timeFormat: 24, units: "metric", modules: [ { module: "alert" }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "currentweather", position: "top_right", config: { location: "Castrop-Rauxel", locationID: "", //ID from http://www.openweathermap.org/help/city_list.txt appid: "447e7403ed196c5dcfc895a3b85dd6b4" } }, { module: "weatherforecast", position: "top_right", header: "Wettervorhersage", config: { location: "Castrop-Rauxel", locationID: "", //ID from http://www.openweathermap.org/help/city_list.txt appid: "447e7403ed196c5dcfc895a3b85dd6b4" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "Tagesschau", url: "http://www.tagesschau.de/xml/rss2" }, { title: "BILD News", url: "https://www.bild.de/rss-feeds/rss-16725492,feed=news.bild.html" }, { title: "Kicker News", url: "http://rss.kicker.de/news/aktuell" }, { title: "Kicker BVB", url: "http://rss.kicker.de/team/borussiadortmund" } ], showSourceTitle: true, showPublishDate: true } }, { module: 'MMM-soccer', position: 'bottom_left', config: { api_key: 'c7c930952f7a4d73951b33b2386d30c1', colored: false, show: 'GERMANY', leagues: {"GERMANY":430} } }, { module: "MMM-DHT-Sensor", position: "bottom_right", config: { sensorTyp: "11", sensorPIN: "7", updateInterval: "2000 ms", animationSpeed: "0", titleText: "Raumtemperatur", units: "metric" } } ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;} -
@sdetweil i tried that code, but it doesnt work. Still the same problem.
I always start the MM in the command line with:cd MagicMirror/ npm startThen the black screen opens and i can’t see whats in the command line because if i want to stop MM i have to reboot the pi (I’m a total beginner, sorry, maybe there is an other possibility to stop without reboot).
I despair :loudly_crying_face:
-
@steff92 if u have a keyboard press ctrl-shift-i ( letter i) to open debug console.
Or start mirror in Dev mode, not full screen
npm start Dev
Alt-tab will also walk u between the available windows
-
This is my running config for this module:
{ module: "MMM-DHT-Sensor", position: "top_right", header: "Header", config: { sensorPin: 2, sensorType: 11, updateInterval: 60 * 60 * 1000, initialLoadDelay: 0, animationSpeed: 1000, units: "metric", relativeScale: 35, debug: false } },
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login