SI7021 on sonoff basic

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

SI7021 on sonoff basic

#1 Post by novembre62 » 20 May 2021, 18:03

Hello,
is it possible to use the Sonoff SI7021 sensor with jack on a basic sonoff (3 wires .... Vcc-Gnd-Data) ??
... I tried it .. but without success .... measures = nan

thank you

TD-er
Core team member
Posts: 4868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SI7021 on sonoff basic

#2 Post by TD-er » 20 May 2021, 21:13

The itead wiki suggests to use a 10k pull-up resistor and some capacitor: https://www.itead.cc/wiki/Sonoff_Sensor_Si7021
Also what GPIO pin are you using?

novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

Re: SI7021 on sonoff basic

#3 Post by novembre62 » 21 May 2021, 14:29

Hello,
I use sonoff basic
with 20000 - Mega v2.0.0-dev13
I connected the sensor to the Gpio 14 with 10 k pul-up resistor (at the moment I don't have the capacitor)
device = DHT 11-12-22
DHT type DHT 12
..but it doesn't work --- nan
i also tried the gpio 1 and 3, but it doesn't work

I tried on other sonoff basic with Tasmota ... and the sensor works regularly

User avatar
Ath
Normal user
Posts: 885
Joined: 10 Jun 2018, 12:06
Location: NL

Re: SI7021 on sonoff basic

#4 Post by Ath » 21 May 2021, 14:56

Please pick a more current release from Github: https://github.com/letscontrolit/ESPEasy/releases
/Ton

novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

Re: SI7021 on sonoff basic

#5 Post by novembre62 » 22 May 2021, 18:21

... I tried the sensor with
ESP_Easy_mega_20210223_normal_ESP8285_1M
..the measures are there, but then ..nan ... then again ok..ecc.

from log
DHT: Protocol Timeout

User avatar
Ath
Normal user
Posts: 885
Joined: 10 Jun 2018, 12:06
Location: NL

Re: SI7021 on sonoff basic

#6 Post by Ath » 22 May 2021, 18:59

The symptoms seem to point at connection issues.
What is the length of the wires? And the quality of the connection? Are there extra connectors/solderings made to extend the length of the wires?
/Ton

novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

Re: SI7021 on sonoff basic

#7 Post by novembre62 » 22 May 2021, 20:14

very short wire length 15 cm
connections ok.....solderings ok
used Gpio 1 and 3


but cyclically...DHT Protocol Timeout

User avatar
Ath
Normal user
Posts: 885
Joined: 10 Jun 2018, 12:06
Location: NL

Re: SI7021 on sonoff basic

#8 Post by Ath » 22 May 2021, 20:27

And what Interval is the task set to?
/Ton

TD-er
Core team member
Posts: 4868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SI7021 on sonoff basic

#9 Post by TD-er » 23 May 2021, 01:15

GPIO 1 and 3 are normally used for serial.
Is use serial unchecked on the Tools=> Advanced page?

novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

Re: SI7021 on sonoff basic

#10 Post by novembre62 » 23 May 2021, 09:10

I have tried various intervals from 2 to 120 seconds ... but nothing changes
In advanced I have deselected serial ... otherwise I would not see any measurement

TD-er
Core team member
Posts: 4868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SI7021 on sonoff basic

#11 Post by TD-er » 23 May 2021, 09:47

The DHT type in the task is set to Sonoff Si7021?

The build I have running on my TH10/16 node (which is extremely stable) is from Dec 14 2018
Can you test such an old build from around that time?
Just to be sure later tweaks to that plugin may not have messed with your specific sensor as there have been some tweaks in the source of that sensor to make it work more reliable with some of the other supported sensors in that plugin.

These tweaks have been very minute, msec longer/shorter pulses etc.
For that reason I don't like those sensors as they require extremely timing critical ways of addressing.

novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

Re: SI7021 on sonoff basic

#12 Post by novembre62 » 23 May 2021, 21:27

i tried the build
ESP_Easy_mega-20181214_normal_ESP8285_1024

now
DHT: Checksum Error

interval = 60 sec

Code: Select all

181882: WD   : Uptime 3 ConnectFailures 0 FreeMem 15632
211882: WD   : Uptime 4 ConnectFailures 0 FreeMem 17200
231920: DHT  : Checksum Error
241882: WD   : Uptime 4 ConnectFailures 0 FreeMem 17200
271882: WD   : Uptime 5 ConnectFailures 0 FreeMem 17200
291920: DHT  : Temperature: 21.50
291920: DHT  : Humidity: 73.60
301882: WD   : Uptime 5 ConnectFailures 0 FreeMem 17200
331882: WD   : Uptime 6 ConnectFailures 0 FreeMem 17208
351920: DHT  : Temperature: 21.40
351920: DHT  : Humidity: 73.90
361882: WD   : Uptime 6 ConnectFailures 0 FreeMem 17192
391882: WD   : Uptime 7 ConnectFailures 0 FreeMem 17192
411920: DHT  : Checksum Error
421882: WD   : Uptime 7 ConnectFailures 0 FreeMem 17192
451882: WD   : Uptime 8 ConnectFailures 0 FreeMem 17152
471920: DHT  : Checksum Error
481882: WD   : Uptime 8 ConnectFailures 0 FreeMem 16984
511882: WD   : Uptime 9 ConnectFailures 0 FreeMem 16968
531920: DHT  : Temperature: 21.30
531920: DHT  : Humidity: 74.40
541882: WD   : Uptime 9 ConnectFailures 0 FreeMem 16968
571882: WD   : Uptime 10 ConnectFailures 0 FreeMem 16952
591920: DHT  : Temperature: 21.40
591920: DHT  : Humidity: 74.70
601882: WD   : Uptime 10 ConnectFailures 0 FreeMem 16936
631882: WD   : Uptime 11 ConnectFailures 0 FreeMem 16944
651920: DHT  : Temperature: 21.30
651920: DHT  : Humidity: 74.60
661882: WD   : Uptime 11 ConnectFailures 0 FreeMem 16928
691882: WD   : Uptime 12 ConnectFailures 0 FreeMem 15320
711920: DHT  : Temperature: 21.30
711920: DHT  : Humidity: 74.60
721882: WD   : Uptime 12 ConnectFailures 0 FreeMem 16888
751882: WD   : Uptime 13 ConnectFailures 0 FreeMem 16888
771920: DHT  : Temperature: 21.30
771920: DHT  : Humidity: 74.60
781882: WD   : Uptime 13 ConnectFailures 0 FreeMem 16872
811882: WD   : Uptime 14 ConnectFailures 0 FreeMem 16896
831920: DHT  : Temperature: 21.30
831920: DHT  : Humidity: 74.80
841882: WD   : Uptime 14 ConnectFailures 0 FreeMem 16880
871882: WD   : Uptime 15 ConnectFailures 0 FreeMem 15288
891920: DHT  : Temperature: 21.30
891920: DHT  : Humidity: 74.60
901882: WD   : Uptime 15 ConnectFailures 0 FreeMem 16864
931882: WD   : Uptime 16 ConnectFailures 0 FreeMem 16864
951920: DHT  : Checksum Error
961882: WD   : Uptime 16 ConnectFailures 0 FreeMem 16848
991882: WD   : Uptime 17 ConnectFailures 0 FreeMem 16848
1011920: DHT  : Checksum Error
1021882: WD   : Uptime 17 ConnectFailures 0 FreeMem 16848
1051882: WD   : Uptime 18 ConnectFailures 0 FreeMem 16832
1071920: DHT  : Temperature: 21.30
1071920: DHT  : Humidity: 74.80
I want to highlight that without pull-up resistor, nothing changes .... the measurements are taken in the same way

TD-er
Core team member
Posts: 4868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SI7021 on sonoff basic

#13 Post by TD-er » 23 May 2021, 21:53

Just wondering, how do you get this logging?
From serial or from the web log viewer?

novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

Re: SI7021 on sonoff basic

#14 Post by novembre62 » 23 May 2021, 22:01

..from the web log viewer

novembre62
Normal user
Posts: 23
Joined: 10 May 2019, 15:39
Location: italy

Re: SI7021 on sonoff basic

#15 Post by novembre62 » 10 Jun 2021, 11:03

Hello
I ask if it is possible to create a rule ... that when the measures are "nan" ... the previous valid value is considered

TD-er
Core team member
Posts: 4868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SI7021 on sonoff basic

#16 Post by TD-er » 10 Jun 2021, 18:36

Right now, there is not yet a check in the rules equivalent to isNan()

User avatar
ThomasB
Normal user
Posts: 789
Joined: 17 Jun 2018, 20:41
Location: USA

Re: SI7021 on sonoff basic

#17 Post by ThomasB » 10 Jun 2021, 21:54

Just as a reference, my Sonoff TH10 is using a AM2301 on GPIO-14 (plus a Switch Device on GPIO-0). The AM22301's temp/hum values updates at 5 sec intervals.

Firmware ESP_Easy_mega-20200305_normal_ESP8266.

In service for a year, No problems.

I don't know the pullup resistor value used on the TH10's GPIO-14. It appears that itead has removed all schematics from their site. Even the Sonoff wiki is gone. Anyone know where it all moved to?

You are using the SI7021, so my setup might not help you. But thought I'd share my details, especially if you decide to try out a AM2301.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests