• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


[Fully Supported] DHT22
#1
Hey,

i just received my DHT22 and startet to connect it to the pi.
For connecting the sensor i followd this tutorial.

with the supposed command
Code:
sudo ./Adafruit_DHT 2302 4
i get temperature values, so i guess, that the wiring and the sensor itself is working.

here's my config. I integrated it in my complete config and i can start the service without any problems.
Code:
"DHT22": {
                        "name": "Temperatur DHT22",
                        "protocol": [ "dht22" ],
                        "id": [{
                           "gpio": "7"    
                        }],
                        "humidity": 0,
                        "temperature": 0,
                        "settings": {
                            "interval": 5
                        }
                }

I do not get any updates and i don't have any idea whats going on.
Did I miss something or whtas wrong here?

best regards and thanks for your help

EDIT: Here's the right code, when the sensor is connectoed to wiringpi #7:
Code:
"DHT22": {
                        "name": "Temperatur DHT22",
                        "protocol": [ "dht22" ],
                        "id": [{
                           "gpio": 7    
                        }],
                        "humidity": 0,
                        "temperature": 0,
                        "settings": {
                            "interval": 5
                        }
                }
 
Reply
#2
The adafruit command you posted suggests that the dht22 is connected to GPIO 4, your pilight config is pointing to GPIO 7. What pin is it the dht22 connected to?
 
Reply
#3
Hey, i connected the sensor to GPIO #4 (so wiring pi 7)..
 
Reply
#4
Try wiringpi #4, based on http://wiringpi.com/pins/
 
Reply
#5
Changed the wiring, but don't get any signal in pilight. Using the command from the tutorial, i had to change the pin to 23 to get results from the terminal...
 
Reply
#6
You're mixing BCM and wiringPi pins.
 
Reply
#7
well.. pilight uses the wiringpi, so when i connect the sensor to the wiringpi #7 (BCM 4) the config i posted above should do it's job, right?
 
Reply
#8
I found the issues. Carefully compare your config with the example here: http://wiki.pilight.org/doku.php/dht22
 
Reply
#9
ah yes - i found it, too. Damn quote signs Wink

with
Code:
"DHT22": {
                        "name": "Temperatur DHT22",
                        "protocol": [ "dht22" ],
                        "id": [{
                           "gpio": 7    
                        }],
                        "humidity": 0,
                        "temperature": 0,
                        "settings": {
                            "interval": 5
                        }
                }

it works fine.
Sry for my blindness - i think i just looked too long on the code.

You can close this thread.

Thx for all your help.
 
Reply
#10
Is it possible that you've forgot to add the gui-show-humidtiy in the .c of latest commit for the dht22?

best regards
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
Lightbulb [Fully Supported] Kaku Door sensor (AMST-606) geerttttt 53 23,924 10-19-2019, 06:26 PM
Last Post: curlymo
  [Partially Supported] TFA / Conrad Weather Yves 184 10,346 03-31-2019, 05:22 PM
Last Post: curlymo
  [Fully Supported] Arctech Old Martin 111 34,922 03-27-2018, 04:43 PM
Last Post: genfersee
  [Fully Supported] Clarus Switches Marcin 69 23,988 01-30-2018, 07:10 PM
Last Post: Niek
  [Fully Supported] Remote Control Socket (RC101-U/RC201) Sean 18 10,514 01-04-2018, 06:18 AM
Last Post: ettman8
  [Fully Supported] LM75 and LM76 temperature sensor horst_dieter 64 24,769 11-19-2017, 08:54 PM
Last Post: edepi
  [Fully Supported] No-brand temp/humidity sensor (alecto_ws1700) meloen 57 34,872 12-25-2016, 09:53 PM
Last Post: creamers
  [Fully Supported] Impuls/SelectRemote Bram 113 47,005 05-28-2016, 02:53 PM
Last Post: Puuu
  [Fully Supported] KAKU ABST-604 (dusk/dawn sensor) Netopyr 15 7,593 03-04-2016, 05:43 PM
Last Post: Niek
  [Fully Supported] Arctech Dimmer (KaKu) fhp 107 40,183 01-02-2016, 05:26 PM
Last Post: kniazio

Forum Jump:


Browsing: 1 Guest(s)