So it seems that the sensor can be seen on address 0x44 over I2C but the sht3xd component can’t set up the sensors. I have tried changing the frequency and timeouts to no avail. I have been able to put arduino onto the device using Arduino IDE and the SHT30 sensor works and pulls back results, but I was hoping to use ESPHome.
And double checked that the wires are attached - they seem to be fine. I tried with scan: true and the sensor can still be found, so I guess that means the wiring is ok? But I’m still getting the same:
[17:53:40.599][C][sht3xd:048]: SHT3xD:
[17:53:40.602][D][sht3xd:051]: Error reading serial number
[17:53:40.606][E][sht3xd:060]: Communication with SHT3xD failed!
[17:53:40.609][E][component:144]: sht3xd.sensor is marked FAILED: unspecified
The delay was because I saw something somewhere (I’ve lost the link now) where someone had a problem with the I2C taking a while to startup, so i tried the delay as that was suggested. It didn’t work though.
On the web server output both sensors just show as NA.
Is there any difference to using GPIO17 vs just “17”?
When I moved it to arduino I reflashed over USB in Arduino IDE and got some readings back from the temp/humidity sensors, then flashed idf also over USB in ESPHome but I reset the device first. So I haven’t moved between them OTA.
The wires are about 15cm long and worked in arduino ide while wired-in the same way as now. Would the “Found device at address 0x44” suggest correct wiring?
However, that does possibly present an issue with what I am trying to do. The plan here is to have a single POE-powered ESP32 with 5 temperature sensors. The ESP32 would sit in between 5 rooms and each sensor would spread out from there, with some being perhaps 10m away. It sounds like those wires would be too long for this?
Correct yes. But not necessarily good enough for i2c communication.
15cm sounds ok. So you are sure about the connections (not some flimsy breadboard setup with jumper wires) and your sensor is the one you linked with pullups onboard?
i2c is generally the wrong bus to use for those distances. It literally stands for Inter-Integrated Circuit I²C - Wikipedia
and was designed for communication on the same circuit board. 10cm is fine. 10m definitely not. But there are always ways to make things work.
For simple temperature and humidity I am a fan of the cheap BT ones that come with displays. I have almost a dozen around my home and they are great. The batteries last for months. I have one on my freezer and another in the refrigerator. It was easy.
LOL. Indeed. SHT31 working at …… drum roll …… 12 m. Non insulated twisted pair. Bit of trial and error getting which twist and whether the other twist had tolerance. Three years and running.
I’ve previously tried an update_interval of between 1 and 60s, but just cannot getting it working with esphome.
I’m not using a breadboard at the moment, currently just twisted the wires into the pins - perhaps that’s not as secure as it could be, but it was working in the same fashion in Arduino.
I was thinking I may have just used cat5/6 cabling for the sensor wiring, so it would be twisted pair, but it is sounding like I2C is simply the wrong commincation type for my project. It just needs to be basic temperature readings - humidity is a bonus, and it doesn’t need to be super accurate. They would be used to control IR heating.
At the moment I am using aqara zigbee sensors that have worked fine for me elsewhere, but for this set up, for some reason, I am having to change the batteries every few months even though there are barely any walls and the distances aren’t huge. I was hoping wired temperature sensors would just reduce the maintenance needed.
Perhaps single-wire DHT sensors would work better over the distances I’m trying to work at?
Decades ago there was wire wrap wire which was quite reliable, but that had square posts with sharp edges which allowed gas tight connections. If you just hand wrapped random wire on circular cross section pins, you likely have a marginal/sketchy connection which could be part of your problem (but might work just fine sometimes).
For just temperature real DS18B20 sensors are great. Even many of the counterfeit ones work pretty well (but some not so much). I have some that are going on for more than a decade and some that last only a month or two. My compost pile is the real test as it is hot and wet and I have run through at least a dozen sensors there. The goat yard is also hard, but that is more because one of my goats like chewing on things that are not food.
But really, long distances are hard for communication and most sensors don’t have protocols that work well over great distances. It can be done, but I just add more nodes, since Wi-Fi does work well over long distances.
Had any luck with the sht30 sensor yet? I have the same sensor (adafruit 5064, and three of them) and cannot get them to work… So strange… Have a couple SHT4x and they work great… But get this error with every kind of setting I try…
[21:42:18.756][D][sht3xd:051]: Error reading serial number
[21:42:18.756][E][sht3xd:060]: Communication with SHT3xD failed!
[21:42:18.756][E][component:154]: sht3xd.sensor is marked FAILED: unspecified
Hello, I have the same problem. I’ve already tried changing the frequency and timeout in every possible way, but unfortunately without success. Is there a solution yet?