Read the statement by Michael Teeuw here.
Probleme mit DHT22 Sensor
-
Hi
-
Bevor ich mit meiner Frage starte, erstmal die Hardware:
-
Pi 3b+
-
Original 7 Zoll Touchscreen plus Gehäuse
-
Hängt am Kabel
-
Aktuelle MM2 Version
-
DHT22 Sensor hängt an PIN 2 (vcc), 9 (gnd) & 11 (data)
-
Modul von hier
Habe alles nach der Installationsanleitung gemacht. Aber beim Punkt
Test the Library (Optional): cd examples python3 AdafruitDHT.py 22 <GPIO_PIN>wird mir folgendes angezeigt:
Traceback (most recent call last): File "/home/westpole/Adafruit_Python_DHT/examples/AdafruitDHT.py", line 41, in <module> humidity, temperature = Adafruit_DHT.read_retry(sensor, pin) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/Adafruit_DHT-1.4.0-py3.11-linux-aarch64.egg/Adafruit_DHT/common.py", line 94, in read_retry humidity, temperature = read(sensor, pin, platform) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/Adafruit_DHT-1.4.0-py3.11-linux-aarch64.egg/Adafruit_DHT/common.py", line 80, in read platform = get_platform() ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/Adafruit_DHT-1.4.0-py3.11-linux-aarch64.egg/Adafruit_DHT/common.py", line 63, in get_platform raise RuntimeError('Unknown platform.') RuntimeError: Unknown platform.EGAL welchen GPIO oder PIN ich angebe. Es erscheint immer die selbe Meldung. Wenn ich dann per npm run start den MM starte, kommt folgende Fehlermeldung:
[ERROR] Python process error: Traceback (most recent call last): File "/home/westpole/MagicMirror/modules/MMM-DHT22/read_dht22_sensor.py", line 17, in <module> [2024-05-09 20:10:23.911] [ERROR] Python process error: humidity, temperature = read_dht22_sensor() ^^^^^^^^^^^^^^^^^^^ File "/home/westpole/MagicMirror/modules/MMM-DHT22/read_dht22_sensor.py", line 14, in read_dht22_sensor humidity, temperature = Adafruit_DHT.read_retry(SENSOR_TYPE, gpio_pin) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/Adafruit_DHT-1.4.0-py3.11-linux-aarch64.egg/Adafruit_DHT/common.py", line 94, in read_retry [2024-05-09 20:10:23.913] [ERROR] Python process error: humidity, temperature = read(sensor, pin, platform) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/Adafruit_DHT-1.4.0-py3.11-linux-aarch64.egg/Adafruit_DHT/common.py", line 80, in read [2024-05-09 20:10:23.915] [ERROR] Python process error: platform = get_platform() ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/Adafruit_DHT-1.4.0-py3.11-linux-aarch64.egg/Adafruit_DHT/common.py", line 63, in get_platform raise RuntimeError('Unknown platform.') RuntimeError: Unknown platform. [2024-05-09 20:10:23.965] [LOG] Python process exited with code 1Prinzipiell löuft MM, aber der DHT Sensor zeigt eben nix an.
Wie kann ich das Problem lösen? :) -
-
@westpole said in Probleme mit DHT22 Sensor:
Adafruit_DHT
did you install the library in python??>
can u tell us which module this is? i dont find DH222 Sensor with that python script
-
Hi
That´s my Sensor , and that´s my config:
module: "MMM-DHT22", position: "top_left", config: { gpioPin: 17, fontSize: '16px', // Font size for the header fontFamily: 'Arial', // Font family for module text showThermometerIcon: true, // Show the thermometer icon showDropletIcon: true, // Show the droplet icon showTemperatureText: true, // Show the "Temperature" text showHumidityText: true, // Show the "Humidity" text headerText: 'Local Environment', // Header text displayed above the values updateInterval: 120, // Update interval in seconds for fetching sensor data temperatureIconColor: 'red', // Color of the temperature icon humidityIconColor: 'blue', // Color of the humidity icon temperatureFontSize: '18px', // Font size for temperature humidityFontSize: '14px', // Font size for humidity temperatureOffset: 0, // Temperature offset adjustment in degrees Celsius humidityOffset: 0, // Humidity offset adjustment in percentage points temperatureUnit: 'C', // Default to Celsius ('C') or use 'F' for Fahrenheit layout: 'horizontal', // Default layout style ('horizontal' or 'vertical')
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login