Openhab2 dht 11 einbinden
Verfasst: 21. Mai 2017 15:14
Guten Tag,
seit bereits 2 Tagen versuche ich den dht 11 in Openhab2 einzubinden.
Ich bekomme immer nur Fehlermeldungen.
Hier die Konfiguration:
Thing:
dht11.sh:
item:
Fehlermeldung im PaperUI:
Komischerweise gibt er die Fehlermeldung auch 2x hintereinander aus.
Wenn ich das Python script Adafruit_DHT.py in der ssh konsole ausführe funktioniert es einwandfrei.
Hat jemand eine Idee was ich falsch mache?
Ich bedanke mich schon mal im voraus!
seit bereits 2 Tagen versuche ich den dht 11 in Openhab2 einzubinden.
Ich bekomme immer nur Fehlermeldungen.
Hier die Konfiguration:
Thing:
Code: Alles auswählen
Thing exec:command:temp [command="bash /home/openhabian/Adafruit_Python_DHT/examples/dht11.sh", interval=60]
Code: Alles auswählen
#!/bin/bash
DHT_DEVICE=11
GPIO_PIN=13
cd /home/openhabian/Adafruit_Python_DHT/examples/
eval `./AdafruitDHT.py $DHT_DEVICE $GPIO_PIN | sed -e 's/*C//g' | sed -e 's/%//$
echo "$Temp"
exit 0
Code: Alles auswählen
String temp_wohnzimmer "Wohnzimmer Temperatur: %s°C" <temperature> {channel="exec:command:temp:output"}
Code: Alles auswählen
/usr/lib/python2.7/dist-packages/pkg_resources.py:1049:
UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and
vulnerable to attack when used with get_resource_filename. Consider a more secure
location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning) Traceback (most recent call last): File "./AdafruitDHT.py",
line 41, in <module> humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
File "build/bdist.linux-armv7l/egg/Adafruit_DHT/common.py", line 94, in read_retry
File "build/bdist.linux-armv7l/egg/Adafruit_DHT/common.py", line 81, in read
File "build/bdist.linux-armv7l/egg/Adafruit_DHT/Raspberry_Pi_2.py", line 34,
in read RuntimeError: Error accessing GPIO. /usr/lib/python2.7/dist-packages/pkg_resources.py:1049:
UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and
vulnerable to attack when used with get_resource_filename. Consider a
more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning) Traceback (most recent call last):
File "./AdafruitDHT.py", line 41, in <module> humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
File "build/bdist.linux-armv7l/egg/Adafruit_DHT/common.py", line 94, in read_retry
File "build/bdist.linux-armv7l/egg/Adafruit_DHT/common.py", line 81, in read
File "build/bdist.linux-armv7l/egg/Adafruit_DHT/Raspberry_Pi_2.py", line 34,
in read RuntimeError: Error accessing GPIO.
Wenn ich das Python script Adafruit_DHT.py in der ssh konsole ausführe funktioniert es einwandfrei.
Hat jemand eine Idee was ich falsch mache?
Ich bedanke mich schon mal im voraus!