• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Probleme mit DHT22 Sensor

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 413 Views 2 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.
  • W Offline
    westpole
    last edited by May 9, 2024, 6:24 PM

    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 1
    

    Prinzipiell löuft MM, aber der DHT Sensor zeigt eben nix an.
    Wie kann ich das Problem lösen? :)

    S 1 Reply Last reply May 9, 2024, 9:40 PM Reply Quote 0
    • S Away
      sdetweil @westpole
      last edited by May 9, 2024, 9:40 PM

      @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

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      W 1 Reply Last reply May 10, 2024, 5:58 PM Reply Quote 0
      • W Offline
        westpole @sdetweil
        last edited by May 10, 2024, 5:58 PM

        @sdetweil

        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')
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          2/3
          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