Hello there,
I have some troubles flashing my ESP32 with OTA. I configured ESP32 for OTA with Arduino IDE. Now it is possible to flash ESP32 with Arduino IDE, but when I try to flash it with ESPhome I got the following error mesage. I’m quite new to ESP and could not find any existing topics here. Does somebody has a hint for me?
Thanks a lot Fabian
Errormessage:
INFO Successfully compiled program.
INFO Connecting to 192.168.1.194
ERROR Connecting to 192.168.1.194:3232 failed: [Errno 111] Connection refused
**ESPhome Yaml:
esphome:
name: esp32_temp_heizung
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxx"
ota:
safe_mode: True
id: "esp32_temp_heizung"
password: "xxxxxxx"
wifi:
use_address: 192.168.1.194
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-Temp-Heizung"
password: "W4DJGHknkmX2"
captive_portal:
Arduino IDE code:
#include <WiFi.h>
#include <ArduinoOTA.h>
const char* ssid = "fabulous";
const char* password = "xxxxxxx";
String hostname = "esp32_temp_heizung";
void setup() {
Serial.begin(9600);
WiFi.setHostname(hostname.c_str());
WiFi.begin(ssid, password);
ArduinoOTA.setHostname("esp32_temp_heizung");
ArduinoOTA.setPassword("xxxxxxx");
ArduinoOTA.begin();
while (WiFi.status() != WL_CONNECTED) {
Serial.println(".");
delay(500);
}
Serial.print("You're connected to the network");
Serial.println(WiFi.SSID());
Serial.print(WiFi.networkID());
Serial.print(WiFi.localIP());
}
void loop() {
ArduinoOTA.handle();
}