Hello all,
I have just purchased a couple of these devices https://www.adafruit.com/product/5400 to connect Sensors via STEMMA QT and send data to Home Assistant.
After adopting the Device into ESPHome the Sensor's Green Power-On led turns off, as well as all the leds on this esp device. I will say that I had tried connecting some male header pins to the pins on the device, and the other end is a STEMMA QT connector to the sensor, and that does work, but the STEMMA QT port on the device is no longer working.` Multiple sensors don't work, multiple cables don't work, and the second device had the cable connected with the sensor led on, and as I said above, the led shut off after adoption was complete(or maybe while it was adopting).
When I try to add Sensor code to use the device via the yaml file, here are part of the logs:`
[C][i2c.arduino:052]: I2C Bus:
[17:45:40][C][i2c.arduino:053]: SDA Pin: GPIO21
[17:45:40][C][i2c.arduino:054]: SCL Pin: GPIO22
[17:45:40][C][i2c.arduino:055]: Frequency: 50000 Hz
[17:45:40][C][i2c.arduino:061]: Recovery: failed, SCL is held low on the bus
[17:45:40][i2c.arduino:068]: Results from i2c bus scan:
[17:45:40][E][i2c.arduino:076]: Unknown error at address 0x08...
.....(for every port)...
...
...
[17:45:41][E][i2c.arduino:076]: Unknown error at address 0x77
[17:45:41][C][shtcx:059]: SHTCx:
[17:45:41][C][shtcx:060]: Model: SHTC3 (0000)
[17:45:41][C][shtcx:061]: Address: 0x70
[17:45:41][E][shtcx:063]: Communication with SHTCx failed!
------------
yaml which worked previously.
-------------
i2c:
sensor:
- platform: shtcx
temperature:
name: "Temperature"
humidity:
name: "Humidity"
update_interval: 5s
----------------------------`
I'm not sure if this is something I should report to here, or on Home Assistant forums (or maybe both?), but I figured I would post this here to at least share this issue with you at Adafruit as it is your device.
I also want to note I previous purchased https://www.adafruit.com/product/3619 which also pairs with home assistant and I can plug the male header pins into the ports and they work fine together sending data to Home Assistant.... However, I purchased this as well https://www.adafruit.com/product/5483 and it wont pair with Home ASsistant, so I cannot tell if STEMMA QT Ports don't work in general, or what. So far I'm having bad luck with devices not working with HA and ESPHome.
Has anyone else ran into any issues like this? I purchased 2 of these new devices, one to replace the TFT that didn't work, and now I have 3 that don't seem to work. I would love to get these working, at least the 2 new ones, so I can use them for their intended purposes.
Thank you for any help.
STEMMA QT Port stops working after adopting ESPS2 V2 with ESPHome on Home Assistant
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Uganodian
- Posts: 70
- Joined: Wed Dec 02, 2015 2:47 am
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: STEMMA QT Port stops working after adopting ESPS2 V2 with ESPHome on Home Assistant
As a way to sanity check the basic I2C setup, try running this I2C scanner:
https://learn.adafruit.com/scanning-i2c ... ng-testbed
Run that and post the output in the Serial Monitor here.
https://learn.adafruit.com/scanning-i2c ... ng-testbed
Run that and post the output in the Serial Monitor here.
- Uganodian
- Posts: 70
- Joined: Wed Dec 02, 2015 2:47 am
Re: STEMMA QT Port stops working after adopting ESPS2 V2 with ESPHome on Home Assistant
Thank you for the information. I would have to download and start learning the Arduino IDE for this, and I'm not sure if it's needed for this.adafruit_support_carter wrote: ↑Mon Dec 05, 2022 2:52 pm As a way to sanity check the basic I2C setup, try running this I2C scanner:
https://learn.adafruit.com/scanning-i2c ... ng-testbed
Run that and post the output in the Serial Monitor here.
The I2C connection from what Isee works without the STEMMA QT, by using the SDA and SCL ports, if you would like i can finish the setup with the sensor connectors to the pins themselves to show that it's working, while the STEMMA QT port isn't.. Will update.
EDIT: using the actual pins and setting info in Yaml to
i2c:
sda: 22
scl: 20
I get
[16:53:38][C][i2c.arduino:052]: I2C Bus:
[16:53:38][C][i2c.arduino:053]: SDA Pin: GPIO22
[16:53:38][C][i2c.arduino:054]: SCL Pin: GPIO20
[16:53:38][C][i2c.arduino:055]: Frequency: 50000 Hz
[16:53:38][C][i2c.arduino:058]: Recovery: bus successfully recovered
[16:53:38][i2c.arduino:068]: Results from i2c bus scan:
[16:53:38][i2c.arduino:074]: Found i2c device at address 0x70
However, when using this setup with the STEMMAQT port, I get the same as above, no I2C Device found.
Also to note, Home Assistant uses "WIRE" as one of their libraries which from the link you sent me, is also what Arduino uses in one of their examples, so I assume that's the same scanner for both. It also mentions arduino so it might be the same thing in either case.
So basically I'm stuck with STEMMAQT ports that aren't working for some reason... I tried changing the "Board" type and got errors, but it seems that shouldn't affect anything, especially when it works with the pins.
Any thoughts? Thank you.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: STEMMA QT Port stops working after adopting ESPS2 V2 with ESPHome on Home Assistant
The header pins and the STEMMA QT pins are the same SCL / SDA pins. So header vs. STEMMA QT connector should not matter.
One thing to pay attention to is the I2C bus power. The Feather ESP32 V2 has low power features, and one of those is the I2C bus has controllable power. So you must make sure your code is enabling power.
There's a dedicated GPIO pin for controlling I2C power:
https://learn.adafruit.com/adafruit-esp ... or-3112257
One thing to pay attention to is the I2C bus power. The Feather ESP32 V2 has low power features, and one of those is the I2C bus has controllable power. So you must make sure your code is enabling power.
There's a dedicated GPIO pin for controlling I2C power:
https://learn.adafruit.com/adafruit-esp ... or-3112257
- Uganodian
- Posts: 70
- Joined: Wed Dec 02, 2015 2:47 am
Re: STEMMA QT Port stops working after adopting ESPS2 V2 with ESPHome on Home Assistant
Thank you very much, this is probably it since all of the LEDs shut off after doing the adoption, so maybe the pin that was originally set to high, was overwritten.adafruit_support_carter wrote: ↑Mon Dec 05, 2022 6:15 pm The header pins and the STEMMA QT pins are the same SCL / SDA pins. So header vs. STEMMA QT connector should not matter.
One thing to pay attention to is the I2C bus power. The Feather ESP32 V2 has low power features, and one of those is the I2C bus has controllable power. So you must make sure your code is enabling power.
There's a dedicated GPIO pin for controlling I2C power:
https://learn.adafruit.com/adafruit-esp ... or-3112257
I'm not really sure how to "set a pin high," but I'm trying to find some example code with not much luck.. Maybe you have some that i can work with? I'm not sure if I should be setting this in circuitpython/arduino or in ESPHome?
Thank you for all of your help!
EDIT: It looks like I got this working byconfiguring it with ESPHome.
YAML Code
switch:
- platform: gpio
pin: GPIO2
name: "poweron"
restore_mode: ALWAYS_ON
It also mentions in the installation that there GPIO2 is a "strapping pin" and that there can be issues with setting it because it's needed during boot. I don't run into any issues and the light on the Sensor is back on now, yay! The LED on the board still doesn't work, but at least we fixed the main issue.
I guess this is my fault for no understanding/reading the docs properly. I assumed things would just work as is, but it seems that is not the case. I just thought it was odd there were lights and everything was okay before adoption, so I assume there was prebuilt code on these devices that pulled the pin high that was needed?
Please be positive and constructive with your questions and comments.