Core: Unable to use DHT sensor due to dependancy failure

Created on 27 Aug 2017  路  12Comments  路  Source: home-assistant/core

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):

Hass.io 52

Component/platform:

DHT sensor

Description of problem:

Unable to add the DHT11 sensor platform to my configuration, I had issues with it after the updates to 51.1 & 51.2 but with 52 the dependancy isn't installed at all so the sensor is unsuable.

log file error:

2017-08-27 21:38:15 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package https://github.com/adafruit/Adafruit_Python_DHT/archive/da8cddf7fb629c1ef4f046ca44f42523c9cf2d11.zip#Adafruit_DHT==1.3.2: Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-myzpup2y-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-gymobw29-record/install-record.txt --single-version-externally-managed --prefix  --compile --user --prefix=" failed with error code 1 in /tmp/pip-myzpup2y-build/
2017-08-27 21:38:15 ERROR (MainThread) [homeassistant.setup] Not initializing sensor.dht because could not install dependency https://github.com/adafruit/Adafruit_Python_DHT/archive/da8cddf7fb629c1ef4f046ca44f42523c9cf2d11.zip#Adafruit_DHT==1.3.2
2017-08-27 21:38:15 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.dht: Could not install all requirements.

waiting-for-reply

Most helpful comment

You have to do it using the debug method found here https://home-assistant.io/developers/hassio/debugging/

it would appear that installing this way doesn't survive through a power cycle of the Pi though, but as long as you only reboot home assistant without power cycling the Pi it'll be OK. Hopefully a proper fix will be available soon.

to install use the following commands:

docker exec homeassistant apk update
docker exec homeassistant apk add python3-dev
docker exec homeassistant apk add gcc
docker exec homeassistant apk add libc-dev
docker exec pip3 install https://github.com/adafruit/Adafruit_Python_DHT/archive/da8cddf7fb629c1ef4f046ca44f42523c9cf2d11.zip#Adafruit_DHT==1.3.2

All 12 comments

Edit: I see you're using hass.io. I'm not sure how much of the troubleshooting below you can do on your own then. @pvizeli what do you recommend?


Do you have the required dependency packages build-essential and python-dev installed?

sudo apt-get install build-essential python3-dev

Try installing the python package manually in the home assistant environment, to get a more verbose log of what goes wrong in the build step:

pip3 install https://github.com/adafruit/Adafruit_Python_DHT/archive/da8cddf7fb629c1ef4f046ca44f42523c9cf2d11.zip#Adafruit_DHT==1.3.2

That's the issue with hass.io, as far as I'm aware there's no way to run any of those commands. I'm getting tempted to switch back to hassbian.

Any news on this? I'd love my sensor back!

Since hass.io runs home assistant in a docker container, all requirements should already be installed before home assistant is even started. I'm not sure why one of the requirements fail to install for you. @pvizeli or someone else more knowledgeable about hass.io and docker might be able to answer better.

I've managed to fix this myself by manually installing the dependencies. Using the hassio debug SSH I was able to install 'python3-dev' and the packages from 'build-essential' (as it's not an available package for some reason) via docker and the apk add command. Not sure if this was just an issue for me or anyone who tries to use a component with these dependencies will run into this issue. Also should there be a 'build-essenital' package available via apk?

@tungmeister I'm facing same issue as you. How did you manage to install the packages? When I SSH into hassio, the docker command is not found.

You have to do it using the debug method found here https://home-assistant.io/developers/hassio/debugging/

it would appear that installing this way doesn't survive through a power cycle of the Pi though, but as long as you only reboot home assistant without power cycling the Pi it'll be OK. Hopefully a proper fix will be available soon.

to install use the following commands:

docker exec homeassistant apk update
docker exec homeassistant apk add python3-dev
docker exec homeassistant apk add gcc
docker exec homeassistant apk add libc-dev
docker exec pip3 install https://github.com/adafruit/Adafruit_Python_DHT/archive/da8cddf7fb629c1ef4f046ca44f42523c9cf2d11.zip#Adafruit_DHT==1.3.2

Ahh I see, thanks for the link.
I'll give it a try!

Hi @tungmeister
I've just followed your link but I can't access with ssh.
Could you show me what exactly you placed inside the file authorized_keys.
Mask your public key, I'm interested in understanding what to put inside.
I used the public key file saved using putty but it doesn't work.
Is there any ways to persist your change even in case of power cycling?

This error drives me crazy
Thanks

I think docker commit homeassistant homeassistant/raspberrypi3-homeassistant (after running the other command) should make it survive reboots

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grantalewis picture grantalewis  路  145Comments

neotrunks picture neotrunks  路  169Comments

Ciqsky picture Ciqsky  路  129Comments

raccettura picture raccettura  路  142Comments

Bergasha picture Bergasha  路  176Comments