MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

[MMM-LocalTemperature] - No display



  • 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



  • @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.



  • 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



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



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


  • @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)



  • 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



  • 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.



  • @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. 👍


Log in to reply