Having problems installing on Wemos D1 mini over USB

This is my first attempt with ESPHome. I’m trying to create a set of DS18B20 sensors to monitor my ASHP plate heat exchanger as per https://everythingsmarthome.co.uk/building-a-temperature-sensors-for-home-assistant-wemos-d1-mini-with-ds18b20-build-guide/
I get logs which always end ERROR 127. Do I have to copy the missing file to the project?


INFO Reading configuration /config/esphome/walnut.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing walnut (board: nodemcuv2; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
Compiling /data/walnut/.pioenvs/walnut/src/esphome/components/esp8266/core.cpp.o
sh: 1: xtensa-lx106-elf-g++: not found
*** [/data/walnut/.pioenvs/walnut/src/esphome/components/esp8266/core.cpp.o] Error 127
========================== [FAILED] Took 5.84 seconds ==========================

The first time it did much more, but I had the wrong board type.


Walnut yaml install log
INFO Reading configuration /config/esphome/walnut.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing walnut (board: esp01_1m; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)
--------------------------------------------------------------------------------
Tool Manager: Installing platformio/framework-arduinoespressif8266 @ ~3.30002.0
INFO Installing platformio/framework-arduinoespressif8266 @ ~3.30002.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-esptool @ <2
INFO Installing platformio/tool-esptool @ <2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.30000.0
INFO Installing platformio/tool-esptoolpy @ ~1.30000.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing ottowinter/ESPAsyncTCP-esphome @ 1.2.3
INFO Installing ottowinter/ESPAsyncTCP-esphome @ 1.2.3
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/noise-c @ 0.1.4
INFO Installing esphome/noise-c @ 0.1.4
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/libsodium @ 1.10018.1
INFO Installing esphome/libsodium @ 1.10018.1
Downloading  [####################################]  100%
Unpacking  [####################################]  100%          
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40400.0
INFO Installing platformio/tool-scons @ ~4.40400.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 1.2.3
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- ESPAsyncTCP-esphome @ 1.2.3
|   |-- Hash @ 1.0
|   |-- ESP8266WiFi @ 1.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
Compiling /data/walnut/.pioenvs/walnut/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-lx106-elf-g++: not found
*** [/data/walnut/.pioenvs/walnut/src/esphome/components/api/api_connection.cpp.o] Error 127
========================= [FAILED] Took 86.69 seconds =========================

So I removed lines from yaml file. The current compiled yaml is


INFO Reading configuration /config/esphome/walnut.yaml...
INFO Configuration is valid!
esphome:
  name: walnut
  friendly_name: ASHP
  build_path: .esphome/build/walnut
  platformio_options: {}
  includes: []
  libraries: []
  name_add_mac_suffix: false
  min_version: 2023.4.1
  compile_process_limit: 1
esp8266:
  board: nodemcuv2
  framework:
    version: 3.0.2
    source: ~3.30002.0
    platform_version: platformio/espressif8266 @ 3.2.0
  restore_from_flash: false
  early_pin_init: true
  board_flash_mode: dout
logger:
  baud_rate: 115200
  tx_buffer_size: 512
  deassert_rts_dtr: false
  hardware_uart: UART0
  level: DEBUG
  logs: {}
  esp8266_store_log_strings_in_flash: true
ota:
  password: Password 
  safe_mode: true
  port: 8266
  reboot_timeout: 5min
  num_attempts: 10
wifi:
  domain: .local
  reboot_timeout: 15min
  power_save_mode: NONE
  fast_connect: false
  output_power: 20.0
  networks:
  - ssid: !secret 'wifi_ssid'
    password: !secret 'wifi_password'
    priority: 0.0
  use_address: walnut.local

So not sure what to try next.

Thanks for help

Phil

Sounds like the xtensa SDK is missing. Can check this issue for more info. Some people seem to have luck with reinstalling the add-on, someone else had to remove the .platformio folder. Can give it a try and see if any of the hints would solve your issue.

1 Like

Why not

esp8266:
  board: wemos_d1

works perfect with my WeMos d1 Mini.

1 Like

Yep, wrong board.

1 Like

Thanks to @ckxsmart, @Kimotu, @nickrout for responding.

Regarding boards, I started again after watching another video about a temperature and humidity sensor. It is clear that HA is constantly changing because there used to be a drop-down list of boards to choose from. On a Windows PC rather than my iPad, there is floating help directing to the platformio.org site. Wemos D1 is now d1_mini rather than wemos_d1. nodemcuv2 is there and is how my boards were described on Amazon by AZ Delivery.

So while on the PC I setup a new device with the default yaml and changed the board to the nodemcuv2. I didn’t get far using the second option for install (it failed). The third couldn’t find the board on any usb port, so I have ordered a new micro usb cable. Other charging cables did make the blue led flash briefly so I suspect my first cable from an old Samsung phone is not suitable (micro a or b).

So then I tried the manual installation method which compiles everything. That had a fatal error quite quickly so I decided to reboot the Raspberry Pi in case the memory was low. This time it fully compiled a very long list of stuff and produced a binary. I just need to download it to the board :sunglasses:. It made me wonder whether some of the messages were to do with an incomplete compilation previously because my log posted above looks similar, if incomplete.

For now I will wait for the micro USB cable (delivery tomorrow) even though today I received some USB A to TTL devices to wire up. I’m kinda not sure how I will eventually set up the kit power wise. I don’t want the Raspberry Pi 3B in the hot water cylinder cupboard particularly. I do have an old charger with micro USB connector, and want to use Wifi. Battery is another option.

Phil

Hello

The micro USB cable has arrived. Plugged it in, the blue light briefly flashed and the install of software without the Dallas code for the DS18B20 thermometer worked. I see it on the network and can look at logs wirelessly. The yaml was just a completely standard New Device tweaked to change the board to nodemcuv2.

Now I must do some soldering of the headers so I can wire up the thermometers. I need to check the voltage pins first to make sure all is as it should be.

Thanks for all the help.

Phil