Hallo Kollegen,
lt. dem Wiki zu RPI_1Wire sollten DHT11 und DHT22 Sensoren auch über dieses Modul abrufbar sein. Ich versuche nun seit Tagen einen DHT22 mit integriertem 4k7 Pullup auf einem Raspi3 mit Trixie ans Laufen zu bringen.
Dazu habe ich die /boot/firmware/config.txt erweitert um "dtoverlay=dht11,gpiopin=5,pullup=off".
Ebenso habe ich mittels dpkg -i RPi-DHT-perl_2.0-1_armhf.deb installiert und auch das Paket wiringpi_3.18_armhf.deb.
Danach kann ich auch per "cat /sys/devices/platform/dht11@5/iio:device0/in_temp_input" auf die gemessene Temperatur*1000 zugreifen (analog auch auf die Feuchtigkeit).
Das "define mydht22 RPI_1Wire DHT22-5" bringt mir allerdingsals Rückmeldung im state immer "No 1-Wire bus found".
Ich habe nun die Befürchtung, dass die DHTs gar nicht in diesem Modul implementiert sind, obwohl im Wiki beschrieben. Kann das sein?
Im Modul selbst steht die Pfaddefinition $dht_path zwar (so wie auch bei dem cat oben) drin, diese wird aber nirgendwo sonst mehr in diesem Modul verwendet...
Das Modul selbst ist folgendes #$Id: 58_RPI_1Wire.pm 28388 2024-01-16 21:41:43Z Adimarantis $
Das Log wirft mir folgende Fehlermeldungen:
2026.06.09 18:44:24.535 1: main::CallFn called by fhem.pl (788)
2026.06.09 18:44:24.534 1: main::FW_Read called by fhem.pl (4002)
2026.06.09 18:44:24.534 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (616)
2026.06.09 18:44:24.534 1: main::FW_initInform called by ./FHEM/01_FHEMWEB.pm (978)
2026.06.09 18:44:24.534 1: main::FW_roomStatesForInform called by ./FHEM/01_FHEMWEB.pm (711)
2026.06.09 18:44:24.533 1: main::FW_devState called by ./FHEM/01_FHEMWEB.pm (3239)
2026.06.09 18:44:24.533 1: main::getAllSets called by ./FHEM/01_FHEMWEB.pm (3431)
2026.06.09 18:44:24.533 1: main::CommandSet called by fhem.pl (2924)
2026.06.09 18:44:24.533 1: main::DoSet called by fhem.pl (2020)
2026.06.09 18:44:24.532 1: main::CallFn called by fhem.pl (1978)
2026.06.09 18:44:24.532 1: main::RPI_1Wire_Set called by fhem.pl (4002)
2026.06.09 18:44:24.532 1: main::__ANON__ called by ./FHEM/58_RPI_1Wire.pm (353)
2026.06.09 18:44:24.532 1: stacktrace:
2026.06.09 18:44:24.531 1: PERL WARNING: Use of uninitialized value $type in string eq at ./FHEM/58_RPI_1Wire.pm line 353.
2026.06.09 18:44:24.531 1: main::CallFn called by fhem.pl (788)
2026.06.09 18:44:24.531 1: main::FW_Read called by fhem.pl (4002)
2026.06.09 18:44:24.530 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (616)
2026.06.09 18:44:24.530 1: main::FW_initInform called by ./FHEM/01_FHEMWEB.pm (978)
2026.06.09 18:44:24.530 1: main::FW_roomStatesForInform called by ./FHEM/01_FHEMWEB.pm (711)
2026.06.09 18:44:24.530 1: main::FW_devState called by ./FHEM/01_FHEMWEB.pm (3239)
2026.06.09 18:44:24.529 1: main::getAllSets called by ./FHEM/01_FHEMWEB.pm (3431)
2026.06.09 18:44:24.529 1: main::CommandSet called by fhem.pl (2924)
2026.06.09 18:44:24.529 1: main::DoSet called by fhem.pl (2020)
2026.06.09 18:44:24.529 1: main::CallFn called by fhem.pl (1978)
2026.06.09 18:44:24.528 1: main::RPI_1Wire_Set called by fhem.pl (4002)
2026.06.09 18:44:24.528 1: main::__ANON__ called by ./FHEM/58_RPI_1Wire.pm (350)
2026.06.09 18:44:24.528 1: stacktrace:
2026.06.09 18:44:24.528 1: PERL WARNING: Use of uninitialized value $type in string eq at ./FHEM/58_RPI_1Wire.pm line 350.
2026.06.09 18:44:24.527 1: main::CallFn called by fhem.pl (788)
2026.06.09 18:44:24.527 1: main::FW_Read called by fhem.pl (4002)
2026.06.09 18:44:24.527 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (616)
2026.06.09 18:44:24.526 1: main::FW_initInform called by ./FHEM/01_FHEMWEB.pm (978)
2026.06.09 18:44:24.526 1: main::FW_roomStatesForInform called by ./FHEM/01_FHEMWEB.pm (711)
2026.06.09 18:44:24.526 1: main::FW_devState called by ./FHEM/01_FHEMWEB.pm (3239)
2026.06.09 18:44:24.526 1: main::getAllSets called by ./FHEM/01_FHEMWEB.pm (3431)
2026.06.09 18:44:24.525 1: main::CommandSet called by fhem.pl (2924)
2026.06.09 18:44:24.525 1: main::DoSet called by fhem.pl (2020)
2026.06.09 18:44:24.525 1: main::CallFn called by fhem.pl (1978)
2026.06.09 18:44:24.525 1: main::RPI_1Wire_Set called by fhem.pl (4002)
2026.06.09 18:44:24.524 1: main::__ANON__ called by ./FHEM/58_RPI_1Wire.pm (350)
2026.06.09 18:44:24.524 1: stacktrace:
2026.06.09 18:44:24.524 1: PERL WARNING: Use of uninitialized value $type in string eq at ./FHEM/58_RPI_1Wire.pm line 350.
2026.06.09 18:44:24.524 1: main::CallFn called by fhem.pl (788)
2026.06.09 18:44:24.523 1: main::FW_Read called by fhem.pl (4002)
2026.06.09 18:44:24.523 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (616)
2026.06.09 18:44:24.523 1: main::FW_initInform called by ./FHEM/01_FHEMWEB.pm (978)
2026.06.09 18:44:24.522 1: main::FW_roomStatesForInform called by ./FHEM/01_FHEMWEB.pm (711)
2026.06.09 18:44:24.522 1: main::FW_devState called by ./FHEM/01_FHEMWEB.pm (3239)
2026.06.09 18:44:24.522 1: main::getAllSets called by ./FHEM/01_FHEMWEB.pm (3431)
2026.06.09 18:44:24.522 1: main::CommandSet called by fhem.pl (2924)
2026.06.09 18:44:24.521 1: main::DoSet called by fhem.pl (2020)
2026.06.09 18:44:24.521 1: main::CallFn called by fhem.pl (1978)
2026.06.09 18:44:24.521 1: main::RPI_1Wire_Set called by fhem.pl (4002)
2026.06.09 18:44:24.521 1: main::__ANON__ called by ./FHEM/58_RPI_1Wire.pm (342)
2026.06.09 18:44:24.520 1: stacktrace:
2026.06.09 18:44:24.520 1: PERL WARNING: Use of uninitialized value $type in string eq at ./FHEM/58_RPI_1Wire.pm line 342.
2026.06.09 18:44:24.520 1: main::CallFn called by fhem.pl (788)
2026.06.09 18:44:24.520 1: main::FW_Read called by fhem.pl (4002)
2026.06.09 18:44:24.519 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (616)
2026.06.09 18:44:24.519 1: main::FW_initInform called by ./FHEM/01_FHEMWEB.pm (978)
2026.06.09 18:44:24.519 1: main::FW_roomStatesForInform called by ./FHEM/01_FHEMWEB.pm (711)
2026.06.09 18:44:24.518 1: main::FW_devState called by ./FHEM/01_FHEMWEB.pm (3239)
2026.06.09 18:44:24.518 1: main::getAllSets called by ./FHEM/01_FHEMWEB.pm (3431)
2026.06.09 18:44:24.518 1: main::CommandSet called by fhem.pl (2924)
2026.06.09 18:44:24.518 1: main::DoSet called by fhem.pl (2020)
2026.06.09 18:44:24.517 1: main::CallFn called by fhem.pl (1978)
2026.06.09 18:44:24.517 1: main::RPI_1Wire_Set called by fhem.pl (4002)
2026.06.09 18:44:24.517 1: main::__ANON__ called by ./FHEM/58_RPI_1Wire.pm (338)
2026.06.09 18:44:24.517 1: stacktrace:
2026.06.09 18:44:24.516 1: PERL WARNING: Use of uninitialized value $family in hash element at ./FHEM/58_RPI_1Wire.pm line 338.
und so sieht die rudimentäre Devicedefinition aus:
define mydht22 RPI_1Wire DHT22-5
attr mydht22 pollingInterval 5
attr mydht22 room DHT
# CFGFN /opt/fhem/FHEM/DHTonPI.cfg
# DEF DHT22-5
# FUUID 6a2842e6-f33f-16fb-ca8a-8f3615f6fd240fbc
# NAME mydht22
# NOTIFYDEV global
# NR 219
# NTFY_ORDER 50-mydht22
# STATE No 1-Wire Bus found
# TYPE RPI_1Wire
# .attraggr:
# .attrminint:
# READINGS:
# 2026-06-09 16:15:41 failreason cleared
# 2026-06-09 16:15:41 failures 0
# 2026-06-08 22:47:18 humidity 0
# 2026-06-09 18:44:22 state No 1-Wire Bus found
# 2026-06-09 17:26:55 temperature 0
#
setstate mydht22 No 1-Wire Bus found
setstate mydht22 2026-06-09 16:15:41 failreason cleared
setstate mydht22 2026-06-09 16:15:41 failures 0
setstate mydht22 2026-06-08 22:47:18 humidity 0
setstate mydht22 2026-06-09 18:44:22 state No 1-Wire Bus found
setstate mydht22 2026-06-09 17:26:55 temperature 0
Kann mir da bitte weitergeholfen werden - wahrscheinlich habe ich irgendwo einen entscheidenden Hinweis überlesen.
LG Harry
Hallo,
sorry, zur eigentlichen Einbindung mit RPI_1Wire kann ich leider nichts beitragen.
Ich würde den DHT22 eher über einen Arduino (Nano) und KeyValueProtocol (https://fhem.de/commandref_modular.html#KeyValueProtocol) anbinden. Einen passenden Sketch suchen und anpassen, sodass er die benötigten Key/Value-Paare liefert, und fertig.
Damit bist du nicht von den GPIOs des Rechners abhängig und ein späterer Hardwarewechsel wird deutlich einfacher.
GrußThomas
Ist schon eine Weile her.
Mein ursprünglicher dht11 Treiber den das Modul primär sucht scheint auf meinem aktuellen System mit aarch64 und Bookworm nicht mehr zu funktionieren (CRC Fehler - wahrscheinlich ein Timing Problem mit 64-Bit), aber mit dem original Kernel Treiber geht es (zumindest mit einem dht11) noch bei mir.
Was deine Fehler angeht spekulier ich mal, dass das Modul trotzdem den 1Wire Bus sucht. Auf meinem System ist der mit
dtoverlay=w1-gpioeingeschaltet.
Vielleicht reicht das schon - auch wenn der DHT11 ja eigentlich das 1Wire nicht braucht.
Jörg
Mit meinem Ratschlag hast so Probleme in Zukunft nicht.
Die läuft und läuft und läuft...