ESPHome issue with a repeater (NAT)

Hi all,
I have my home assistant setup on a raspberry pi 3+ and that is connected to my main wifi router. I will like to use a repeater (ESP repeater by martin-ger) whit a other SSID (no mash-routing). I tryed the following with out luck:

  • i put all network-information (from repeaters second network) to a yaml-file
  • i compile and upload the yaml to my esp
  • i made a portforwarding (6053 and 8266) on the repaeter to my esp.
  • i changed the ip address in the yaml file, to the ip-address of my repeater. I just save the file and didn’t upload to the ESPHome assistant (so that Home Assistant communicate with my repeater)

yaml compiled on ESP:

  ssid: "ESPSensor"
  password: "xyxyxy"

yaml just on Homeassistant

  ssid: "ESPSensor"
  password: "xyxyxy"

Now, the logfile in the ESP Platform lucks correct:

But the esp shows as offline and also don’t resive any data:

What did i forget? Can anyone help? Thanks a lot

Does it support mDNS?

It needs to.

and it’s needs to be the same mDNS on both networks using a reflector or something…

Guess there is no change to make it work with the “esp repeater” you linked

mDNS is not on board :see_no_evil:
but strange, I get the measured values ​​in the log files :man_shrugging:t3:

So I have to find another solution. I just want to connect to a ESP outside of the “normal” WLAN signal.
Could i switch to mqtt whit this repeater? Or if I make a mesh, can I shut my i-phone off that ugly slow repeated signal?

That’s true. I guess you have api: inside your yaml? You could actually try from home assistant to add a new esphome device and try as IP.

Still this topic was already mentioned couple of times on discord and there was never a real solution to it if you use NAT (meaning you actually cascade two networks).

no luck with a new sensor. Same effect: In the log everithing ok but the state are offline

i just juse “api:” here the full code:

  name: esp_windsensor
  platform: ESP8266
  board: d1_mini_lite

  ssid: "ESP_Sensor"
  password: "xyxyxyxy"

    ssid: "POE_Fallback_Hotspot_Windsensor"
    password: "BMbDBwnS72i9"


# Enable logging

# Enable Home Assistant API


  - platform: adc
    pin: A0
    name: "Windsensor Spannung"
    update_interval: 10s
      - multiply: 3.3

  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 20s

Can you ping it?

Frome the primary side (router, homeassistant,…) to the repeater, seems ok(on picture, upper request).
From the secoundary side (other side of NAT) to the esp device seems also ok (on the picture the secend request - I change with the notebook to the “secoundary side wlan” for the secound request)

No one is interested in your screenshots of text.

Copy and paste was developed last century, please learn to use it.

ping is actually totally useless if you want to get the api to work…

Two different scenarios which could work for you are:

  1. Try your luck with mqtt. As there is no mDNS involved directly it could work out with the configuration you have right now

  2. Give esphome with esp-now a shot

1 Like

Thank you for taking me back to the present. :rofl:
Both ping requests were successful. I wonder which track you want to lead me on.

Thank you for your help. I think I choose the MQTT adventure.

ping is always the first step on testing networking issues.

It really doesn’t matter because mDNS ≠ DNS. The later could be used to ping a hostname - or you ping the IP directly like @Yves_IF did. In anyway it doesn’t help at all for this particular issue @nickrout

It does prove that the device is reachable over the network. Then the next step is to work out why your particular service/or application is not responding as you would expect.


multicastDNS/bonjour can’t cross a NAT. So no way for api/ota (what @Yves_IF was trying).
So it does what is expected → it doesn’t work

Anyway alternative solutions like trying mqtt or esp-now are already on the table…

Read the first reply.

1 Like

I read the second…

1 Like

Just to add a solution that worked for me in order to put a router between HA and my ESP. Here is the config of the ESPHome that is behind the router:

  ssid: xxxx
  password: yyyyy
  fast_connect: true
  use_address: #this is the WAN IP of the router.    

On the router, you need to configure port forwarding for 6053 and 8266 ports.

When integrating the ESPHome device in HA, I use the WAN IP of the router.

I am using this w/o problems for 2 years now.

Hope this helps.