• 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] DHT11
#1
Hi,

I've tested out the dht11 with pilight using the config found in the wiki, but it is displaying the wrong value.

When adding it as dht22 protocol it is giving me e.g. Humidity = 1024.00 % Temperature = 486.40 *C instead of Humidity = 40.0 % Temperature = 19.0 *C (66.2 *F).
With this protocol the values are updated in the gui.

When adding it as dht11 protocol nothing happens. The values are not updated!

I think the problem is based on the different ranges and accuracy of dht11 and dht22 (have a look at http://learn.adafruit.com/dht ). Maybe there is some kind of shift in the data.

The reference values I've mentioned are based on an examplecode found here: http://www.rpiblog.com/2012/11/interfaci...idity.html

I hope we can fix it!

I wish everyone a merry christmas!
 
Reply
#2
I already updated the development branch with a new dht11 version. Can you test that one?
 
Reply
#3
I've just cloned the latest development version and tried to do a ./setup.sh .

The process proceeds up to 90% and an error occured:
Quote:Scanning dependencies of target pilight-control
[ 90%] Building C object CMakeFiles/pilight-control.dir/control.c.o
Linking C executable pilight-control
libpilight.so: undefined reference to `inflate'
libpilight.so: undefined reference to `inflateEnd'
libpilight.so: undefined reference to `inflateInit2_'
collect2: ld returned 1 exit status
make[2]: *** [pilight-control] Fehler 1
make[1]: *** [CMakeFiles/pilight-control.dir/all] Fehler 2
make: *** [all] Fehler 2

I made a apt-get update & apt-get upgrade and also installed the latest version of wiringpi, but no sucess (gcc, build-essential, cmake and dialog are installed).

May you can help me to get rid of this compilation error.


Thanks for your efforts!
 
Reply
#4
You're missing the zlib-dev libs.
 
Reply
#5
Do you mean the zlib1g and zlib1g-dev package?
These packages were already installed but the error was still there. So I reinstalled them with
Quote:apt-get install --reinstall zlib1g zlib1g-dev

After that the setup process finished one time, but I could not start the daemon.
Using the -D option it says:
Quote:.
.
.
[Dec 26 12:53:20:644437] pilight-daemon: DEBUG: free from settings.c #420
[Dec 26 12:53:20:644525] pilight-daemon: DEBUG: free from settings.c #422
[Dec 26 12:53:20:644617] pilight-daemon: DEBUG: free from settings.c #426
[Dec 26 12:53:20:644967] pilight-daemon: DEBUG: realloc from log.c #60
[Dec 26 12:53:20:645102] pilight-daemon: DEBUG: malloc from log.c #60
[Dec 26 12:53:20:645209] pilight-daemon: DEBUG: garbage collected settings library
[Dec 26 12:53:20:645338] pilight-daemon: DEBUG: free from log.c #113
[Dec 26 12:53:20:645455] pilight-daemon: DEBUG: free from options.c #34
[Dec 26 12:53:20:645557] pilight-daemon: DEBUG: free from options.c #35
[Dec 26 12:53:20:645672] pilight-daemon: DEBUG: realloc from log.c #60
[Dec 26 12:53:20:645789] pilight-daemon: DEBUG: malloc from log.c #60
[Dec 26 12:53:20:645890] pilight-daemon: DEBUG: garbage collected options library
[Dec 26 12:53:20:646009] pilight-daemon: DEBUG: free from log.c #113
[Dec 26 12:53:20:646139] pilight-daemon: DEBUG: realloc from log.c #60
[Dec 26 12:53:20:646260] pilight-daemon: DEBUG: malloc from log.c #60
[Dec 26 12:53:20:646366] pilight-daemon: DEBUG: garbage collected socket library
[Dec 26 12:53:20:646483] pilight-daemon: DEBUG: free from log.c #113
[Dec 26 12:53:20:646597] pilight-daemon: DEBUG: free from daemon.c #1208
[Dec 26 12:53:20:646917] (null): DEBUG: free from gc.c #50
[Dec 26 12:53:20:647140] (null): DEBUG: free from gc.c #50
[Dec 26 12:53:20:647256] (null): DEBUG: free from gc.c #50
[Dec 26 12:53:20:647352] (null): DEBUG: free from gc.c #50

I thought it might be a faulty settings file, so I replaced it with the standard one, but no success.
So what can be the error here?
 
Reply
#6
Can you compile without the debug option on?
 
Reply
#7
I made a fresh git clone and reinstalled the zlib as described above.

Compiling with the standard configuration (extended memory debug option not choosen) gives me the inflate error again!
[edit...]
Ok, using setup the second time the process has finished, but starting the daemon failed:
Quote:[Dec 26 14:23:01:209759] pilight-daemon: DEBUG: freed options struct
[Dec 26 14:23:01:209907] pilight-daemon: DEBUG: freed options struct
[Dec 26 14:23:01:210052] pilight-daemon: DEBUG: freed options struct
[Dec 26 14:23:01:210186] pilight-daemon: DEBUG: garbage collected protocol library
[Dec 26 14:23:01:210332] pilight-daemon: DEBUG: garbage collected hardware library
[Dec 26 14:23:01:210496] pilight-daemon: DEBUG: garbage collected settings library
[Dec 26 14:23:01:210639] pilight-daemon: DEBUG: garbage collected options library
[Dec 26 14:23:01:210781] pilight-daemon: DEBUG: garbage collected socket library
 
Reply
#8
@CurlyMo, exactly as I had today but my daemon did start. Thought it was my Wink

http://www.pastebin.ca/2517866
 
Reply
#9
I see nothing critical.
 
Reply
#10
I've managed to setup the latest development build now. I don't know what was wrong, I tried it several times and now it is working Smile

But the DHT11 is still not working. Maybe it has something to do with an overflow, because there is a warning during setup:
Quote:/home/pi/pilight/libs/protocols/dht11.c: In function ‘dht11Parse’:
/home/pi/pilight/libs/protocols/dht11.c:116:18: warning: assuming signed overflow does not occur when simplifying ‘/’ or ‘%’ to ‘>>’ or ‘&’ [-Wstrict-overflow]
[ 48%] Building C object CMakeFiles/pilight.dir/libs/protocol

I tried to exchange the described parts, but dht11 is still not working.
The values are not updated- just the values written in the config.json are displayed.

It should also to be said that you have to use the option "decimals": 1, in your configuration file to get the values displayed in the right way.

Another question is: Can I use ds18b20 and dht11 in parallel?
I have them both connected to gpio7. The ds18b20 is displayed properly in pilight and the external script I described above is displaying the dht11 values, so I think pilight should also manage that?!?

I hope someone can help me.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Partially Supported] TFA / Conrad Weather Yves 184 3,840 03-31-2019, 05:22 PM
Last Post: curlymo
  [Fully Supported] DHT22 IcedEarth 86 27,861 11-18-2018, 09:33 AM
Last Post: curlymo
  [Fully Supported] Arctech Old Martin 111 31,504 03-27-2018, 04:43 PM
Last Post: genfersee
  [Fully Supported] Clarus Switches Marcin 69 21,263 01-30-2018, 07:10 PM
Last Post: Niek
  [Fully Supported] Remote Control Socket (RC101-U/RC201) Sean 18 9,207 01-04-2018, 06:18 AM
Last Post: ettman8
  [Fully Supported] LM75 and LM76 temperature sensor horst_dieter 64 22,623 11-19-2017, 08:54 PM
Last Post: edepi
  [Fully Supported] No-brand temp/humidity sensor (alecto_ws1700) meloen 57 32,159 12-25-2016, 09:53 PM
Last Post: creamers
Lightbulb [Fully Supported] Kaku Door sensor (AMST-606) geerttttt 50 21,839 11-29-2016, 06:52 AM
Last Post: curlymo
  [Fully Supported] Impuls/SelectRemote Bram 113 43,431 05-28-2016, 02:53 PM
Last Post: Puuu
  [Fully Supported] KAKU ABST-604 (dusk/dawn sensor) Netopyr 15 7,071 03-04-2016, 05:43 PM
Last Post: Niek

Forum Jump:


Browsing: 1 Guest(s)