Hey,
i am trying to connect a DHT11/22 temperature sensor to my Libreelec/RPi2 using the GPIO connectors to get current room temperature (and humidity).
I have installed the "Adafruit Libraries" Addon from the Official "LibreELEC" Addon repository. This includes "Adafruit_DHT" Libraries that are intended to do that.
But unfortunately i am struggeling with using this Libraries properly.
I tried a simple python example script to put out the current temperature:
Script source: adafruitdht.py
I added these lines to load the DHT libraries:
libPath = '/storage/.kodi/addons/virtual.adafruit-libraries/lib/'
if not libPath in sys.path: sys.path.append(libPath)
import Adafruit_DHT
But still only get errors
/storage#> python ./AdafruitDHT.py 22 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 90, in read_retry
humidity, temperature = read(sensor, pin, platform)
File "/storage/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT/common.py", line 76, in read
platform = get_platform()
File "/storage/.kodi/addons/virtual.adafruit-libraries/lib/Adafruit_DHT/common.py", line 59, in get_platform
raise RuntimeError('Unknown platform.')
RuntimeError: Unknown platform.
Display More
Are there some docs i can read regarding Libreelec and the Adafruit Libraries? (I have found nothing so far)
Are the Adafruit Libraries intended to be used from the commandline?
Or do i need to call them from Kodi?
Are there any examples i can have a look at?
I appreciate any hint or Idea.
Thanks
Thomas