         OLED.clear();
         OLED.setFont( ArialMT_Plain_10 );
         OLED.drawString( 64, 10, "Waiting for SmartConfig." );
-        snprintf( remainingSCTime, sizeof( remainingSCTime), "%i seconds",  ( 100 + rebootTime - millis() ) / 1000 );
+        snprintf( remainingSCTime, sizeof( remainingSCTime), "%i seconds", ( (unsigned long) ( smartConfigStartMs + rebootDelayMs ) - millis() ) / 1000 );
         OLED.drawString( 64, 30, remainingSCTime );
         OLED.invertDisplay();
         OLED.display();

    WiFi.mode( WIFI_AP_STA );
    WiFi.beginSmartConfig();

    const time_t rebootTime = millis() + ( rebootSeconds * 1000 );

    while ( !WiFi.smartConfigDone() && millis() < rebootTime )
    {
      char remainingSCTime[12];
      if ( xOledTaskHandle )

void wifiTask( void * pvParameters )
{
  /* trying last accesspoint */
  WiFi.mode( WIFI_STA );
  WiFi.begin();
