glitch452 / MMM-LocalTemperature

A MagicMirror² module that reads temperature and humidity information from a DHT sensor connected to a Raspberry Pi.
MIT License
22 stars 13 forks source link

Local Temperature and Humidity data fails to display #32

Open Ragziesoft opened 1 year ago

Ragziesoft commented 1 year ago

I have a DHT22 sensor on GPIO22. All installations have been made fresh and config.js checked. However, the modules fails to display the values I used a DHT.py script to check the sensor operation and it outputs readings from sensor. What can be the issue?

NikoLieberum commented 3 weeks ago
  1. Check if WiringPi is installed correctly. To verify, run gpio read 0. It should output 0 if the pin is low and 1 if it is high.
  2. Verify that the correct pin is defined in DHT.c. Make sure the WiringPi pin number is set (you can find the WiringPi pin number for the GPIO pin here). After editing, compile with: cc -Wall DHT.c -o DHT -lwiringPi
  3. Update MMM-LocalTemperature.js: Change line 11 from var axis, Log, config; to var axis, Log;
  4. Review your MagicMirror config.js, for example:
    module: "MMM-LocalTemperature",
            position: "top_center",
            header: "",
            disabled: false,
            config: {
                        sensorPin: 22, // GPIO 22, which is WiringPi pin 3
                showTemperature: true,
                showHumidity: true,
                fontSize: 'small',
                temperatureOffset: -1,
            }

    Hope this helps!