From dcbf5a8c94dd1ec32eb6717ecfdf0dd2664d5dbb Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Thu, 13 Dec 2018 23:04:48 +0000 Subject: [PATCH] Fix ArduinoOTA for Core 2.5.0 (fix is backwards compatible) https://github.com/arendst/Sonoff-Tasmota/issues/4619 --- sonoff/sonoff.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 8e4006ca1..362b48ced 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2215,7 +2215,7 @@ uint16_t arduino_ota_progress_dot_count = 0; void ArduinoOTAInit(void) { ArduinoOTA.setPort(8266); - ArduinoOTA.setHostname(Settings.hostname); + ArduinoOTA.setHostname(my_hostname); if (Settings.web_password[0] !=0) ArduinoOTA.setPassword(Settings.web_password); ArduinoOTA.onStart([]() @@ -2799,6 +2799,7 @@ void loop(void) if (!serial_local) SerialInput(); #ifdef USE_ARDUINO_OTA + MDNS.update(); ArduinoOTA.handle(); // Once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails) while (arduino_ota_triggered) ArduinoOTA.handle();