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-LocalTemperature] - No display

    Scheduled Pinned Locked Moved Solved Troubleshooting
    10 Posts 4 Posters 2.1k Views 4 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.
    • T Offline
      Thierry17
      last edited by

      Hello,
      I can not display the temperature on the screen.
      Configuration : Raspberry Pi 3, Raspbian stretch lite, MagicMirror 2 (basic modules work).
      I followed the installation procedure:

      cd ~/MagicMirror/modules
      git clone https://github.com/glitch452/MMM-LocalTemperature.git
      sudo apt-get update && sudo apt-get upgrade && sudo apt-get install build-essential wiringpi
      cd MMM-LocalTemperature && chmod +x DHT
      

      Everything went well, no error message
      I plugged into the raspberry a DHT11 as well as a DHT22 (which work well on arduino), power 5v, grnd and output on the pin 22

      I added in the config.js:

      {
                  module: "MMM-LocalTemperature",
                  position: "top_center", // Only add a position if you want this module to display the data
                  header: "Room Temperature",
                  config: {
                      sensorPin: 22, // For GPIO 22
                      units: "metric",
      		temperatureText: "Température: {temperature}°C",
                  }
              },
      

      On the screen, only the header is displayed.
      When I add in the config showTemperature: true, I have in addition a message “Loading…” without more.
      Someone would have the kindness to give me some advice to be able to display the temperature.
      Thank you

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Thierry17
        last edited by

        @Thierry17 the loading message is the initial hard coded message from the module, and is replaced when data is loaded…

        so, this means data was not loaded

        open the developers window.
        using keyboard ctrl-shift-i

        then select the tab at the top labeled ‘console’
        and scroll up to fine any errors, usually in red text.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • T Offline
          Thierry17
          last edited by

          Thank you for your return.
          I followed your advice and here is the error message that appears.
          Unfortunately my knowledge is too limited to know how to correct the problem.
          I configured MagicMirror en fr and online 424 of the MMM-LocalTemperature.js module it is indicated in: “translations / en.json”
          By changing en instead of in that fear to solve the problem?
          thank you in advance

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @Thierry17
            last edited by

            @Thierry17 can u show the error message(s)? we can help

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • T Offline
              Thierry17
              last edited by

              Ouups I forgot "the error message:

              MMM-LocalTemperature: Sensor read Error, trying again in 10 seconds.
              MMM-LocalTemperature.js:445
              {"Killed":false,"code":1,"signal":null,"cmd":"sudo modules/MMM-LocalTemperature/DHT 3 -m j -a 3","stderr":Unable to read sensor data after 3 attemps.\n}
              
              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @Thierry17
                last edited by sdetweil

                @Thierry17 said in [MMM-LocalTemperature] - No display:

                Unable to read sensor data after 3 attemps

                not a language problem…

                can’t read the sensor…

                maybe u need to set the config pinScheme? (:“WPI”) ??
                maybe a wiring problem?
                https://pinout.xyz/
                hover over the bcm number (22) to get the wiringPi number (3)

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • T Offline
                  Thierry17
                  last edited by

                  Thank you very much for the info … now it works !!!
                  For info from the link https://pinout.xyz/ I selected BCM22 (pin 15) and config.js I put

                  sensorPin: 15,
                  pinScheme: "BOARD",
                  

                  The problem is that the temperature is random. It shows 23 ° C then 17 ° C then 23°C while with an arduino next door it displays 23 ° C … surely a problem of DHT11 …
                  But the problem is well settled, thank you again

                  1 Reply Last reply Reply Quote 0
                  • RikkoR Offline
                    Rikko
                    last edited by

                    Picking up on an old thread.

                    I can’t get MMM-LocalTemperature to work on my Raspberry Pi4.

                    I have tried “all” variants I can think of in relation to pins (BOARD, WPI, Default, swithcing pins etc.).
                    But all I get is the “Loading” text.

                    Any ideas how I can troubleshoot? Can the C-file be run in some kind of verbose mode? Is these some kind of GPIO scan/test tool?

                    I’m using the DHT22 module, with pull-up resistor built in.
                    It can be faulty, I suppose. Can I verify its function somehow? I do not have logic analyzer or other such tools. Only have multimeter.

                    I’m a complete GPIO N00B/Rookie.

                    RikkoR 1 Reply Last reply Reply Quote 0
                    • RikkoR Offline
                      Rikko @Rikko
                      last edited by

                      @Rikko I’ll answer myself here. :) It might help someone else.

                      The problem was the version of Wiring Pi, which is a dependency to this module.
                      If you follow the instructions on this module’s page, you get version 2.50 of Wiring Pi. But that does not work with Raspberry Pi 4. You need 2.52.

                      Here you can find details:
                      http://wiringpi.com/wiringpi-updated-to-2-52-for-the-raspberry-pi-4b/

                      My DHT22 now works well with MMM-LocalTemperature. 👍

                      1 Reply Last reply Reply Quote 0
                      • mariosgourosM Offline
                        mariosgouros
                        last edited by

                        I am leaving this comment here for those who have built a magic mirror using raspberry pi zero hoping that it will help someone.
                        After trying to get the sensor (DHT22) to work with various modules I confirm that I managed to make it run with this module. The only difference was that in step 3 of the instructions I installed wiringPi library as described in here: http://wiringpi.com/download-and-install/ , which is simple a sudo apt-get install wiringpi command in the main directory of the project ( /MagicMirror ). Other than that, just make sure to enter the correct GPIO pin in the config.js file and you are ready to get some measurements.
                        Two words only… Thank you!

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