DoIt ESP32 DevKit V1 wont install - compile failed

I have three Doit ESP32 Devkit V1’s, purchased a few years back. I originally programmed them as stand alone items with arduino studio for some basic projects and I am now trying to add them to my set of ESP32s in my Home Assistant. In HA I currently have around 6 ESP D1 Minis for temperature, humidity and electricity monitoring around the house, so all good with them. I am able to use the ESP home web page to prepare the Devkit V1 devices for initial use, but when I try to edit then install the devices from within ESP Home in HA I am getting compile failures.

Example sample config yaml and compile logs are shown below, if someone has a working Doit ESP32 Devkit V1 config then do please share how I can get this working. Its just a shame to have these 3 devkits sitting around not being used.

Note that I have obviously tried many different board types etc etc in the config yaml but I just cant get it to work so if you suggest “try this… it may work” likelyhood is that I have and it doesn’t but I am grateful for any help. If anyone has a concrete working solution then all the better…

BTW, I’m frquently updating HA, ESP Home and all devices to the latest versions.

Example config:

esphome:
  name: esphome-web-ee23f8
  friendly_name: ESPHome Web ee23f8

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "yyyyy"

ota:


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-Ee23F8"
    password: "zzzz"

captive_portal:

Compile Output:

INFO ESPHome 2023.12.8
INFO Reading configuration /config/esphome/esphome-web-ee23f8.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esphome-web-ee23f8 (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5

warning: Calling missing SConscript without error is deprecated.
Transition by adding must_exist=False to SConscript calls.
Missing SConscript '/data/cache/platformio/packages/framework-arduinoespressif32/tools/platformio-build.py'
File "/data/cache/platformio/platforms/espressif32/builder/frameworks/arduino.py", line 41, in <module>
Library Manager: Installing FS
Warning! Could not find the package with 'FS' requirements for your system 'linux_x86_64'
Library Manager: Installing Update
Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64'
Library Manager: Installing ESPmDNS
Warning! Could not find the package with 'ESPmDNS' requirements for your system 'linux_x86_64'
Dependency Graph
|-- AsyncTCP-esphome @ 2.0.1
|-- WiFi @ 1.2.7
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 1.1.0
|-- noise-c @ 0.1.4
Compiling .pioenvs/esphome-web-ee23f8/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/esphome-web-ee23f8/src/esphome/components/api/api_frame_helper.cpp.o
In file included from src/esphome/components/socket/socket.h:6,
                 from src/esphome/components/api/api_frame_helper.h:14,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/socket/headers.h:156:10: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
          ^~~~~~~~~~~~~
In file included from src/esphome/components/socket/socket.h:6,
                 from src/esphome/components/api/api_frame_helper.h:14,
                 from src/esphome/components/api/api_frame_helper.cpp:1:
src/esphome/components/socket/headers.h:156:10: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
          ^~~~~~~~~~~~~
compilation terminated.
compilation terminated.
*** [.pioenvs/esphome-web-ee23f8/src/esphome/components/api/api_frame_helper.cpp.o] Error 1
*** [.pioenvs/esphome-web-ee23f8/src/esphome/components/api/api_connection.cpp.o] Error 1
========================= [FAILED] Took 20.67 seconds =========================

Hi - please format your yaml correctly using preformatted text tags. The ones you used to format your log output.

Those errors appear to be nothing to do with your ESP.

I had a similar issue with compiling some boards under the latest release and it turned out a uninstall and reinstall of ESPHome was required.

Brilliant, many thanks for both tips, will give them both a try…

Fantastic, the uninstall and reinstall of ESPHome worked seemlessly, i have now adopted and edited one of my Doit Devkit V1 boards and all of my previously onboarded esp d1 mini sensors reconnected with no issues, as if nothing had happened, even in Grafana etc etc. Magnificent!