Repository navigation
Description
What happened?
With a remote build server paired, ESP8266 devices compile on the build server but cannot be installed from the dashboard.
- Home Assistant App (running on a rpi 4) dashboard paired to a build server (desktop app on Win11).
- Open an ESP8266 config (board: nodemcuv2) → Install → Wirelessly.
- Compile on the build server finishes with "INFO Successfully compiled program.", but the job ends with exit code 1
- The upload step then connects to the device and fails before sending anything:
FileNotFoundError: '/data/build/pumpcontroller/.pioenvs/pumpcontroller/firmware.bin'
Expected: the ESP8266 device is installed, like ESP32 devices on the same setup (same build server, same dashboard), which compile with exit code 0 and install fine.
On the build server the binary does exist:
- C:\esphb<id>.remote_builds<id>.esphome\build\pumpcontroller.pioenvs\pumpcontroller\firmware.bin
- C:\esphb<id>.remote_builds<id>.esphome\build\pumpcontroller\build\firmware.ota.bin
- C:\esphb<id>.remote_builds<id>.esphome\build\pumpcontroller\build\firmware.factory.bin
So the artifacts synced back to the sending dashboard seem to miss .pioenvs//firmware.bin, which is the file the ESP8266 OTA upload reads.
Workaround: OTA the firmware.bin directly from the build server machine (esphome.espota2.run_ota(host, 8266, password, firmware.bin)) — works, device updated to 2026.10.2.
Dashboard version
Sending side: Home Assistant App 2026.10.2 (ESPHome 2026.10.2); build server: Desktop app, esphome-device-builder 1.12.2
How did you install it?
Home Assistant App
Where is it running?
Home Assistant App
Device YAML config
esphome:
name: pumpcontroller
friendly_name: PumpController
on_boot:
then:
- lambda: id(last_pump_run_ms) = millis(); # delay first cycle by one full interval
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "REDACTED"
ota:
- platform: esphome
password: "REDACTED"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Pumpcontroller Fallback Hotspot"
password: !secret wifi_password
captive_portal:
# ── Configurable pump parameters (editable from HA) ─────────────
number:
- platform: template
name: "Pump Cycle Interval"
id: pump_interval_min
icon: "mdi:timer-outline"
unit_of_measurement: "min"
min_value: 1
max_value: 1440 # up to 24 h
step: 1
initial_value: 30
restore_value: true
optimistic: true
mode: box
- platform: template
name: "Pump Duration"
id: pump_duration_sec
icon: "mdi:timer"
unit_of_measurement: "s"
min_value: 1
max_value: 300 # up to 5 min
step: 1
initial_value: 30
restore_value: true
optimistic: true
mode: box
# ── Runtime state ────────────────────────────────────────────────
globals:
- id: last_pump_run_ms
type: uint32_t
restore_value: no
initial_value: "0"
# ── Pump (D5 / GPIO14) ───────────────────────────────────────────
switch:
- platform: template
name: "Pump Auto Enable"
id: pump_enable
icon: "mdi:water-pump"
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
on_turn_off:
then:
- script.stop: pump_cycle
- switch.turn_off: pump_relay
- platform: gpio
pin: GPIO14
id: pump_relay
inverted: true
internal: true
restore_mode: ALWAYS_OFF
# ── Manual Relay (D6 / GPIO12) ───────────────────────────────────
- platform: gpio
pin: GPIO12
name: "Manual Relay"
id: manual_relay
inverted: true
icon: "mdi:toggle-switch"
restore_mode: RESTORE_DEFAULT_OFF
button:
- platform: template
name: "Pump Manual Trigger"
icon: "mdi:water-pump"
on_press:
then:
- lambda: id(last_pump_run_ms) = millis();
- script.execute: pump_cycle
binary_sensor:
- platform: template
name: "Pump Active"
icon: "mdi:water-pump"
lambda: return id(pump_relay).state;
- platform: template
name: "Manual Relay State"
icon: "mdi:toggle-switch"
lambda: return id(manual_relay).state;
- platform: status
name: "Device Status"
entity_category: diagnostic
sensor:
- platform: wifi_signal
name: "WiFi Signal"
update_interval: 60s
entity_category: diagnostic
- platform: uptime
name: "Uptime"
update_interval: 60s
entity_category: diagnostic
# ── Pump script (runs once per cycle) ───────────────────────────
script:
- id: pump_cycle
mode: single # skip if already running (safety)
then:
- switch.turn_on: pump_relay
- delay: !lambda return (uint32_t)(id(pump_duration_sec).state * 1000.0f);
- switch.turn_off: pump_relay
# ── Polling loop — checks every 10 s if a cycle is due ──────────
interval:
- interval: 10s
then:
- lambda: |-
uint32_t now = millis();
uint32_t interval_ms = (uint32_t)(id(pump_interval_min).state * 60000.0f);
if ((now - id(last_pump_run_ms)) >= interval_ms && id(pump_enable).state) {
id(last_pump_run_ms) = now;
id(pump_cycle).execute();
}Relevant logs / errors
INFO Connecting to <device-ip> port 8266...
INFO Connected to <device-ip>
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 10, in <module>
sys.exit(main())
File "/esphome/esphome/__main__.py", line 2776, in main
return run_esphome(sys.argv)
File "/esphome/esphome/__main__.py", line 2768, in run_esphome
return POST_CONFIG_ACTIONS[args.command](args, config)
File "/esphome/esphome/__main__.py", line 1748, in command_upload
exit_code, _ = upload_program(config, args, devices)
File "/esphome/esphome/__main__.py", line 1294, in upload_program
return _upload_via_native_api(config, network_devices, args)
File "/esphome/esphome/__main__.py", line 1411, in _upload_via_native_api
return espota2.run_ota(
File "/esphome/esphome/espota2.py", line 1030, in run_ota
return run_ota_impl_(
File "/esphome/esphome/espota2.py", line 975, in run_ota_impl_
with contextlib.closing(sock), Path(filename).open("rb") as file_handle:
FileNotFoundError: [Errno 2] No such file or directory: '/data/build/pumpcontroller/.pioenvs/pumpcontroller/firmware.bin'
Compile log (same config) ends with:
INFO Build Info: config_hash=0x2f27d4eb build_time_str=2026-11-17 03:28:42 -0300
INFO Successfully compiled program.
(job exit code 1)Anything else?
Board: nodemcuv2 (ESP8266). ESP32 configs on the same pairing work end-to-end (compile exit 0, OTA install OK), so it looks specific to the ESP8266 artifact path (.pioenvs//firmware.bin vs build/firmware.ota.bin).
Activity