DHT22 Sensor does not show up in my screen

Folks,
I do run on my Raspberry 3 the latest Hassbian Index. While I just started with Home Assistant I struggle with my DHT22. My config looks like

sensor:

  • platform: yr
  • platform: synologydsm
    host: 192.168.1.xyz
    username: <…>.
    password: <…Y>
    monitored_conditions:
    • cpu_total_load
    • memory_real_usage
    • network_up
  • platform: dht
    sensor: DHT22
    pin: 4
    monitored_conditions:
    • temperature
    • humidity

The first Question I do have is what do you mean with PIN, the PIN or GPIO Port Number? Right now my sensor is connected to GPIO Port 4. I also tried 7, but I do not see any ICON of the DHT22 on my GUI. So my question is what went wrong and what is the problem`? Synology and Weather appears in the GUI, DHT22 not.

You need to use the GPIO number.

When you post your config for help be sure to use the “< / >” button to maintain your formatting.

Also, check your error log. Have you given the user hass access to your GPIO? If not enter “sudo adduser hass gpio” via the terminal.

Hi there,
there is no hass user on my Raspberr PI. All I have is: cut -d: -f1 /etc/passwd
root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
www-data
backup
list
irc
gnats
nobody
systemd-timesync
systemd-network
systemd-resolve
systemd-bus-proxy
pi
messagebus
avahi
ntp
sshd
statd
homeassistant
mosquitto

What config are you interested? I mean I posted the yaml above. What else do you need?

Folks,
just did the following

pi@raspberrypi:~ $ sudo adduser --system hass
Adding system user hass' (UID 110) ... Adding new user hass’ (UID 110) with group nogroup' ... Creating home directory /home/hass’ …
pi@raspberrypi:~ $ sudo usermod -G dialout -a hass
pi@raspberrypi:~ $ sudo mkdir /srv/hass
pi@raspberrypi:~ $ sudo chown hass /srv/hass
pi@raspberrypi:~ $ sudo adduser hass gpio
Adding user hass' to group gpio’ …
Adding user hass to group gpio
Done.

Still not showing up anywhere? How can i check on the commandline of the DHT22 device is working?

Still not showing up anywhere? How can i check on the commandline of the DHT22 device is working?

Still not showing up anywhere? How can i check on the commandline of the DHT22 device is working?

As requested before post your configuration and maintain the formatting using the < / > button.

Formatting is important in HA and can easily break a sensor.

I also asked what your error log is showing. This can also tell us where things are going wrong.

I provided the wrong command since you are on the hassbian image. it should be “sudo adduser homeassistant gpio” This will make sure that your homeassistant user has access to the GPIO pins.

This is my config:

  - platform: dht
    sensor: AM2302
    pin: '04'
    monitored_conditions:
      - temperature
      - humidity

That is nice but does not help in my case. Where does it show up in your config? I do not have any error, but do not see the content.

Does the sensor show up in your states panel?

Nope, nothing showed up on the default view. It is like deleting it from the config. I am not quite sure how to troubleshoot that so I can decide what went wrong?

Well I moved away from the Raspberry Pi Image to the Raspberry Pi All-In-One Installer and the config of:

  • platform: dht
    sensor: AM2302
    pin: ‘04’
    monitored_conditions:
    - temperature
    - humidity`

at least rises no more error when I run a hass --script check_config

When I change the AM2302 to the DHT22 which I use it says
Testing configuration at /home/hass/.homeassistant
16-11-16 09:35:02 ERROR (MainThread) [homeassistant.loader] Unable to find component customize
16-11-16 09:35:02 ERROR (MainThread) [homeassistant.loader] Unable to find component mewo
Failed config
General Errors:
- Component not found: customize
- Component not found: mewo

Successful config (partial)

Interesting enough as with the one time use of the AM2302 the error disappeared.

Still not apearing in the Home Asisstant GUI. Empty

As requested before please post your confit using the < \ > button so it displays correctly. (Note how your config displays and how the example I posted above displays)

Do you have ‘sensor’ in your config above what you posted above? Sensor is the component, without that the dht22 platform will not work.

Finally are you sure you have your sensor wired correctly? What pins on your sensor go to which GPIO numbers? If you have a DHT22 do you have the resistor wired in?

My config is a Raspberry Pi All-In-One Installer. my Config yaml looks like

# Weather Prediction

sensor:

  • platform: yr
  • platform: dht
    sensor: DHT22
    pin: ‘04’
    monitored_conditions:
    • temperature
    • humidity

The error logs shows nothing
16-11-16 17:40:55 homeassistant.bootstrap: Attempt made to setup wemo during setup of wemo
16-11-16 17:40:55 homeassistant.bootstrap: Component wemo failed to setup
16-11-16 17:40:55 homeassistant.bootstrap: Unable to prepare setup for platform switch.wemo because dependency wemo could not be initialized
16-11-16 17:40:56 homeassistant.bootstrap: Attempt made to setup wemo during setup of wemo
16-11-16 17:40:56 homeassistant.bootstrap: Component wemo failed to setup
16-11-16 17:40:56 homeassistant.bootstrap: Unable to prepare setup for platform switch.wemo because dependency wemo could not be initialized

HI Juergen,

I just connected the sensor and it worked fine.
Did notice, it did not show on the states page until after it was connected and after a restart of HAAS.

Config as follows:
sensor:
platform: dht
sensor: DHT22
pin: 4
monitored_conditions:
- temperature
- humidity

Connected to GPIO 4 (physical PIN 7 on header). .
Temperature reading seems correct, but humidity have to question, it’s reporting 1%
Also changed sensor to AM2302 and it also works.

Rob.

Folks,
it was a jumper on a wire which caused the problem. After rewiring everything is fine