Problem compling firmware for sensor

So I’m having a problem trying to compile a ESPHome firmware to load onto my Wemos D1 clone with sht3xd sensor. I get HassOS installed via a VM, up and running, go to create a ESPHome config, and I’m getting errors compiling. Below is the log output. I’ve used a similar config successfully when testing the setup before I bought multiple parts to put sensors in multiple locations.

It seems similar to https://github.com/esphome/issues/issues/1402, and although I uninstalled the Add-On, and then re-installed it, still getting this issue. Maybe it needs to be purged somehow? Is there a way to do that?

INFO Reading configuration /config/esphome/temp_humidity_1.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/temp_humidity_1
Processing temp_humidity_1 (board: esp01_1m; framework: arduino; platform: [email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 2.20502.0 (2.5.2) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20600.0 (2.6.0) 
 - toolchain-xtensa 2.100100.200706 (10.1.0)
Looking for ESPAsyncTCP-esphome library in registry
LibraryManager: Installing id=6757 @ 1.2.3
ESPAsyncTCP-esphome @ 1.2.3 has been successfully installed!
Looking for ESPAsyncWebServer-esphome library in registry
LibraryManager: Installing id=6758 @ 1.2.7
ESPAsyncWebServer-esphome @ 1.2.7 has been successfully installed!
Looking for ESPAsyncTCP-esphome library in registry
LibraryManager: Installing id=6757
ESPAsyncTCP-esphome @ 1.2.3 has been successfully installed!
Looking for AsyncTCP-esphome library in registry
LibraryManager: Installing id=6798
AsyncTCP-esphome @ 1.1.1 has been successfully installed!
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.7
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_connection.cpp.o
Compiling /data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_server.cpp.o
In file included from src/esphome/core/component.h:5,
                 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:
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:270:12: error: 'isinf' has not been declared in 'std'
  270 | using std::isinf;
      |            ^~~~~
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:271:12: error: 'isnan' has not been declared in 'std'
  271 | using std::isnan;
      |            ^~~~~
In file included from src/esphome/core/component.h:5,
                 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:
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:270:12: error: 'isinf' has not been declared in 'std'
  270 | using std::isinf;
      |            ^~~~~
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:271:12: error: 'isnan' has not been declared in 'std'
  271 | using std::isnan;
      |            ^~~~~
In file included from src/esphome/core/component.h:5,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome/components/api/api_connection.cpp:1:
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:270:12: error: 'isinf' has not been declared in 'std'
  270 | using std::isinf;
      |            ^~~~~
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:271:12: error: 'isnan' has not been declared in 'std'
  271 | using std::isnan;
      |            ^~~~~
In file included from src/esphome/core/component.h:5,
                 from src/esphome/components/api/api_server.h:3,
                 from src/esphome/components/api/api_server.cpp:1:
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:270:12: error: 'isinf' has not been declared in 'std'
  270 | using std::isinf;
      |            ^~~~~
/root/.platformio/packages/[email protected]/cores/esp8266/Arduino.h:271:12: error: 'isnan' has not been declared in 'std'
  271 | using std::isnan;
      |            ^~~~~
In file included from src/esphome/components/api/api_server.h:12,
                 from src/esphome/components/api/api_server.cpp:1:
src/esphome/components/api/homeassistant_service.h: In member function 'void esphome::api::HomeAssistantServiceCallAction<Ts>::play(Ts ...)':
src/esphome/components/api/homeassistant_service.h:55:18: warning: invalid use of incomplete type 'class esphome::api::APIServer'
   55 |     this->parent_->send_homeassistant_service_call(resp);
      |                  ^~
In file included from src/esphome/components/api/api_server.h:9,
                 from src/esphome/components/api/api_server.cpp:1:
src/esphome/components/api/util.h:13:7: note: forward declaration of 'class esphome::api::APIServer'
   13 | class APIServer;
      |       ^~~~~~~~~
*** [/data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_pb2_service.cpp.o] Error 1
In file included from src/esphome/components/api/api_server.h:12,
                 from src/esphome/components/api/api_connection.h:7,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/api/homeassistant_service.h: In member function 'void esphome::api::HomeAssistantServiceCallAction<Ts>::play(Ts ...)':
src/esphome/components/api/homeassistant_service.h:55:18: warning: invalid use of incomplete type 'class esphome::api::APIServer'
   55 |     this->parent_->send_homeassistant_service_call(resp);
      |                  ^~
In file included from src/esphome/components/api/api_server.h:9,
                 from src/esphome/components/api/api_connection.h:7,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/api/util.h:13:7: note: forward declaration of 'class esphome::api::APIServer'
   13 | class APIServer;
      |       ^~~~~~~~~
*** [/data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_pb2.cpp.o] Error 1
*** [/data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_server.cpp.o] Error 1
*** [/data/temp_humidity_1/.pioenvs/temp_humidity_1/src/esphome/components/api/api_connection.cpp.o] Error 1
========================== [FAILED] Took 6.20 seconds ==========================

What version of esphome? Where is your yaml?

Latest ESPHome, v1.15.3, and the YAML is below. It validates fine though. password/SSID is redacted.

esphome:
  name: temp_humidity_1
  platform: ESP8266
  board: esp01_1m
  arduino_version: [email protected]
  includes: []
  build_path: temp_humidity_1
  platformio_options: {}
  libraries: []
  esp8266_restore_from_flash: false
  board_flash_mode: dout
wifi:
  ap:
    ssid: Temp Humidity Sensor 1 Fallback
    password: 
    ap_timeout: 1min
  domain: .local
  power_save_mode: NONE
  reboot_timeout: 15min
  output_power: 20.0
  fast_connect: false
  networks:
  - ssid: 
    password: 
    priority: 0.0
  use_address: temp_humidity_1.local
captive_portal: {}
logger:
  baud_rate: 0
  hardware_uart: UART0
  tx_buffer_size: 512
  logs: {}
  level: DEBUG
  esp8266_store_log_strings_in_flash: true
api:
  reboot_timeout: 15min
  port: 6053
  password: ''
ota:
  port: 8266
  password: ''
  safe_mode: true
uart:
- rx_pin: 3
  baud_rate: 4800
  stop_bits: 1

i2c:
  sda: 4
  scl: 5
  scan: True
  id: bus_a
sensor:
  - platform: sht3xd
    temperature:
      name: "Temperature Sensor 1"
    humidity:
      name: "Humidity Sensor 1"
    address: 0x44
    update_interval: 60s

Wrong board I think

Why, that is old, very old

1 Like

Strange. I chose the “Generic ESP8266 (for example Sonoff)” option in the Create New Node wizard. See https://i.imgur.com/coB3lcG.png

As for Arduino Version, strange. I think that’s from a copy/paste from when I was setting up my Sonoff S31 power monitoring plugs, as a sample configuration from the ESPhome site.

Looks like that actually might have been my issue. I removed the arduino_version, and now it’s compiling successfully just fine. facepalm

Thanks!

The board should be (I think) d1_mini.

Yeah. Trying with the board as per original it still works though. But you’re right, should always use the most accurate board value I can. Thanks for the help!