DHT22 Error on device update


I get this error and the sensor doesn’t appear.

dht: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/dht.py", line 121, in update
  File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/dht.py", line 156, in update
    self.sensor, self.pin)
  File "/usr/local/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 94, in read_retry
    humidity, temperature = read(sensor, pin, platform)
  File "/usr/local/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 80, in read
    platform = get_platform()
  File "/usr/local/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 55, in get_platform
    from . import Raspberry_Pi_2
  File "/usr/local/lib/python3.6/site-packages/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'

I use a Raspberry Pi Zero wh with Hassio on Version 0.84.1.

This is my sensor config:

- platform: dht
  sensor: DHT22
  pin: 4
  temperature_offset: 0.0
  humidity_offset: 0.0
    - temperature
    - humidity

I’m sure the pins are properly connected.

Thanks for your help,

Are you using the 32 or 64 bit HassOS image?

The 64 bit version does not support GPIO.

Where so I get the information about the bit version?

I think there is only a 32 bit version for the zero.

No one an idea? I rewire the dht22 and installed a fresh new version of HASSIO (0.84.3) but I get the same error.

I’m wondering because of the "cannot import name Rapsberry Pi_2_Driver "-> I’m using a Raspberry Pi Zero
Has anyone a working DHT sensor on a Raspberry Pi Zero with HassIO?

HA uses the Adafruit_DHT libray. A quick search for issues running this on the pi zero did turn up compatibility problems.

Ah, thanks for your help! You are right. It seems that the Pi Zero is not supportet yet.