Hi,
I am trying to monitor temperature with the Adafruit AM2302 sensor.
The sensor is connected to my LibreELEC 10.0.2 RPi4. For monitoring i setup icinga2 with check_by_ssh. This works for raspbian10/11.
Testing temperature read AdafruitDHT.py on my libreelec fails; I added libpath from this forum post but no luck:
Bash
LibreELEC:~/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT # ./AdafruitDHT.py 2302 4
Traceback (most recent call last):
File "./AdafruitDHT.py", line 43, in <module>
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
File "/storage/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT/common.py", line 94, in read_retry
humidity, temperature = read(sensor, pin, platform)
File "/storage/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT/common.py", line 80, in read
platform = get_platform()
File "/storage/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT/common.py", line 55, in get_platform
from . import Raspberry_Pi_2
File "/storage/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT/Raspberry_Pi_2.py", line 22, in <module>
from . import Raspberry_Pi_2_Driver as driver
ImportError: cannot import name 'Raspberry_Pi_2_Driver' from 'Adafruit_DHT' (/storage/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT/__init__.py)
Display More
I also tried pythonwrapper.sh and pasting different scripts to the Adafruit_DHT directory, but still no luck.
My python knowlegde is very limited, I am no developer. I can not tell if it's the library, a python2/3 problem or whatever else.
Could the library be updated or is there anything I can do?