Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHT plug-in is unable to import the RPi driver #1

Open
raulmarinperez opened this issue Feb 3, 2019 · 2 comments
Open

DHT plug-in is unable to import the RPi driver #1

raulmarinperez opened this issue Feb 3, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@raulmarinperez
Copy link

While trying to setup a sensor using the DHT plug-in, I face the following issue:

[2019-02-03 13:15:18] [sensors.py:91 - poll()] WARNING: [indoor][temperature][living_room] unable to poll: Traceback (most recent call last):| File "/apps/myHouse/sensors.py", line 85, in poll| data = plugins[sensor['plugin']['plugin_name']].poll(sensor)| File "/apps/myHouse/plugin_dht.py", line 22, in poll| humidity, temperature = Adafruit_DHT.read_retry(dht_sensor,sensor["plugin"]["pin"])| File "build/bdist.linux-armv6l/egg/Adafruit_DHT/common.py", line 94, in read_retry| humidity, temperature = read(sensor, pin, platform)| File "build/bdist.linux-armv6l/egg/Adafruit_DHT/common.py", line 80, in read| platform = get_platform()| File "build/bdist.linux-armv6l/egg/Adafruit_DHT/common.py", line 55, in get_platform| from . import Raspberry_Pi_2| File "build/bdist.linux-armv6l/egg/Adafruit_DHT/Raspberry_Pi_2.py", line 22, in <module>|ImportError: cannot import name Raspberry_Pi_2_Driver|

Looks like the Docker image is missing some dependencies to make the sensor work.

@user2684 user2684 added the bug Something isn't working label Feb 4, 2019
@user2684
Copy link
Contributor

user2684 commented Feb 4, 2019

Definitely looks like a bug in the library or better the way it was installed:

Solutions provided in the links do not apply here since neither we are running in the library folder nor we are using python3.
I tried installing previous and latest version without luck.
Instead apparently looks like the latest version installed with pip works fine (originally it was not installed through pip since couldn't provide the force-pi argument which was required) but I need to apply it to the docker image to confirm, will keep you posted!

@user2684
Copy link
Contributor

user2684 commented Feb 7, 2019

Hey, give this updated docker image a try whenever you can, no hurry: myhouseproject/myhouse:2.4-1
I found the way to install the library via pip with pip install Adafruit-Python-DHT --install-option="--force-pi" and seems working now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants