• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-DHT-Sensor

Scheduled Pinned Locked Moved Troubleshooting
dhtdht11
14 Posts 5 Posters 5.5k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Away
    sdetweil
    last edited by Sep 19, 2018, 1:35 PM

    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

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    S 1 Reply Last reply Sep 19, 2018, 2:05 PM Reply Quote 0
    • S Offline
      STEFF92 @sdetweil
      last edited by Sep 19, 2018, 2:05 PM

      @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;}
      
      1 Reply Last reply Reply Quote 0
      • Y Offline
        yawns Moderator @STEFF92
        last edited by Sep 19, 2018, 2:49 PM

        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",
        	}
        },
        
        S 1 Reply Last reply Sep 19, 2018, 4:24 PM Reply Quote 0
        • S Offline
          STEFF92 @yawns
          last edited by Sep 19, 2018, 4:24 PM

          @yawns same problem, nothing else than a black screen

          Y 1 Reply Last reply Sep 20, 2018, 8:07 AM Reply Quote 0
          • B Offline
            binia
            last edited by Sep 20, 2018, 5:24 AM

            Try please without the comma the last line.

            		units: "metric"
            
            S 1 Reply Last reply Sep 21, 2018, 12:46 PM Reply Quote 0
            • Y Offline
              yawns Moderator @STEFF92
              last edited by Sep 20, 2018, 8:07 AM

              @steff92 said in MMM-DHT-Sensor:

              @yawns same problem, nothing else than a black screen

              But you did run npm install in ~/MagicMirror/modules/MMM-DHT-Sensor ?

              S 1 Reply Last reply Sep 21, 2018, 12:50 PM Reply Quote 0
              • S Offline
                STEFF92 @binia
                last edited by Sep 21, 2018, 12:46 PM

                @binia doesn’t work

                1 Reply Last reply Reply Quote 0
                • S Offline
                  STEFF92 @yawns
                  last edited by Sep 21, 2018, 12:50 PM

                  @yawns yes i did

                  1 Reply Last reply Reply Quote 0
                  • S Away
                    sdetweil
                    last edited by Sep 21, 2018, 12:52 PM

                    cut and paste your entire config, and paste into jslint.com,
                    at the bottom of the screen check

                    node.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,

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Away
                      sdetweil
                      last edited by Sep 21, 2018, 1:13 PM

                      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;}
                      
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      S 1 Reply Last reply Sep 24, 2018, 4:22 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/14
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy