@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.
I would need to see your configuration to provide anymore insight at this point, you’re getting close! I’m slugging through this because I bunch a bought of these feathers without really doing research. If I could do it all over again, at least for my purposes I probably would have gotten some of the cheaper more basic options.
Yeah. That’s my major takeaway too. I didn’t realize each of these boards require months of coding to get implemented or whatever.
Here’s my entire humidor.yaml minus a couple redacted passwords (which I think came from the initial config in ESPHome, but I don’t know if I even need):
I’m not sure from looking at that why you’re getting the error with it not connecting to Homeassistant, have you tried MQTT to see if it receives that? I’d recommend hopping in the esphome discord server to see if they can help.
For what it’s worth, I’ve been trying to get an ESP32S2 (T8-ESP32-S2) and have had similar troubles. I have HAOS on a Pi3B which has trouble compiling and produces similar errors about the Platformio toolchain.
I now use my PC with ESPHome installed. I use Notepad++ to edit the .yaml and esphome to compile and flash the image ‘esphome run cvan.yaml’. Although I had to use ESP-Web to load firmware.elf the first time to get it onboard, I can now use OTA.
Also since this has a 135x240 TFT I had to sort out the display parameters, but I’ll add that to a note/pull request on Github.
Can someone who has gotten the Adafruit ESP32S2-TFT working help a befuddled ESPHome noob out? Specifically:
What sequence of BOOT and RST buttons do you push to get it into an acceptable bootloader mode?
Which serial port did you select when you got it there?
I feel like I’ve tried every combination, and never actually get connected and successfully “Prepare for First Use”. I either get a failure Failed to initialize. Try resetting your device or holding the BOOT button while selecting your serial port until it starts preparing the installation. and have to disconnect/reconnect, or it just stalls at the “Connecting” spinner.
My environment:
Old 2016 Intel-based Mac (my only non-ARM system)
Chrome browser
Using the ESPHome web API (vs the Home Assistant integration - which does not work if you don’t have SSL set up)
Known good USB C to C cable
Here’s a screen shot of my connection choices if it helps:
Asking the same question: has anyone gotten the Adafruit Feather ESP32-S2 TFT to work with Home Assistant? I’m trying to work my way through it and am hitting the same roadblocks described in this thread. I’m willing to keep plugging away but this thread would suggest it’s (still?) a dead-end?
Thanks!
jtf
Unfortunately, I have not made any progress on this, either. My suspicion is that ESPHome can’t talk to the boot loader on Adafruit ESP32-S2 boards. Yo definitely can’t use the default U2F bootloader - you have to get into the ROM bootloader via a factory reset.
I was able to reliably load other boot firmware, and started down the path of using the ESPhome command line tool, with featheresp32-s2 as board type, but ran out of steam. If you make any breakthroughs, please post!
#2 Create new Device in ESPHome module in HAOS, then upload ESPHome .bin using same tool to the Feather.
#3 Once tool shows up online, you can start configuring. Here’s a working config for a couple of the Adafruit I2C sensors for me. I haven’t tinkered with the TFT yet. Note the board section and I2C settings – there are several earlier posts that didn’t work for me.