Skip to content

Commit

Permalink
Fix KNX reconnection issue
Browse files Browse the repository at this point in the history
5.13.1a
* Fix KNX reconnection issue (#2679)
  • Loading branch information
arendst committed May 11, 2018
1 parent f7ecc99 commit d18707f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ People helping to keep the show on the road:
- Gerhard Mutz for his SGP30 and Sunrise/Sunset driver
- Nuno Ferreira for his HC-SR04 driver
- Adrian Scillato for his (security)fixes and implementing and maintaining KNX
- Gennaro Tortone for his Eastron SDM120 driver
- Raymond Mouthaan for managing Wemos Wiki information
- Norbert Richter, Frogmore42 and Jason2866 for providing many issue answers
- Many more providing Tips, Pocs or PRs
Expand Down
1 change: 1 addition & 0 deletions sonoff/_releasenotes.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Fix several timer data input and output errors (#2597, #2620)
* Fix KNX config error (#2628)
* Fix sensor MHZ-19 vanishing data over time (#2659)
* Fix KNX reconnection issue (#2679)
* Add Portuguese in Brazil language file
* Add rule state test for On/Off in addition to 0/1 (#2613)
* Add hardware serial option to MHZ-19 sensor (#2659)
Expand Down
13 changes: 13 additions & 0 deletions sonoff/support.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ byte oswatch_blocked_loop = 0;
//void OsWatchTicker() ICACHE_RAM_ATTR;
#endif // USE_WS2812_DMA

#ifdef USE_KNX
bool knx_started = false;
#endif // USE_KNX

void OsWatchTicker()
{
unsigned long t = millis();
Expand Down Expand Up @@ -822,11 +826,20 @@ void WifiCheck(uint8_t param)
}
#endif // USE_EMULATION
#endif // USE_WEBSERVER
#ifdef USE_KNX
if (!knx_started && Settings.flag.knx_enabled) {
KNXStart();
knx_started = true;
}
#endif // USE_KNX
} else {
#if defined(USE_WEBSERVER) && defined(USE_EMULATION)
UdpDisconnect();
#endif // USE_EMULATION
mdns_begun = false;
#ifdef USE_KNX
knx_started = false;
#endif // USE_KNX
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions sonoff/webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,6 @@ void StartWebserver(int type, IPAddress ipweb)
}
#endif // USE_EMULATION
WebServer->onNotFound(HandleNotFound);
#ifdef USE_KNX
KNXStart();
#endif // USE_KNX
}
reset_web_log_flag = 0;
WebServer->begin(); // Web server start
Expand Down

0 comments on commit d18707f

Please sign in to comment.