ESPHome issue with a repeater (NAT)

Thanks, this looks like a solution. 2 questions:

  1. WAN IP of the router? Is this the gateway i.e.192.168.0.1 (for instance) or the ISP assigned external WAN IP i.e. 156.155.x.x
  2. You have used 192.168.0.144 as the WAN IP and 192.168.4.144 as the static_ip. Is the .144 significant in any way or just random?

Thanks in advance

Edit: finally got it working. Steps below:

  1. Use this for the ESP32 router (GitHub - dchristl/esp32_nat_router_extended: a simple ESP32 NAT Router with some additional features). This allows for port mapping on the ESP32 router itself. Install as per normal.
  2. Normal steps on setting up the AP settings and the STA settings
  3. I set up a static ip for the ESP32 router in my home router - in my case I set it to 192.168.0.202
  4. On the ESP32 router page (192.168.4.1) go to ā€œPortmap configurationā€ and set up 2 portmaps:
    • One for port 6053 to (in my case) 192.168.4.202 (the .202 does not have to be the same but it does
      help mapping the .0.202 on the main vlan to the .4.292 on the .4 vlan
    • One for port 8266 to (in my case) 192.168.4.202
  5. In the ESP device (that is sitting behind the ESP32 router) use the settings as above. In my case this would be:
wifi:
  ssid: xxxx #SSID of the ESP32 router
  password: yyyy #pw of the SSID of the ESP32 router
  fast_connect: true
  use_address: 192.168.0.202 #this is the WAN IP of the ESP32 router on the main vlan.    

  manual_ip:
    # Set this to the IP of the ESP device that is being connected
    static_ip: 192.168.4.202
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.4.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0
  1. If the ESP32 device is present in the ESPHome integration in HA then delete the device and re-add the device (ā€œ+Add Deviceā€ button in the bottom right hand corner) and use 192.168.0.202 as the IP of the device to be added. This should now show as available in the ESPHome integration with data for the sensors

This set up finally worked for me, the ESP32 device is visible. Thank for the advice in the thread

Glad it worked for you. Was trying to remember all the details as I did this long time ago and since then it was just the update to the ESPHome version that I needed to do.