SHT31-D

overmyhead

Community Member
View Badges
Joined
Sep 22, 2020
Messages
26
Reaction score
29
Location
GA
Rating - 0%
0   0   0
After setting up Reef-PI for my tank and liking how it functions, I figured I could use it for my terrariums. I currently have it running on 3 and am working on setting it up for a vivarium. I need to be able to monitor the humidity and saw that there is now a driver for the SHT31. How do you go about setting it up in Reef-PI. I can see that the sensor is connecting in i2cdetect. It is address 44. I have installed the driver in Reef-PI using address 44 but nothing shows. I have tried adding an analog connector using the SHT31 driver and using that for the ph sensor but it returns no values. Any help would be appreciated. I have tried following SHT20 Temperature Humidity With Reef-PI but the script has errors that stop it and I cannot figure out the problem.
 
OP
OP
O

overmyhead

Community Member
View Badges
Joined
Sep 22, 2020
Messages
26
Reaction score
29
Location
GA
Rating - 0%
0   0   0
After setting up Reef-PI for my tank and liking how it functions, I figured I could use it for my terrariums. I currently have it running on 3 and am working on setting it up for a vivarium. I need to be able to monitor the humidity and saw that there is now a driver for the SHT31. How do you go about setting it up in Reef-PI. I can see that the sensor is connecting in i2cdetect. It is address 44. I have installed the driver in Reef-PI using address 44 but nothing shows. I have tried adding an analog connector using the SHT31 driver and using that for the ph sensor but it returns no values. Any help would be appreciated. I have tried following SHT20 Temperature Humidity With Reef-PI but the script has errors that stop it and I cannot figure out the problem.
Not sure what changed. I tried manually installing a couple packages which had not changed the outcome. I did another restart just for hope and it started showing humidity. I moved the controller to the vivarium and put the sensor in and started it back up and the temp was being read but not the humidity. Restarted again and now both are working. @Ranjib is there a way to convert the temperature to Fahrenheit.
 

Litserv

Community Member
View Badges
Joined
May 3, 2020
Messages
62
Reaction score
60
Rating - 0%
0   0   0
Not sure what changed. I tried manually installing a couple packages which had not changed the outcome. I did another restart just for hope and it started showing humidity. I moved the controller to the vivarium and put the sensor in and started it back up and the temp was being read but not the humidity. Restarted again and now both are working. @Ranjib is there a way to convert the temperature to Fahrenheit.

Unfortunately, I am not able to get the SHT31D to work with Reef-Pi's own driver sht31d.
What are the actual steps to take to make the SHT31D temperature and humidity sensor read directly in Reef-Pi?
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
One thing to remember is that the address (see here) in table 8, is 0x44, that means it's 44 in hexadecimal.
Not sure, but if reefPi uses decimal addresses that would make it address #68 (4*16+4).

Another thing about humidity sensors: we have one in our lab and they can be notoriously inaccurate after some time. The offset value can drift like crazy, so if you don't regularly recalibrate them, like we do not, they can show a constant 0% humidity in an air conditioned room that's held at 40% ^^
 
Last edited:

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Are you seeing any specific error in the log? the process of adding the sensor is same as adding any i2c driver, just provide the i2c address (in decimal) and choose the appropriate driver type. If theres any i2c connectivity issue, it should appear in logs and ui. I have not tested it in some time, but i think i have a previous build ready that i can use for testing. I'll keep you updated . I cant recall if it supports the unit conversion..let me get back to you on this as well
 

Litserv

Community Member
View Badges
Joined
May 3, 2020
Messages
62
Reaction score
60
Rating - 0%
0   0   0
reefPi uses decimal addresses that would make it address #68 (4*16+4).
This seems to be the solution! I can see readings that seem to make sense. I just need to check the values over a longer time and compare them with the old solution - interface via a text file and a Python script.

unit conversion..
It looks like the temperature is measured in °C only. But this is very convenient for me as a citizen in Europe... :)

From time to time there are read errors from the SHT31D sensor, but only for humidity.

Thanks to all of you!
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
i just tested this yesterday, its working as expected for me. The centrigrade unit problem (and ability to convert it to Fahrenheit etc) is a feature gap that i have to do some dev work to address.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
yes.. as long as the formula can be expressed in simple math with a single variable (say "V") representing the raw value
That's a smart feature. I see in your example (9*(c/5) + 32) you have "c" but you mention "V" so a little confused on the variable name?
 
Back
Top