Hello,
I have problems to connect my ESP32 device via Wireguard to ESPHome.
I am using following code for the ESP32 device.
esphome:
name: bmp180testi2
friendly_name: BMP180testi2
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxx="
ota:
- platform: esphome
password: "xxxxxx"
wifi:
ssid: ext_wifi
password: xxxxxxx
use_address: 172.27.66.3
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Bmp180 Fallback Hotspot"
password: "xxxxxxxx"
captive_portal:
# Example configuration entry
time:
- platform: homeassistant
id: homeassistant_time
on_time_sync:
then:
- logger.log: "Synchronized sntp clock"
- platform: sntp
timezone: Europe/Helsinki
servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
- 2.pool.ntp.org
update_interval: 60s
# Example configuration entry
wireguard:
address: 172.27.66.6
private_key: xxxxxxxxx=
peer_endpoint: domain.com
peer_public_key: xxxx=
peer_allowed_ips: 0.0.0.0
peer_port: 1600
# netmask: 0.0.0.0
peer_persistent_keepalive: 15s
i2c:
sda: GPIO21
scl: GPIO22
scan: true
sensor:
- platform: bmp085
temperature:
name: "Outside Temperature"
pressure:
name: "Outside Pressure"
update_interval: 60s
The log is following:
INFO ESPHome 2024.10.3
INFO Reading configuration /config/esphome/bmp180testi2.yaml...
INFO Detected timezone 'Europe/Helsinki'
INFO Generating C++ source...
INFO Compiling app...
Processing bmp180testi2 (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.6
|-- Wire @ 2.0.0
|-- esp_wireguard @ 0.4.2
RAM: [= ] 13.3% (used 43696 bytes from 327680 bytes)
Flash: [===== ] 53.6% (used 983909 bytes from 1835008 bytes)
========================= [SUCCESS] Took 21.21 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 172.27.66.3
ERROR Connecting to 172.27.66.3:3232 failed: timed out
The wireguard works just fine, I have tested the configuration with my Iphone.
I have now fought couple of days with the error without finding a solution.
Can anyone advise me forward. Any tips?