I don’t know where the documentation is for platform options is, maybe take away the indent. The other thing would be to dig through the similar issues to see how it’s formatted.
I’ve scoured the forums here, but came up empty. Now that it’s a PlatformIO officially supported board, I figured the configuration would be pretty straightforward. Any ideas?
I am not sure if you are still looking in to this or got it to work but as I used this community to help make it work for me just wanted to reply that I have been able to get the Feather ESP32-S2 working with ESPHome and I’ll share what my config was like, I have ESPHome running on a Unraid in a docker on a amd64 architecture so that gets over the issue with some architectures not supporting compiling with esp-idf framework. This example uses the adafruit SHT40 breakout to sense temp/humidity
The one thing I have yet to figure out is, I believe the sensor readings are wrong due to needing to set the i2c power pin to low, at least this was the case for Circuitpython to get accurate readings. Not sure yet how to do that correctly in ESPHome
Edit: while the power is still not 100% right, having compared to another feather with the same sensor running on circuitpython the measurements are accurate. I only say the power isn’t right becuase on the feather running CP the led on the sensor is lit up brightly, while on the esphome programmed one it is quite faint which used to be an issue in earlier CP versions if you didn’t set the pin to low.
@pioneersky I adapted your config and got it to validate. Thank you! Now I need to figure out how to install it to the ESP32
@nickrout I’m still running into the arch64 issues. Going back a ways, you mentioned installing ESPHome on my desktop/laptop. Were you referencing these instructions ( Installing ESPHome Manually — ESPHome) or is there a GUI-based version to install to a Windows machine?
To be sure though, if HA is installed on an RPi (arch64), but I’m accessing the ESPHome HA add-on via Edge on my Windows machine (x64), and the ESP32 is plugged in via USB, shouldn’t that work? Or, is the problem that the ESPHome HA add-on is on arch64 hardware? In other words, do both ESPHome and the machine the ESP32 is plugged into both have to NOT be arch64?
Thank you. Yes, my HA is on an RPi 3B+ which, as I understand, is an arch64 machine.
Disclaimer: I’m honestly not trying to complain, just understand (because I must still be missing something obvious). So, here goes…
According to this (Home Assistant Analytics (home-assistant.io)), almost half of all HA installations are on Raspberry Pi’s running on 64-bit architecture (arch64). HA maintains ESPHome (as one of the services paid for by Nabu Casa subscriptions), but I cannot use an arch64 machine to compile ESPHome code. Do I have all that right?
The issue is the tools that ESPhome has to use with these esp32-s2’s. currently only esp-idf framework works, which from what I understand does not work on aarch64 systems. The vast majority of current esp32 and esp8266 boards are compatible with the arduino framework. So the limitation is more due to Espressif and Arduino developers at this point than ESPHome. You would not have this issue with the Adafruit HUZZAH32 – ESP32 Feather Board : ID 3405 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits for example or other generic esp32’s.
In my journey I also installed it on Windows and @nickrout is definitely right that you don’t need the web interface. I recommend creating the .yaml file in notepad++ and then compile in the command line. It is less scary than it seems!
Ah, that’s the piece that was not clear to me (despite my research). Thanks for explaining. I hope “they” sort it out soon since these S2 boards seem to be more ideal for many IoT low power applications.
In the meantime, I did install ESPHome (including the 100 MB Python installation) and through the CLI was successful with getting my board on my network and seen by HA, but now I’m trying to get the BME-280 configuration correct since the three sensors are reporting ‘Unknown.’
I think I have a Rev C board since I bought it in April, but I’ve tried both of your code snippets. In both cases, compiling errors out with about 10 ‘undefined reference’ notifications before exiting the compiler and reporting ‘FAILED.’
So this depends on how much you copied my config exactly, I am just using the Feather ESP32-S2 not the TFT. Having looked at the pinout diagrams on the Adafruit for the Feateher ESP32-S2 TFT the pins for mine would likely not line up for yours. So when setting up i2C you see how on the diagram the GPIO pins for SDA and SCL are 42 & 41 respectively, so when setting up i2c you need to do:
i2c:
sda: 42
scl: 41
additionally having looked at the TFT learning document it looks like the i2c power switch only applies to the TFT display if I’m reading that correctly which needs to be pulled high. So I’m thinking that for your board you would do:
I was checking and even though platformio seems to support the TFT board, when I try to create a configuration calling the board it says there is no board found with adafruit_feather_esp32s2_tft, so it may not be supported by ESPHome yet.
I pretty much copied it exactly, except I noticed that name was required for a GPIO switch. I did come across the pinout for your board, but didn’t realize it would be spec’d out different by just adding the TFT display.
Anyways, I made those I2C and GPIO switch changes, but received the same (or very similar) compilation errors. So, I commented out the GPIO switch block and pushed that. It compiled and flashed successfully, but now I’m getting something about ‘Can’t connect to ESPHome API,’ so I cannot tell if the board is happy with the I2C config, but HA still reports ‘Unavailable’ for the three entities, so I assume not.
←[32mINFO Starting log output from 10.0.0.38 using esphome API←[0m
←[33mWARNING Can't connect to ESPHome API for 10.0.0.38: Error connecting to ('10.0.0.38', 6053): [WinError 121] The semaphore timeout period has expired←[0m
←[32mINFO Trying to reconnect to 10.0.0.38 in the background←[0m
EDIT: Also, I don’t know if it counts for much, but I added the “-tft” to this block in ESPHome and it did validate.
Does it say it’s connecting to your wifi network correctly? I seem to remember seeing that when my wifi settings/network settings were off. I have manual_ip settings that may not line up with your network, like the dns server not sure how much of that you modified. You can remove the manual_ip setting entirely if you like, I have it there for OTA updates but at this point you’re just trying to get it to work nevermind ota updates.
I had already scrapped that manual IP block. It’s definitely connected to my network. I can see it on my network, ESPHome indicates ONLINE, and I am able to flash via OTA.
I deleted the device from integrations and restarted HA thinking it would auto-discover it and maybe reset something with the API, but HA didn’t discover anything even though ESPHome still indicates ONLINE.