Giter Site home page Giter Site logo

Comments (10)

RobTillaart avatar RobTillaart commented on May 24, 2024

no plans, not familiar with that sensor.
how much different?
link to datasheet?

from dhtnew.

RobTillaart avatar RobTillaart commented on May 24, 2024

Found - https://forum.mysensors.org/topic/9462/low-power-temperature-humidity-node-with-sonoff-si7021
Adafruit has a library - #include "Adafruit_Si7021.h"

Seems to be a I2C device so it cannot be controlled by this library.
If there are no further questions you may close the issue.

from dhtnew.

Tomat7 avatar Tomat7 commented on May 24, 2024

Yes, original Si7021 is the chip with I2C bus, but ITEAD built "sensor with controller inside". So, sensor has 1-wire bus "like am2301" and compatible with all SonOff devices from TH-series.
The details, schema and other links:
https://itead.cc/product/sonoff-si7021/
https://wiki.iteadstudio.com/Sonoff_Sensor_Si7021
https://wiki.iteadstudio.com/images/7/7c/Sonoff_Si7021_Sensor_Schematic.pdf
https://kaspars.net/blog/sonoff-si7021
arendst/Tasmota#735 (comment)

Thanks.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 24, 2024

According to the links it should be an AM2301 compatible, and that should work.
You might try a run with the dhtnew_pulse_diag.ino sketch and post the output, to see if it indeed matches the protocol.

Assume it is DHT22 compatible, so forcing the type to 22 => dht.setType(22);

from dhtnew.

RobTillaart avatar RobTillaart commented on May 24, 2024

You might try a run with the dhtnew_pulse_diag.ino sketch and post the output

@Tomat7
did you try?
or do you have the sensor working?

As I do not have a SonOff Si7021 sensor I cannot do any testing if and where it fails.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 24, 2024

As there is no answer I assume the issue is solved.

from dhtnew.

Sukalo0290 avatar Sukalo0290 commented on May 24, 2024

Hey Rob, i'm just starting up on this.

I have a unit that can read both AM2301 and SI7021 sensors but the readings are different i assume due to some sort of offset. Would your code be able to detect the sensor and adjust the offset accordingly?

I'm struggling to get any of your example sketches to load any data, i'm using an esp32, are the data pins different to what you have designed the library for?

I can load the sketch onto the esp without fail but nothing happens.

If you plug each sensor into a sonoff controller it correctly reads both sensors the same but on mine the si7021 is out but a couple degrees and humidity % but not sure exactly what the offset is or how to auto detect it.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 24, 2024

@Sukalo0290

My library should support the AM2301 as it uses the same protocol as the DHT22.
I have no Si7021 sensor to verify if it works with the DHTNew library.

Note: these sensors are not super accurate - read datasheet for deviations.

From your post I understand you get readings from both (that is good) but they differ.
The library supports setHumOffset() and setTempOffset() to correct the raw values.


Would your code be able to detect the sensor and adjust the offset accordingly?

No, the library has no means to recognize the sensor.
The only exception is the DHT11 (+ compatible) which uses a different protocol.
These sensors do not have any unique ID that could be used for this.


I'm struggling to get any of your example sketches to load any data, i'm using an esp32, are the data pins different to what you have designed the library for?

You can adjust data pins in the constructor DHTNEW(uint8_t pin) to your configuration


If you plug each sensor into a sonoff controller it correctly reads both sensors the same but on mine the si7021 is out but a couple degrees and humidity % but not sure exactly what the offset is or how to auto detect it.

No idea, no experience with sonoff controllers unfortunately.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 24, 2024

@Sukalo0290
Any other questions, if not I close this issue.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 24, 2024

@Tomat7
@Sukalo0290
FYI
In version 0.4.14 I added experimental support for the Sonoff Si7021 in the DHTNEW library.
The code is based on work of @phiguimaran, see issue #79

from dhtnew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.