• 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-DHT22 : Temperature and Humidity : Undefined

Scheduled Pinned Locked Moved Troubleshooting
9 Posts 2 Posters 1.4k Views 3 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.
  • B Offline
    BKeyport Module Developer @RIKKO14
    last edited by Jul 8, 2020, 12:01 AM

    @RIKKO14

    Make sure to change the sensor pin to your pin

    config: {
    		sensorPin: 2, ← This line 
    

    The "E" in "Javascript" stands for "Easy"

    1 Reply Last reply Reply Quote 0
    • R Offline
      RIKKO14
      last edited by Jul 8, 2020, 7:30 AM

      My MMM-DHT-Sensor.js :

      Module.register("MMM-DHT-Sensor", {
      
      	defaults: {
      		updateInterval: 60 * 60 * 1000, // Every hour.
      		initialLoadDelay: 0, // No delay/
      		animationSpeed: 1000, // One second.
      		units: config.units, // Celsius
      		relativeScale: 30,
      		debug: false,
      		sensorPin: 2,
      		sensorType: 22
      

      My config.js :

      	{
      	module: "MMM-DHT-Sensor",
      	position: "top_right",
      	header: "Upstairs",
      	config: {
      		sensorPin: 2,
      		sensorType: 22,
      		updateInterval: 60 * 60 * 1000,
      		initialLoadDelay: 0,
      		animationSpeed: 1000,
      		units: "metric",
      		relativeScale: 35,
      		debug: false
      	}
      },
      
      B 1 Reply Last reply Jul 8, 2020, 8:16 AM Reply Quote 0
      • B Offline
        BKeyport Module Developer @RIKKO14
        last edited by Jul 8, 2020, 8:16 AM

        @RIKKO14

        The following config.js snippet would match your graphic allowing for DHT-22 rather than DHT-11,

        	{
        	module: "MMM-DHT-Sensor",
        	position: "top_right",
        	header: "Upstairs",
        	config: {
        		sensorPin: 20, // use BCM/GPIO numbering, not physical Pin # or wiringPi. 
        		sensorType: 22,
        		updateInterval: 60 * 60 * 1000,
        		initialLoadDelay: 0,
        		animationSpeed: 1000,
        		units: "metric",
        		relativeScale: 35,
        		debug: false
        	}
        },
        

        The "E" in "Javascript" stands for "Easy"

        1 Reply Last reply Reply Quote 0
        • R Offline
          RIKKO14
          last edited by Jul 8, 2020, 4:28 PM

          I do this in first and i retry now but it’s always display “loading sensor data”, then i modify sensorPin: 20,in the MMM-DHT-Sensor.js because it stayed code_sensorPin: 20, but the problem stay here…
          I even connected DHT22 directly to my raspi (GND in pin 6 and VCC in pin 4)
          it’s annoying because it sounds simple …

          my DHT22 would it be broken, how to know it …

          B 1 Reply Last reply Jul 8, 2020, 11:59 PM Reply Quote 0
          • B Offline
            BKeyport Module Developer @RIKKO14
            last edited by Jul 8, 2020, 11:59 PM

            @RIKKO14 First things first.

            1. Check your pinout according to http://pinout.xyz
            2. make sure you installed exactly to their instructions.
            3. reboot after install.

            The "E" in "Javascript" stands for "Easy"

            1 Reply Last reply Reply Quote 0
            • R Offline
              RIKKO14
              last edited by Jul 10, 2020, 7:18 PM

              I remove MMM-DHT Sensor, MMM-DHT22 and MMM-dht22, I did not removel node-dht-sensor because I don’t know how to remove, I reinstall MMM-DHT Sensor, I left in GPIO 2 (3) not to change the config.js and the MMM-DHT-Sensor.js, it does not work either, after several relaunch of MM, it worked one time but after a relaunch again it does not work anymore. .
              It’s crazy, I ordered a new DHT22 because it may be defective …

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                8/9
                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