Help needed: Flashing ESP32-P4 POE RJ45 fails with “Configuration does not match the platform” error in ESPHome

Hi everyone,

I recently bought an ESP32-P4 POE RJ45 board and I’m trying to connect it to ESPHome in Home Assistant.

When I attempt to flash the device using ESPHome, I get the following error:

Configuration does not match the platform of the connected device. Expected an ESP32 device.

My ESPHome YAML config includes:

esphome:
  name: multi-meter-monitor
  friendly_name: Multi meter monitor

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

I also tried erasing the existing firmware using esptool, but the same error persists when flashing again.

From what I understand, the ESP32-P4 uses a different chip architecture (RISC-V) compared to the classic ESP32 (Xtensa), and ESPHome might not support this newer chip yet.

Has anyone successfully flashed ESPHome firmware on an ESP32-P4 device? Or is there a recommended workaround or alternative approach to get this board working with Home Assistant?

Thanks in advance for any guidance or tips!

Hey

Have you tried to identify properly the chipset using for example ESPConnect (ESPConnect) ?
For ESPHome the chip looks to be supported: Support of ESP32-P4 · Issue #10278 · espressif/arduino-esp32 · GitHub

Vincèn

According to this you should be using:

esp32:
  variant: esp32p4

instead of

esp32:
  board: esp32
2 Likes

Thanks for the suggestions!

It is an ESP32-P4 Chip Revision v1.3 according to ESPConnect

This board to be exact: https://www.waveshare.com/wiki/ESP32-P4-ETH with added PoE module.

(I think this is the datasheet: Espressif Documentation)

I was naive enough to buy it and assume that it would be a good board for a simple project. But 6 hours later, trying to flash it with bare minimum config, I see that I am in way over my head with this one. And should just have used a more simple generic USB powered wifi ESP32 board… but… I was really hoping for PoE :upside_down_face:

There are some ESP-IDF and Arduino documentation for it, but no ESPHome it seems.

Timebox exceeded, so for now, this project is archived :relieved:

Hi

I am not sure if you have had any luck yet with your ESP32-P4-ETH, I also started down the same route with Ethernet and POE as I am trying to reduce the number of wifi connected ESPhome nodes in my system.

I had minimal issues using the code below and the board has been running ok for a few weeks with POE using a Reolink POE injector.


After the initial download through USB I have not encounterd any issues with OTA downloads through the Ethernet connection.

esphome:
  name: p4-test
  friendly_name: P4 Test

esp32:
  board: esp32-p4
  flash_size: 32MB
  framework:
    type: esp-idf
    advanced:  
      enable_idf_experimental_features: true

psram:
  mode: hex
  speed: 200MHz
  
# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: " "

ota:
  - platform: esphome
    password: "  "

ethernet:
  type: IP101
  mdc_pin: GPIO31
  mdio_pin: GPIO52
  power_pin: GPIO51
  clk:
    mode: CLK_EXT_IN
    pin: GPIO50
  phy_addr: 1

  manual_ip:
    static_ip: 192.168.0.213
    gateway: 192.168.0.1
    subnet: 255.255.255.0  
    dns1: 192.168.0.1

udp:
  id: udp_external
   
packet_transport:   
  platform: udp

i2c:
  - id: bus_a
    sda: GPIO7
    scl: GPIO8
    scan: true
  - id: bus_b
    sda: GPIO19
    scl: GPIO18
    scan: true

web_server:
  port: 80
  version: 3   

text_sensor:
  - platform: ethernet_info
    ip_address:
      name: ESP IP Address
    dns_address:
        name: ESP DNS Address
    mac_address:
        name: ESP MAC Address  

  - platform: sun
    name: Sun Next Sunrise
    type: sunrise

  - platform: sun
    name: Sun Next Sunset
    type: sunset  

time:
  - platform: homeassistant 

sun:
  latitude: 51.5949°
  longitude: -1.4176°      


sensor:


#   1st Thermistor Channel

  - platform: adc
    pin: GPIO20
    attenuation: 12db
    name: "voltage_1"
    id: voltage_1
    update_interval: never
    web_server:
       sorting_weight: 1      

  - platform: resistance
    sensor: voltage_1
    configuration: DOWNSTREAM
    resistor: 6700
    name: Resistance 1
    id: res_1 
    web_server:
       sorting_weight: 2         

  - platform: ntc
    sensor: res_1
    calibration:
      b_constant: 3977
      reference_temperature: 25°C
      reference_resistance: 10kOhm
    name: NTC Temperature
    id: space_temp_01
    filters:
    - offset: -1
    web_server:
       sorting_weight: 3  

  - platform: qmp6988
    i2c_id: bus_a
    temperature:
      name: "Temperature 2"
      oversampling: 16x
    pressure:
      name: "Pressure"
      oversampling: 16x
    address: 0x70
    update_interval: 30s
    iir_filter: 2x

  - platform: sht3xd
    i2c_id: bus_a
    temperature:
      name: "Temperature 1"
    humidity:
      name: "Humidity"
    address: 0x44
    update_interval: 10s

  - platform: packet_transport
    provider: space-temperature-01
    name: "Living Room Temp"
    internal: false
    id: living_rm_temp
    remote_id: space_temp_01
    unit_of_measurement: "°C"
    icon: "mdi:thermometer"
    device_class: "temperature"
    state_class: "measurement"
    accuracy_decimals: 1



switch:

  - platform: gpio
    pin: GPIO22
    id: ntc_vcc 

binary_sensor:

  - platform: homeassistant
    name: "HWS Enable"
    entity_id: schedule.hot_water

  - platform: homeassistant
    name: "HTG Enable"
    entity_id: schedule.heating 

interval:
  - interval: 20s
    then:
      - switch.turn_on: ntc_vcc
      - component.update: voltage_1
      - switch.turn_off: ntc_vcc    
                
1 Like

Wow, Thanks for sharing this! Gonna test this config ASAP.