Is there a way to see what the esp chip is doing straight from powering it up?

Hello everyone…
I have a pretty flacky working esp setup with esphome that only wants to boot any blue moon…so i was wondering if there is a way to actually get some kind of boot log or screen output while it is being plugged in to see if the thing actually throws issues or is just faulty
I have win 10 and Mint linux available with usb to serial adapter…
python and esptool are also ready to go…
appreciate any and every help

Did you try this?

Guess for that the esphome code needs to boot, right?
But thats the issue…i only get it to boot into something once in a while…
had it booting litle while agao, but meanwhile lost connection again…
very frustrating…
Danke

A long shot, but… do you have by any change any strapping pin left floating? It happened to me before - esp either did or didn’t boot, depending on current state of that floating pin at power-up, so double check if those pins are either +Vcc or GND as per datasheet).

ESP writes output to UART0, which is a serial connection.
This serial connection is then relayed over the ESPHome to HA when the network is coming up.
If you want the output before the network, then you have to go straight to source.
Some ESP boards have an USB interface where it can be read from, which might require a driver to be installed.
Some boards only have pins/holes for RX, TX, GND and you then need a serial interface, which can be different setup.
Some older computers still have serial ports that can be used directly.
Some use an USB to TTL adapter (often also called FTDI board).
Some take another ESP board with USB interface and then lock that in a mode were it just acts as a USB to TTL adapter. (A bit down the page here there is a description of such setup. Using a NodeMCU ESP8266 as a passthrough serial converter chip · Anson VanDoren)

Good comments.

I think this leads to the obvious question: Can you show us your config and schematic?

Thx for that answer…how would i check that? All i did was soldering 5 header pins to the board as shown here:header pins

My board looks like the one in the pic MINUS the comport like connectors on the right…
there i only have the possible solder pointsBoard with headers

This is my config:

substitutions:
  devicename: energymonitor1
  upper_devicename: EnergyMonitor1
  deviceIP: 192.168.178.29
  deviceGatew: 192.168.178.1
  deviceSub: 255.255.255.0
  deviceSSID1: 7390AP
  deviceSSID2: NETGEAR63

esphome:
  name: ${devicename}
  friendly_name: ${upper_devicename}

external_components:
  - source: github://emporia-vue-local/esphome@dev
    components:
      - emporia_vue

esp32:
  board: esp32dev
  framework:
    type: esp-idf
    version: recommended

# Enable Home Assistant API
api:
  encryption:
    key: "c8tl/fRc3DHNnWFrzXZCyErz0thgPheeWV/oqqydnI0="

  services:
    - service: play_rtttl
      variables:
        song_str: string
      then:
#        - rtttl.play:
#            rtttl: !lambda 'return song_str;'

ota:
  password: "3da67f650c3aca468b0e060448325fb0"

# Enable logging
logger:

wifi:
  networks:
    - ssid: ${deviceSSID1} 
      password: !secret wifi_password
      manual_ip:
    # Set this to the IP of the ESP
        static_ip: ${deviceIP}
    # Set this to the IP address of the router. Often ends with .1
        gateway: ${deviceGatew}
    # The subnet of the network. 255.255.255.0 works for most home networks.
        subnet: ${deviceSub} 
    - ssid: ${deviceSSID2}
      password: !secret wifi_password
      manual_ip:
    # Set this to the IP of the ESP
        static_ip: ${deviceIP}
    # Set this to the IP address of the router. Often ends with .1
        gateway: ${deviceGatew}
    # The subnet of the network. 255.255.255.0 works for most home networks.
        subnet: ${deviceSub} 

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${upper_devicename} Fallback Hotspot"
    password: "680xDXUVEoO0"

preferences:
  # the default of 1min is far too short--flash chip is rated
  # for approx 100k writes.
  flash_write_interval: "48h"

#output:
#  - platform: ledc
#    pin: GPIO12
#    id: buzzer

#rtttl:
#  output: buzzer
#  on_finished_playback:
#    - logger.log: 'Song ended!'

#button:
#  - platform: template
#    name: "Two Beeps"
#    on_press:
#      - rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6"

light:
  - platform: status_led
    name: "D3_LED"
    pin: 23
    restore_mode: ALWAYS_ON

i2c:
  sda: 21
  scl: 22
  scan: false
  frequency: 200kHz  # recommended range is 50-200kHz
  id: i2c_a

time:
  - platform: sntp
    id: my_time

# these are called references in YAML. They allow you to reuse
# this configuration in each sensor, while only defining it once
.defaultfilters:
  - &moving_avg
    # we capture a new sample every 0.24 seconds, so the time can
    # be calculated from the number of samples as n * 0.24.
    sliding_window_moving_average:
      # we average over the past 2.88 seconds
      window_size: 12
      # we push a new value every 1.44 seconds
      send_every: 6
  - &invert
    # invert and filter out any values below 0.
    lambda: 'return max(-x, 0.0f);'
  - &pos
    # filter out any values below 0.
    lambda: 'return max(x, 0.0f);'
  - &abs
    # take the absolute value of the value
    lambda: 'return abs(x);'

sensor:
  - platform: emporia_vue
    i2c_id: i2c_a
    phases:
      - id: phase_a  # Verify that this specific phase/leg is connected to correct input wire color on device listed below
        input: BLACK  # Vue device wire color
        calibration: 0.022  # 0.022 is used as the default as starting point but may need adjusted to ensure accuracy
        # To calculate new calibration value use the formula <in-use calibration value> * <accurate voltage> / <reporting voltage>
        voltage:
          name: "Phase A Voltage"
          filters: [*moving_avg, *pos]
        frequency:
          name: "Phase A Frequency"
          filters: [*moving_avg, *pos]
      - id: phase_b  # Verify that this specific phase/leg is connected to correct input wire color on device listed below
        input: RED  # Vue device wire color
        calibration: 0.022  # 0.022 is used as the default as starting point but may need adjusted to ensure accuracy
        # To calculate new calibration value use the formula <in-use calibration value> * <accurate voltage> / <reporting voltage>
        voltage:
          name: "Phase B Voltage"
          filters: [*moving_avg, *pos]
        phase_angle:
          name: "Phase B Phase Angle"
          filters: [*moving_avg, *pos]
    ct_clamps:
      - phase_id: phase_a
        input: "A"  # Verify the CT going to this device input also matches the phase/leg
        power:
          name: "Phase A Power"
          id: phase_a_power
          device_class: power
          filters: [*moving_avg, *pos]
      - phase_id: phase_b
        input: "B"  # Verify the CT going to this device input also matches the phase/leg
        power:
          name: "Phase B Power"
          id: phase_b_power
          device_class: power
          filters: [*moving_avg, *pos]
      # Pay close attention to set the phase_id for each breaker by matching it to the phase/leg it connects to in the panel
      - { phase_id: phase_a, input:  "1", power: { name:  "Circuit 1 Power", id:  cir1, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_b, input:  "2", power: { name:  "Circuit 2 Power", id:  cir2, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_a, input:  "3", power: { name:  "Circuit 3 Power", id:  cir3, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_a, input:  "4", power: { name:  "Circuit 4 Power", id:  cir4, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_a, input:  "5", power: { name:  "Circuit 5 Power", id:  cir5, filters: [ *moving_avg, *pos, multiply: 2 ] } }
      - { phase_id: phase_a, input:  "6", power: { name:  "Circuit 6 Power", id:  cir6, filters: [ *moving_avg, *pos, multiply: 2 ] } }
      - { phase_id: phase_a, input:  "7", power: { name:  "Circuit 7 Power", id:  cir7, filters: [ *moving_avg, *pos, multiply: 2 ] } }
      - { phase_id: phase_b, input:  "8", power: { name:  "Circuit 8 Power", id:  cir8, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_b, input:  "9", power: { name:  "Circuit 9 Power", id:  cir9, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_b, input: "10", power: { name: "Circuit 10 Power", id: cir10, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_a, input: "11", power: { name: "Circuit 11 Power", id: cir11, filters: [ *moving_avg, *pos, multiply: 2 ] } }
      - { phase_id: phase_a, input: "12", power: { name: "Circuit 12 Power", id: cir12, filters: [ *moving_avg, *pos, multiply: 2 ] } }
      - { phase_id: phase_a, input: "13", power: { name: "Circuit 13 Power", id: cir13, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_a, input: "14", power: { name: "Circuit 14 Power", id: cir14, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_b, input: "15", power: { name: "Circuit 15 Power", id: cir15, filters: [ *moving_avg, *pos ] } }
      - { phase_id: phase_a, input: "16", power: { name: "Circuit 16 Power", id: cir16, filters: [ *moving_avg, *pos ] } }
  - platform: template
    name: "Total Power"
    lambda: return id(phase_a_power).state + id(phase_b_power).state;
    update_interval: 2.88s
    id: total_power
    unit_of_measurement: "W"
  - platform: total_daily_energy
    name: "Total Daily Energy"
    power_id: total_power
    accuracy_decimals: 0
  - platform: template
    name: "Balance Power"
    lambda: !lambda |-
      return max(0.0f, id(total_power).state -
        id( cir1).state -
        id( cir2).state -
        id( cir3).state -
        id( cir4).state -
        id( cir5).state -
        id( cir6).state -
        id( cir7).state -
        id( cir8).state -
        id( cir9).state -
        id(cir10).state -
        id(cir11).state -
        id(cir12).state -
        id(cir13).state -
        id(cir14).state -
        id(cir15).state -
        id(cir16).state);
    update_interval: 2.88s
    id: balance_power
    unit_of_measurement: "W"
  - platform: total_daily_energy
    name: "Balance Daily Energy"
    power_id: balance_power
    accuracy_decimals: 0
  - { power_id:  cir1, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 1 Daily Energy" }
  - { power_id:  cir2, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 2 Daily Energy" }
  - { power_id:  cir3, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 3 Daily Energy" }
  - { power_id:  cir4, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 4 Daily Energy" }
  - { power_id:  cir5, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 5 Daily Energy" }
  - { power_id:  cir6, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 6 Daily Energy" }
  - { power_id:  cir7, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 7 Daily Energy" }
  - { power_id:  cir8, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 8 Daily Energy" }
  - { power_id:  cir9, platform: total_daily_energy, accuracy_decimals: 0, name:  "Circuit 9 Daily Energy" }
  - { power_id: cir10, platform: total_daily_energy, accuracy_decimals: 0, name: "Circuit 10 Daily Energy" }
  - { power_id: cir11, platform: total_daily_energy, accuracy_decimals: 0, name: "Circuit 11 Daily Energy" }
  - { power_id: cir12, platform: total_daily_energy, accuracy_decimals: 0, name: "Circuit 12 Daily Energy" }
  - { power_id: cir13, platform: total_daily_energy, accuracy_decimals: 0, name: "Circuit 13 Daily Energy" }
  - { power_id: cir14, platform: total_daily_energy, accuracy_decimals: 0, name: "Circuit 14 Daily Energy" }
  - { power_id: cir15, platform: total_daily_energy, accuracy_decimals: 0, name: "Circuit 15 Daily Energy" }
  - { power_id: cir16, platform: total_daily_energy, accuracy_decimals: 0, name: "Circuit 16 Daily Energy" }   

What schematics could i show you?
I followed these instructions:
https://github.com/emporia-vue-local/esphome?tab=readme-ov-file
and i am using this USB to serial adapter:
https://www.amazon.com/DSD-TECH-Adapter-FT232RL-Compatible/dp/B07BBPX8B8/ref=sr_1_18?crid=1V5XU7KZS22A9&dib=eyJ2IjoiMSJ9.x6yp3aabdCzbqberYrgK9TN9pPT0i2EgLqdFuu6lY52jXkWvRF3sMKGzahLY47vVFBBeDufxLEVEQeUA567eeMr2SYa8jUpA2QKNUeO_Nrj3xby5ma-GOvWVwwCnGsM3uMOE8y9Ruded_4OVsbk5SAMpKqT9JZCm5Eme0OHoOFUBJKc35JXTKiJdvHJYKdyL.HGQHNROf9O_xGQwmgV5lcdHMVi3DcE6qYnivYlhHGzE&dib_tag=se&keywords=usb+to+serial+adapter+esp32+ftd&qid=1715641834&sprefix=usb+to+serial+adapter+esp32+ftd%2Caps%2C137&sr=8-18&xpid=OD-1Bb6xln9YN

Can’t see your pictures.

I want to see what you have connected to your board and how it’s connected.

If you clean out your YAML to something minimal (nothing connected and basically doing nothing other than connecting to WiFi), do you still have the issue?

Same here, I get an error.

We need to see the pinouts for the specific board.

Lets see if this link works

https://github.com/emporia-vue-local/esphome
This is the whole story with the pics i was trying to show

You’re not answering the questions:

  1. What happens is you flash a near empty config to your ESP: Does it connect to HA?
  2. Which board are you using – and where’s the pinout diagram for that board. By quick inspection, the author’s pins are different from yours. You could’ve connected something incorrectly, used a strapping pin or a boot pin. Hence my point #1.


This is my setup. Hope the pic is good enough.
And i was unable lately to get this thing boot again to get an empty firmware on it. The bootloader doesnt answer me anymore. Previously i was able to to get a connection via esptool.py --flash_id but when i try now i just get that com3 is not answering.

Check your com ports!
“Com3 is not answering” is an issue between you computer and the FTDI device. It is not an issue between the FTDI device and the ESP board.

Checking…hmmm, as soon i have the usb flasher in, com3 shows up, unplugging takes it away. And when i started with this flashing endeavor, i was pretty much every time able to do a “esptool.py flash_id” and got a response about the chip, ram, flash size etc.
That is gone now.
So what part do you think should i check?
I did not mess with the baud rate. Could that be something that could have changed?
I will take a look into that.
What else could i check

If you changed the USB port where the FTDI adapter is connected, then the COM port number might be changed too, so check your device list.

Hello…
I checked, it stays COM3 no matter what USB port i stick it in.
Here the output of the commands:

C:\Windows\system32>esptool flash_id
esptool.py v4.7.0
Found 2 serial ports
Serial port COM3
Connecting......................................
COM3 failed to connect: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Serial port COM1
Connecting......................................
COM1 failed to connect: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

A fatal error occurred: Could not connect to an Espressif device on any of the 2 available serial ports.

I tried a couple baud rates, but no difference

Edit 1
No idea what just happened but all the sudden it connected and now its saying “running stub” and it counts up a percentage very slow…
Havent head that happen before…

Edit 2
Now it stopped at 49% and the corusor just blinks.
I really dont understand whats going on…

Edit 3
Now this:

C:\Users\Darkwing>esptool -b 115200 read_flash 0 0x800000 flash_contents.bin
esptool.py v4.7.0
Found 2 serial ports
Serial port COM3
Connecting......................................
COM3 failed to connect: Failed to connect to Espressif device: Invalid head of packet (0xE0): Possible serial noise or corruption.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html```

Bad wires, connections or solder joints?