• 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
#21
do you have any else wired to your rasppi next to dht22?

i am using 3.3v with an 5.6k ohm resistor conntected to gpio and 3.3v. so i cant see any troubles in my wiring but i am using on 3.3v an 433receiver and on 5v an 433transmitter
maybe i will check without those connected on the weekend.
so far, thx for your fast response and help
 
Reply
#22
433 TX and RX on 5v
DHT22 on 3.3v

With the latest code it's running fine for 7 hours.

Still running perfectly.
 
Reply
#23
With latest dht22 protocol 1.1 from dev repo the daemon quits a few seconds after being launched with this error output:

Code:
[Jun 12 07:32:36:370907] pilight-daemon: ERROR: ----- Thread Profiling -----
[Jun 12 07:32:36:372668] pilight-daemon: ERROR: - thread lirc: 0.012946%
[Jun 12 07:32:36:373848] pilight-daemon: ERROR: - [b]thread dht22: 93.791229%[/b]
[Jun 12 07:32:36:375488] pilight-daemon: ERROR: - thread rpi_temp: 0.005361%
[Jun 12 07:32:36:377198] pilight-daemon: ERROR: - thread openweathermap: 0.000000%
[Jun 12 07:32:36:378860] pilight-daemon: ERROR: - thread openweathermap: 0.000000%
[Jun 12 07:32:36:379904] pilight-daemon: ERROR: - thread socket: 0.010502%
[Jun 12 07:32:36:381031] pilight-daemon: ERROR: - thread ssdp: 0.000808%
[Jun 12 07:32:36:381801] pilight-daemon: ERROR: - thread sender: 0.000000%
[Jun 12 07:32:36:382435] pilight-daemon: ERROR: - thread broadcaster: 0.055026%
[Jun 12 07:32:36:383010] pilight-daemon: ERROR: - thread updater: 0.028035%
[Jun 12 07:32:36:383740] pilight-daemon: ERROR: - thread 433gpio: 0.999350%
[Jun 12 07:32:36:384308] pilight-daemon: ERROR: - thread receive parser: 0.000000%
[Jun 12 07:32:36:385291] pilight-daemon: ERROR: - thread webserver worker #0: 0.682184%
[Jun 12 07:32:36:385963] pilight-daemon: ERROR: - thread webserver client: 0.003403%
[Jun 12 07:32:36:386771] pilight-daemon: ERROR: - thread webserver broadcast: 0.001152%
[Jun 12 07:32:36:387045] pilight-daemon: ERROR: - thread firmware upgrader: 0.004510%
[Jun 12 07:32:36:387857] pilight-daemon: ERROR: ----- Thread Profiling -----
[Jun 12 07:32:36:388432] pilight-daemon: ERROR: cpu usage still way too high 95.620722%, exiting

EDIT:

After closing any software and moving the pilight-webgui to another pi, it gets way better with the sensorpolling, i get now every 5th data right but about 4 tries are false (checksum was wrong). seems to be a power supply issue?
 
Reply
#24
Can you please use code tags.

There is clearly some issue with your DHT22 thread. The sensors is still working fine here. No issues at all in the log.
 
Reply
#25
Hooked up one myself (was sold to me as DHT22,looks like DHT22 but had AM2302 printed on in from http://www.vanallesenmeer.nl)
Using GPIO7 = wiringPi7 = Header pin
Using 3.3V and 4,7K resistor (yellow-purple-red-gold)
Defined it as dht22 protocol using gpio7.
Had a lot of Bad Checksum messages, but my connections were bad.

Now working fine!! So..maybe something wrong with the connections of betz0r?
 
Reply
#26
we have two pis with the exakt same wiring, one is working one not, so i guess it's the powersupply or sth like that, nothing that curlymo can resolve.

but we have another heavy issue here, which i will share in bug forum as we can't solve it ourselves.
 
Reply
#27
I just connected one AM2302 sensor to my Raspberry Pi and added it to my config. With protocol "DHT22" pilight crashes in 5 to 10 seconds after start. The weird thing is that with protocol "DHT11" the sensor seems to work. I have tried the polling interval between 5 and 60 seconds and that has no effect, it still crashes. What can cause the crashing?

pilight version is 5.0

Debug output with protocol "DHT22"
Code:
pi@raspberrypi ~ $ sudo pilight-daemon -D
[Nov 28 07:45:08:873131] pilight-daemon: DEBUG: removed protocol dht22
[Nov 28 07:45:08:875723] pilight-daemon: DEBUG: stopped protocol threads
[Nov 28 07:45:08:877538] pilight-daemon: DEBUG: freed options struct
[Nov 28 07:45:08:878816] pilight-daemon: DEBUG: loaded protocol dht22.so
[Nov 28 07:45:08:922997] pilight-daemon: DEBUG: -- start parsed config file --
{
        "vihrea": {
                "name": "Vihrea",
                "order": 1,
                "testi": {
                        "name": "Testi Valo",
                        "order": 1,
                        "type": 1,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "nexa_switch" ],
                        "id": [{
                                "id": 262688,
                                "unit": 0
                        }],
                        "state": "off",
                        "gui-readonly": 0
                }
        },
        "RpiTemp": {
                "name": "Raspberry Pi Temp.",
                "order": 2,
                "temperature": {
                        "name": "Temperature",
                        "order": 1,
                        "type": 3,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "rpi_temp" ],
                        "id": [{
                                "id": 1
                        }],
                        "temperature": 46540,
                        "poll-interval": 10,
                        "gui-show-temperature": 1,
                        "gui-decimals": 3,
                        "device-temperature-offset": 0,
                        "device-decimals": 3
                },
                "lampotila1": {
                        "name": "Lämpötila",
                        "order": 2,
                        "type": 3,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "dht22" ],
                        "id": [{
                                "gpio": 2
                        }],
                        "humidity": 45,
                        "temperature": 229,
                        "poll-interval": 30,
                        "device-humidity-offset": 0,
                        "gui-show-humidity": 1,
                        "gui-show-temperature": 1,
                        "gui-decimals": 1,
                        "device-temperature-offset": 0,
                        "device-decimals": 1
                }
        },
        "auto": {
                "name": "Auto",
                "order": 3,
                "lammitys": {
                        "name": "Lämmitys",
                        "order": 1,
                        "type": 1,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "nexa_switch" ],
                        "id": [{
                                "id": 262698,
                                "unit": 0
                        }],
                        "state": "off",
                        "gui-readonly": 0
                },
                "lampotila": {
                        "name": "Lämpötila",
                        "order": 2,
                        "type": 3,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "tfa" ],
                        "id": [{
                                "id": 167,
                                "channel": 1
                        }],
                        "temperature": 616,
                        "humidity": 0,
                        "battery": 1,
                        "gui-decimals": 1,
                        "gui-show-humidity": 0,
                        "gui-show-battery": 1,
                        "gui-show-temperature": 1,
                        "device-humidity-offset": 0,
                        "device-temperature-offset": 0,
                        "device-decimals": 2
                }
        },
        "olohuone": {
                "name": "Olohuone",
                "order": 4,
                "subbari": {
                        "name": "Subbari",
                        "order": 1,
                        "type": 1,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "nexa_switch" ],
                        "id": [{
                                "id": 262708,
                                "unit": 0
                        }],
                        "state": "off",
                        "gui-readonly": 0
                }
        },
        "ulko": {
                "name": "Ulkovalot",
                "order": 5,
                "etuulkovalot": {
                        "name": "Etu Ulkovalot",
                        "order": 1,
                        "type": 1,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "nexa_switch" ],
                        "id": [{
                                "id": 262718,
                                "unit": 0
                        }],
                        "state": "off",
                        "gui-readonly": 0
                },
                "paatyulkovalo": {
                        "name": "Paaty Ulkovalo",
                        "order": 2,
                        "type": 1,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "nexa_switch" ],
                        "id": [{
                                "id": 262728,
                                "unit": 0
                        }],
                        "state": "off",
                        "gui-readonly": 0
                },
                "etuistallasulkovalo": {
                        "name": "Etu Ist Allas Ulkovalo",
                        "order": 3,
                        "type": 1,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "nexa_switch" ],
                        "id": [{
                                "id": 262738,
                                "unit": 0
                        }],
                        "state": "off",
                        "gui-readonly": 0
                },
                "temperature": {
                        "name": "Nousu&Lasku / T & H2O",
                        "order": 4,
                        "type": 3,
                        "uuid": "0000-00-00-df-82ca98",
                        "origin": "0000-00-00-df-82ca98",
                        "timestamp": 0,
                        "protocol": [ "openweathermap" ],
                        "id": [{
                                "location": "jyvaskyla",
                                "country": "fi"
                        }],
                        "humidity": 10000,
                        "temperature": 100,
                        "sunrise": 903,
                        "sunset": 1505,
                        "sun": "rise",
                        "poll-interval": 900,
                        "min-interval": 600,
                        "gui-show-update": 1,
                        "gui-show-sunriseset": 1,
                        "gui-show-temperature": 1,
                        "gui-show-humidity": 1,
                        "gui-decimals": 2,
                        "device-decimals": 2
                }
        }
}
[Nov 28 07:45:08:945197] pilight-daemon: DEBUG: -- end parsed config file --
[Nov 28 07:45:08:947054] pilight-daemon: INFO: daemon listening to port: 5000
[Nov 28 07:45:08:962898] pilight-daemon: DEBUG: new thread lirc, 1 thread running
[Nov 28 07:45:08:966694] pilight-daemon: DEBUG: new thread rpi_temp, 2 threads running
[Nov 28 07:45:08:974216] pilight-daemon: DEBUG: new thread dht22, 3 threads running
[Nov 28 07:45:08:976964] pilight-daemon: DEBUG: new thread openweathermap, 4 threads running
[Nov 28 07:45:08:984093] pilight-daemon: DEBUG: new thread socket, 5 threads running
[Nov 28 07:45:08:986427] pilight-daemon: DEBUG: new thread sender, 6 threads running
[Nov 28 07:45:08:990715] pilight-daemon: DEBUG: new thread broadcaster, 7 threads running
[Nov 28 07:45:08:990715] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 51656
[Nov 28 07:45:08:993808] pilight-daemon: DEBUG: client fd: 8
[Nov 28 07:45:08:994750] pilight-daemon: DEBUG: client id: 1
[  Nov 28 07:45:09:3118] pilight-daemon: DEBUG: new thread updater, 8 threads running
[  Nov 28 07:45:09:7124] pilight-daemon: DEBUG: webserver listening to port 5001
[  Nov 28 07:45:09:8804] pilight-daemon: DEBUG: new thread 433gpio, 9 threads running
[ Nov 28 07:45:09:13170] pilight-daemon: DEBUG: new thread receive parser, 10 threads running
[ Nov 28 07:45:09:14877] pilight-daemon: DEBUG: new thread webserver worker #0, 11 threads running
[ Nov 28 07:45:09:23143] pilight-daemon: DEBUG: new thread webserver client, 12 threads running
[ Nov 28 07:45:09:32901] pilight-daemon: DEBUG: new thread webserver broadcast, 13 threads running
[ Nov 28 07:45:09:36776] pilight-daemon: DEBUG: new thread firmware upgrader, 14 threads running
[ Nov 28 07:45:09:36776] pilight-daemon: DEBUG: ssdp sent search
[Nov 28 07:45:09:132578] pilight-daemon: DEBUG: no pilight ssdp connections found
[Nov 28 07:45:09:133583] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 51659
[Nov 28 07:45:09:133791] pilight-daemon: DEBUG: client fd: 15
[Nov 28 07:45:09:133931] pilight-daemon: DEBUG: client id: 2
[Nov 28 07:45:09:135251] pilight-daemon: DEBUG: socket recv: {"message":"client gui"}
[Nov 28 07:45:09:137818] pilight-daemon: DEBUG: socket write succeeded: {"message":"accept client"}

[Nov 28 07:45:09:142635] pilight-daemon: INFO: client recognized as gui
[Nov 28 07:45:09:143811] pilight-daemon: DEBUG: socket write succeeded: {"message":"client gui"}

[Nov 28 07:45:09:977039] pilight-daemon: DEBUG: socket write succeeded: {"origin":"config","type":3,"uuid":"0000-00-00-df-82ca98","devices":{"RpiTemp":[ "temperature" ]},"values":{"timestamp":1417153509,"temperature":48692}}

[Nov 28 07:45:09:980088] pilight-daemon: DEBUG: broadcasted: {"origin":"config","type":3,"uuid":"0000-00-00-df-82ca98","devices":{"RpiTemp":[ "temperature" ]},"values":{"timestamp":1417153509,"temperature":48692}}
[Nov 28 07:45:09:982945] pilight-daemon: DEBUG: broadcasted: {"code":{"id":1,"temperature":48692},"origin":"receiver","protocol":"rpi_temp","uuid":"0000-00-00-df-82ca98"}
[Nov 28 07:45:10:114483] pilight-daemon: DEBUG: socket write succeeded: {"origin":"config","type":3,"devices":{"ulko":[ "temperature" ]},"values":{"timestamp":1417153510,"humidity":10000,"temperature":200,"sunrise":906,"sunset":1503,"sun":"set"}}

[Nov 28 07:45:10:117292] pilight-daemon: DEBUG: broadcasted: {"origin":"config","type":3,"devices":{"ulko":[ "temperature" ]},"values":{"timestamp":1417153510,"humidity":10000,"temperature":200,"sunrise":906,"sunset":1503,"sun":"set"}}
[Nov 28 07:45:10:119849] pilight-daemon: DEBUG: broadcasted: {"code":{"location":"jyvaskyla","country":"fi","temperature":200,"humidity":10000,"sunrise":906,"sunset":1503,"sun":"set"},"origin":"receiver","protocol":"openweathermap","uuid":"0000-00-00-df-82ca98"}
[Nov 28 07:45:10:503976] pilight-daemon: DEBUG: dht22 data checksum was wrong
[Nov 28 07:45:13:233124] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":55.03008796734908,"ram":0.4501366486254756},"origin":"config","type":-1,"uuid":"0000-00-00-df-82ca98"}

[Nov 28 07:45:13:235538] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":55.03008796734908,"ram":0.4501366486254756},"origin":"config","type":-1,"uuid":"0000-00-00-df-82ca98"}
[Nov 28 07:45:14:234648] pilight-daemon: ERROR: ----- Thread Profiling -----
[Nov 28 07:45:14:238708] pilight-daemon: ERROR: - thread lirc: 0.000000%
[Nov 28 07:45:14:242717] pilight-daemon: ERROR: - thread rpi_temp: 0.000000%
[Nov 28 07:45:14:243743] pilight-daemon: ERROR: - thread dht22: 0.000000%
[Nov 28 07:45:14:244673] pilight-daemon: ERROR: - thread openweathermap: 0.000000%
[Nov 28 07:45:14:245084] pilight-daemon: ERROR: - thread socket: 0.000000%
[Nov 28 07:45:14:246080] pilight-daemon: ERROR: - thread sender: 0.000000%
[Nov 28 07:45:14:246825] pilight-daemon: ERROR: - thread broadcaster: 0.000000%
[Nov 28 07:45:14:253282] pilight-daemon: ERROR: - thread updater: 0.000000%
[Nov 28 07:45:14:254015] pilight-daemon: ERROR: - thread 433gpio: 0.000000%
[Nov 28 07:45:14:254697] pilight-daemon: ERROR: - thread receive parser: 0.000000%
[Nov 28 07:45:14:255607] pilight-daemon: ERROR: - thread webserver worker #0: 0.000000%
[Nov 28 07:45:14:257853] pilight-daemon: ERROR: - thread webserver client: 0.000000%
[Nov 28 07:45:14:258833] pilight-daemon: ERROR: - thread webserver broadcast: 0.000000%
[Nov 28 07:45:14:259285] pilight-daemon: ERROR: - thread firmware upgrader: 0.000000%
[Nov 28 07:45:14:260201] pilight-daemon: ERROR: ----- Thread Profiling -----
[Nov 28 07:45:14:260534] pilight-daemon: ERROR: cpu usage way too high 94.479592
[Nov 28 07:45:14:261555] pilight-daemon: ERROR: checking again in 10 seconds
[Nov 28 07:45:20:236599] pilight-daemon: DEBUG: socket write succeeded: {"origin":"config","type":3,"uuid":"0000-00-00-df-82ca98","devices":{"RpiTemp":[ "temperature" ]},"values":{"timestamp":1417153520,"temperature":48692}}

[Nov 28 07:45:20:242662] pilight-daemon: DEBUG: broadcasted: {"origin":"config","type":3,"uuid":"0000-00-00-df-82ca98","devices":{"RpiTemp":[ "temperature" ]},"values":{"timestamp":1417153520,"temperature":48692}}
[Nov 28 07:45:20:245249] pilight-daemon: DEBUG: broadcasted: {"code":{"id":1,"temperature":48692},"origin":"receiver","protocol":"rpi_temp","uuid":"0000-00-00-df-82ca98"}
[Nov 28 07:45:25:264258] pilight-daemon: ERROR: ----- Thread Profiling -----
[Nov 28 07:45:25:268255] pilight-daemon: ERROR: - thread lirc: 0.013310%
[Nov 28 07:45:25:269707] pilight-daemon: ERROR: - thread rpi_temp: 0.006892%
[Nov 28 07:45:25:272669] pilight-daemon: ERROR: - thread dht22: 94.729788%
[Nov 28 07:45:25:273706] pilight-daemon: ERROR: - thread openweathermap: 0.000000%
[Nov 28 07:45:25:274075] pilight-daemon: ERROR: - thread socket: 0.000000%
[Nov 28 07:45:25:274961] pilight-daemon: ERROR: - thread sender: 0.000000%
[Nov 28 07:45:25:275327] pilight-daemon: ERROR: - thread broadcaster: 0.025751%
[Nov 28 07:45:25:276256] pilight-daemon: ERROR: - thread updater: 0.023297%
[Nov 28 07:45:26:235853] pilight-daemon: ERROR: - thread 433gpio: 0.021107%
[Nov 28 07:45:26:236965] pilight-daemon: ERROR: - thread receive parser: 0.000000%
[Nov 28 07:45:26:237895] pilight-daemon: ERROR: - thread webserver worker #0: 0.010541%
[Nov 28 07:45:26:239068] pilight-daemon: ERROR: - thread webserver client: 0.001118%
[Nov 28 07:45:26:239718] pilight-daemon: ERROR: - thread webserver broadcast: 0.000367%
[Nov 28 07:45:26:241162] pilight-daemon: ERROR: - thread firmware upgrader: 0.007303%
[Nov 28 07:45:26:241583] pilight-daemon: ERROR: ----- Thread Profiling -----
[Nov 28 07:45:26:242584] pilight-daemon: ERROR: cpu usage still way too high 94.917393%, exiting
 
Reply
#28
pilight doesn't crash Smile It gracefully stops. Can you try the latest nightly?
 
Reply
#29
Ok, I will try the latest nightly. I will try it this weekend just have to find another memory card where to install it.
 
Reply
#30
I finally had time to test the latest nightly and DHT22/AM2302 in it. Still not working. pilight keeps running ok but I'm getting error "dht22 data checksum was wrong". I can read the sensor values with Adafruit so the problem I should not be in the connections.

Code:
sudo pilight-daemon -V
pilight-daemon version 5.0, commit v5.0-111-g9e7f15c
 
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,347 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,989 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,184 01-02-2016, 05:26 PM
Last Post: kniazio

Forum Jump:


Browsing: 1 Guest(s)