Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Temperature and Humidity data fails to display #32

Open
Ragziesoft opened this issue Dec 4, 2022 · 1 comment
Open

Local Temperature and Humidity data fails to display #32

Ragziesoft opened this issue Dec 4, 2022 · 1 comment

Comments

@Ragziesoft
Copy link

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?

@NikoRL
Copy link

NikoRL commented Oct 28, 2024

  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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants