ESP32 & issues with Fresh install of ESPHome

Hi there,

I’m getting started with my HomeAssistant Setup after migrating from OpenHAB. Learning curve is okay but now I want to advance my setup and use ESPHome to get mmWave tracking on it’s way.

But I’m stuck at the basics.
I’ve installed the ESPHome Addon, flashed my ESP32 (AZDelivery Rev C v4) and want to adopt it in ESPHome.
I copy the key, hit install and I am greeted with this mess of logfile:

INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/esphome-web-cde9d0.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esphome-web-cde9d0 (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-esp32.py'
File "/data/cache/platformio/packages/framework-arduinoespressif32/tools/platformio-build.py", line 161, in <module>
Dependency Graph
|-- AsyncTCP-esphome @ 2.0.1
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
Compiling .pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_frame_helper.cpp.o
In file included from src/esphome/components/api/api_connection.h:3,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/api/api_frame_helper.h:2:10: fatal error: cstdint: No such file or directory
 #include <cstdint>
          ^~~~~~~~~
compilation terminated.
Compiling .pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_pb2.cpp.o
In file included from src/esphome/components/api/api_frame_helper.cpp:1:
src/esphome/components/api/api_frame_helper.h:2:10: fatal error: cstdint: No such file or directory
 #include <cstdint>
          ^~~~~~~~~
compilation terminated.
Compiling .pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_pb2_service.cpp.o
*** [.pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_connection.cpp.o] Error 1
*** [.pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_frame_helper.cpp.o] Error 1
In file included from src/esphome/components/api/proto.h:3,
                 from src/esphome/components/api/api_pb2.h:5,
                 from src/esphome/components/api/api_pb2.cpp:3:
src/esphome/core/component.h:3:10: fatal error: string: No such file or directory
 #include <string>
          ^~~~~~~~
compilation terminated.
In file included from src/esphome/components/api/proto.h:3,
                 from src/esphome/components/api/api_pb2.h:5,
                 from src/esphome/components/api/api_pb2_service.h:5,
                 from src/esphome/components/api/api_pb2_service.cpp:3:
src/esphome/core/component.h:3:10: fatal error: string: No such file or directory
 #include <string>
          ^~~~~~~~
compilation terminated.
*** [.pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_pb2.cpp.o] Error 1
*** [.pioenvs/esphome-web-cde9d0/src/esphome/components/api/api_pb2_service.cpp.o] Error 1
========================== [FAILED] Took 3.24 seconds ==========================

Yesterday evening I was messing about with it and got numerous other issues. Got some random code errors that said that helper:arduino_header.h is missing, the compiling would take ages and my HA would freeze / crash completely.

Currently running it on an RPI 4 with 4g ram. Nothing special - CPU load is <10%, RAM usage is around 1 - 1.5GB. So nothing to worry about.

Any tips would be appreciated.
I am stuck with installing code to the ESP32 - Not even trying to upload fancy stuff. Just basic controls for the DFRobot mmWave Sensors. But now even the base code is not working?

PS:
For completeness sake:
Here’s the logfile of the Addon Log:

023-12-29 23:07:43,156 INFO 200 GET /edit?configuration=esphome-web-cde9d0.yaml (0.0.0.0) 4.28ms
2023-12-29 23:07:43,181 INFO 101 GET /ace (0.0.0.0) 1.41ms
2023-12-29 23:07:43,183 INFO Running command 'esphome --dashboard -q vscode --ace /config/esphome'
2023-12-29 23:07:46,528 INFO 200 POST /edit?configuration=esphome-web-cde9d0.yaml (0.0.0.0) 1155.93ms
2023-12-29 23:07:46,569 INFO 200 GET /info?configuration=esphome-web-cde9d0.yaml (0.0.0.0) 2.89ms
2023-12-29 23:07:47,542 INFO 101 GET /compile (0.0.0.0) 1.32ms
2023-12-29 23:07:47,545 INFO Running command 'esphome --dashboard compile /config/esphome/esphome-web-cde9d0.yaml'
2023-12-29 23:07:52,474 INFO Process exited with return code 1

and here is the YAML that was auto-generated when adding the device:

esphome:
  name: esphome-web-cde9d0
  friendly_name: ESPHome TEST2

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: <key>
ota:


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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-Cde9D0"
    password: <pass>

captive_portal:
    

Thanks and cheers,

Hi again. Try cleaning your build. (In the overflow menu).

Thanks for the info.
I thought this is only needed when modifying code. I tried clean build files but the errors are the same.

It seems something is wrong with your install. These things happen sometimes. You could try deleting the esphome addon, and reinstalling it.

Also you could try googling those error messages.

Otherwise I am presently out of ideas.

1 Like

Sadly not working.
Already googled that. Came up empty. Only “reinstall” that seemed to fix some old stuff.
Did that. Uninstalled, rebooted, reinstall, reboot. No luck.
And again - this is basic code for the esp. Nothing added extra. I’ll tinker around with esphome on my desktop pc - but I don’t really understand how this should work as I found the install documentation with Python and I need to dig through it and check if the same issue occurs.
A shame because everything seems to be great with HA otherwise.

I have numerous ESP devices both ESP8266 & ESP32, however the warning below is appearing only on my ESP32 installs.

warning: Calling missing SConscript without error is deprecated.

Any pointers would be appreciated… This started with the ESP 2023.12.5 Update.

INFO ESPHome 2023.12.8
INFO Reading configuration /config/esphome/person-detection.yaml...
INFO Updating https://github.com/SeByDocKy/myESPhome.git@None
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING 'person_detection': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Generating C++ source...
INFO Compiling app...
Processing person_detection (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/[email protected]/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'
Library Manager: Installing Wire
Warning! Could not find the package with 'Wire' 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/person_detection/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/person_detection/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/person_detection/src/esphome/components/api/api_connection.cpp.o] Error 1
*** [.pioenvs/person_detection/src/esphome/components/api/api_frame_helper.cpp.o] Error 1
========================== [FAILED] Took 8.61 seconds ==========================

I believe those AZ-DELIVERY boards have their own selection in esphome and kt looks like you chose a generic esp32 instead. When you start a new project and it wants you to select a board, you have to open the full list and look for your AZ board. It looks like this.

There are all kinds of esp boards and some are very different. Sometimes it wont throw an error if you select the wrong board and it will compile. If that happens to you, welcome to your nightmare! Stuff wont wor right, youll have compile errors and pull your flipping hair out trying to figure it out. Select the right board! Its super important.