• 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 - Get temperature & humidity values from a DHT sensor

Scheduled Pinned Locked Moved Utilities
22 Posts 9 Posters 13.8k Views 9 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.
  • Z Offline
    Zoltan
    last edited by Nov 30, 2019, 6:01 PM

    Hi
    I have the same problem. Sometimes it will start and show correctly and other times it will just show “Loading sensor data”. When it starts It will then update the values for a few times. It then freeze and just wont update again. It doesn’t disappear like it should for 1/3rd of a second to do the update anymore.

    1 Reply Last reply Reply Quote 0
    • B Offline
      BKeyport Module Developer
      last edited by Jan 25, 2020, 6:13 AM

      If the author ever comes back, I’ve made a couple of changes to the module that I’d love to see applied.

      Floating point trouble, (both temperature and humidity values are coming up as “xx.xxx9999999999”)

      I have a DHT22, but it did this with the DHT11 too, before I burned it up trying to move it from one board to another.

      This gives you the tens and rounds off the rest.

      // Convert C to F
      			if (this.config.units === "imperial") {
      				this.temperature = Math.round((data.temperature * 9/5 + 32)*10)/10;
      			} else {
      				this.temperature = data.temperature;
      			}
      			if (typeof this.temperature !== "undefined" && this.temperature !== null)  {
      				this.sendNotification("INDOOR_TEMPERATURE", this.temperature);
      			}
      			this.humidity = Math.round(data.humidity*10)/10;
      			if (typeof this.humidity !== "undefined" && this.humidity !== null)  {
      				this.sendNotification("INDOOR_HUMIDITY", this.humidity);
      			}
      			this.updateDom(this.config.animationSpeed);
      		}
      

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

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