Troubleshooting ESP32 OTA updating

My HA setup has a Olimex ESP32-POE-ISO-EA that I flashed the ESPHome firmware onto to use as a Bluetooth (BLE) Proxy. But I have not been able to update it since through OTA.

The error I get is Connection refused. It’s on a different network subnet (192.168.1.0/24) than Home Assistant (192.168.0.0/24) with a firewall in between, but I’m after allowing all traffic between both, I’m not able to figure out what the problem is. I’m thinking there’s a different reason why it can’t connect.

This is the log from the ESPHome update feature’s console screen:

U

pdating /config/esphome/olimex-esp32-poe-iso-039e18.yaml
------------------------------------------------------------

INFO ESPHome 2024.11.1
INFO Reading configuration /config/esphome/olimex-esp32-poe-iso-039e18.yaml...
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing olimex-esp32-poe-iso-039e18 (board: esp32-poe-iso; framework: espidf; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40408.0 (4.4.8) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Dependency Graph
|-- noise-c @ 0.1.6
RAM:   [==        ]  15.5% (used 50632 bytes from 327680 bytes)
Flash: [======    ]  58.9% (used 1080621 bytes from 1835008 bytes)
========================= [SUCCESS] Took 14.48 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of olimex-esp32-poe-iso-039e18.local in mDNS
INFO Connecting to 192.168.1.104 port 3232...
ERROR Connecting to 192.168.1.104 port 3232 failed: [Errno 111] Connection refused
ERROR Connection failed.
= [ERROR] /config/esphome/olimex-esp32-poe-iso-039e18.yaml =



======================== [SUMMARY] ========================
  - /config/esphome/olimex-esp32-poe-iso-039e18.yaml: FAILED

The only info I have in the secrets yaml is the wifi password, which it shouldn’t even use as it should use the LAN (with POE) connection.

The POE ethernet port needs to be specified in YAML

esphome:
  name: esp32-evb
  platform: ESP32
  board: esp32-evb

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: !secret api_encryption

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 0
  manual_ip:
    static_ip: 192.168.1.10
    gateway: 192.168.1.1
    subnet: 255.255.252.0

~~~~~

PS: not sue if I have exactly the same (i use it in the office and went home for the weekend), but I do have an ESP olimex with POE, I think it is the EVB :thinking:

And, as it says…it is OTA…meaning Over The Air (=not wifi)
The only way you can update is downloading the bins and then upload it on the web-interface (or use serial)

1 Like

Thanks for the advice but I’m not sure which YAML I need to adjust for this. When I click “Update All”, it doesn’t ever mention it.

If I click on Edit on the “card”, I get this config (excluding key):

substitutions:
  name: olimex-esp32-poe-iso-039e18
  friendly_name: Bluetooth Proxy 039e18
packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/olimex/olimex-esp32-poe-iso.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key:

This is the yaml I used months ago to flash the firmware before I had it connected over the network. To be clear, it works, I just can’t update it using OTA:

esphome:
  project:
    name: esphome.bluetooth-proxy
    version: dev
  friendly_name: Bluetooth Proxy
  min_version: 2024.6.0
  name_add_mac_suffix: true
  name: olimex-esp32-poe-iso

esp32:
  board: esp32-poe-iso
  framework:
    type: esp-idf

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12

api:
  encryption:
    key:
logger:

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

bluetooth_proxy:
  active: true

button:
  - platform: safe_mode
    id: button_safe_mode
    name: Safe Mode Boot

  - platform: factory_reset
    id: factory_reset_btn
    name: Factory reset

ota:
  - platform: http_request
    id: ota_http_request

update:
  - platform: http_request
    id: update_http_request
    name: Firmware
    source: https://firmware.esphome.io/bluetooth-proxy/olimex-esp32-poe-iso/manifest.json

http_request:

dashboard_import:
  package_import_url: github://esphome/bluetooth-proxies/olimex/olimex-esp32-poe-iso.yaml@main

Add this to yaml:

web_server:
  port: 80

Compile using manual download
image
Then use web server on http://192.168.1.x to upload the compiled bins
image

1 Like

Thanks for the tip, but the web server doesn’t seem to respond. I get a “connection refused” error using Developer Options → Network, in the web browser. I’ve disabled HTTPS-mode to make sure it doesn’t redirect but it doesn’t matter.

I tried again, but the issue persists and I can’t figure out what might be the problem.

The strange behavior is that it works normally, I just can’t update it:

INFO ESPHome 2024.11.2
INFO Reading configuration /config/esphome/olimex-esp32-poe-iso-039e18.yaml...
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 192.168.1.104 using esphome API
INFO Successfully connected to olimex-esp32-poe-iso-039e18 @ 192.168.1.104 in 0.001s
INFO Successful handshake with olimex-esp32-poe-iso-039e18 @ 192.168.1.104 in 0.092s
[19:01:34][I][app:100]: ESPHome version 2024.7.3 compiled on Aug  8 2024, 20:45:00
[19:01:34][I][app:102]: Project esphome.bluetooth-proxy version dev

[19:01:34][C][mdns:116]: mDNS:
[19:01:34][C][mdns:117]:   Hostname: olimex-esp32-poe-iso-039e18
[19:01:34][C][http_request.ota:026]: Over-The-Air updates via HTTP request
[19:01:34][C][safe_mode:018]: Safe Mode:
[19:01:34][C][safe_mode:020]:   Boot considered successful after 60 seconds
[19:01:34][C][safe_mode:021]:   Invoke after 10 boot attempts
[19:01:34][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[19:01:34][C][api:139]: API Server:
[19:01:34][C][api:140]:   Address: olimex-esp32-poe-iso.local:6053
[19:01:34][C][api:142]:   Using noise encryption: YES
[19:01:34][C][http_request:013]: HTTP Request:
[19:01:34][C][http_request:014]:   Timeout: 4500ms
[19:01:34][C][http_request:015]:   User-Agent: ESPHome/2024.7.3 (https://esphome.io)
[19:01:34][C][http_request:016]:   Follow redirects: YES
[19:01:34][C][http_request:017]:   Redirect limit: 3