Skip to content

Commit d18707f

Browse files
committed
Fix KNX reconnection issue
5.13.1a * Fix KNX reconnection issue (#2679)
1 parent f7ecc99 commit d18707f

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ People helping to keep the show on the road:
182182
- Gerhard Mutz for his SGP30 and Sunrise/Sunset driver
183183
- Nuno Ferreira for his HC-SR04 driver
184184
- Adrian Scillato for his (security)fixes and implementing and maintaining KNX
185+
- Gennaro Tortone for his Eastron SDM120 driver
185186
- Raymond Mouthaan for managing Wemos Wiki information
186187
- Norbert Richter, Frogmore42 and Jason2866 for providing many issue answers
187188
- Many more providing Tips, Pocs or PRs

sonoff/_releasenotes.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Fix several timer data input and output errors (#2597, #2620)
77
* Fix KNX config error (#2628)
88
* Fix sensor MHZ-19 vanishing data over time (#2659)
9+
* Fix KNX reconnection issue (#2679)
910
* Add Portuguese in Brazil language file
1011
* Add rule state test for On/Off in addition to 0/1 (#2613)
1112
* Add hardware serial option to MHZ-19 sensor (#2659)

sonoff/support.ino

+13
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ byte oswatch_blocked_loop = 0;
3535
//void OsWatchTicker() ICACHE_RAM_ATTR;
3636
#endif // USE_WS2812_DMA
3737

38+
#ifdef USE_KNX
39+
bool knx_started = false;
40+
#endif // USE_KNX
41+
3842
void OsWatchTicker()
3943
{
4044
unsigned long t = millis();
@@ -822,11 +826,20 @@ void WifiCheck(uint8_t param)
822826
}
823827
#endif // USE_EMULATION
824828
#endif // USE_WEBSERVER
829+
#ifdef USE_KNX
830+
if (!knx_started && Settings.flag.knx_enabled) {
831+
KNXStart();
832+
knx_started = true;
833+
}
834+
#endif // USE_KNX
825835
} else {
826836
#if defined(USE_WEBSERVER) && defined(USE_EMULATION)
827837
UdpDisconnect();
828838
#endif // USE_EMULATION
829839
mdns_begun = false;
840+
#ifdef USE_KNX
841+
knx_started = false;
842+
#endif // USE_KNX
830843
}
831844
}
832845
}

sonoff/webserver.ino

-3
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,6 @@ void StartWebserver(int type, IPAddress ipweb)
392392
}
393393
#endif // USE_EMULATION
394394
WebServer->onNotFound(HandleNotFound);
395-
#ifdef USE_KNX
396-
KNXStart();
397-
#endif // USE_KNX
398395
}
399396
reset_web_log_flag = 0;
400397
WebServer->begin(); // Web server start

0 commit comments

Comments
 (0)