maxxer
(Maxxer)
November 22, 2019, 5:52pm
1
Hi.
I’ve been given a SHT20 sensor to be connected to the Raspberry I2C port. I see there’s no component for this specific sensor but exists for SHT31. Unfortunately from the code I see the device has a hardcoded set of i2c addresses (0x44~0x45), unfortunately the SHT20 is fixed to 0x40 so it’s out of range. And from the datasheet it doesn’t seem possible to change it.
From the information I gathered so far it seems that I need to give up. Anyone has a better option?
Thanks
paul_c5x4
(Paul)
November 23, 2019, 11:15pm
3
Why not edit the code at line 34 and replace the 0x44 with 0x40 ?
Just because the code says you can’t use an address doesn’t mean you have to give up.
maxxer
(Maxxer)
November 26, 2019, 2:29pm
4
Unfortunately there’s another check outside the module:
Invalid config for [sensor.sht31]: value must be at least 68 for dictionary value @ data['i2c_address']. Got 64.
Olivier974
(Electronlibre)
April 3, 2022, 11:43am
5
Hello @maxxer ,
have you found a solution,
my sht20 is recognize in EspHome with an adress of 0x44, not 0x40 like its hardcoded in the uFire_SHT20 library,
so i modify and include the modify library but it doesnt work better…
Thanks
Olivier974
(Electronlibre)
April 3, 2022, 12:21pm
6
maxxer:
SHT31
Hello,
i found the solution…bought a SHT20 and they send me a SHT31…
For the SHT20, it works for esphome and a Wemos D1 mini or Esp32 :
https://community.home-assistant.io/t/sht20-in-esphome-on-d1-mini/366203/5
maxxer
(Maxxer)
April 14, 2022, 6:46pm
7
I’m sorry I cannot recall. Maybe @frompani which worked with me can
1 Like
frompani
(Frompani)
April 14, 2022, 8:32pm
8
Finally , We’ve used an sht3x with 0x44 or 0x45 address. So I cant help with sht20,Sorry.
At home I used sht35 with esp8266 and esp32, both with esphome and espeasy (domoticz),works like a charme !
Ciao
F
1 Like
Olivier974
(Electronlibre)
April 16, 2022, 4:17pm
9
same for me, as i update in my last POST: bought a SHT20 and they send me a SHT31…
SHT3x can be add in Esphome without any trouble and work great : https://esphome.io/components/sensor/sht3xd.html
thanks for you reply anyway