 void networkConnect();
 void wifiConnect();
 void ethernetConnect();
-
 void serverCheck();
 String serverHeader(String);
+String requestHeader(String url);
+bool networkRequest(IPAddress server, String url);
 
 void triggerCheck();
 void gotTriggered();
 
+void push();
 void xs1Push();
 void strombewusstPush();
 

  int pointer = millis() / 1000 / TIMEFRAME % STORAGE_HOURS;
  if (pointer != storagePointer)
  {
    #ifdef USE_STROMBEWUSST_SERVER
      strombewusstPush();
    #endif
    #ifdef USE_XS1_SERVER
      xs1Push();
    #endif
    storagePointer = pointer;
    pointerChanged();
  }
}

#ifdef USE_XS1_SERVER
void xs1Push()
{

}  
#endif
  
void strombewusstPush()
{
  // Make sure we have either the Ethernet or WiFi shield enabled
  #ifdef USE_STROMBEWUSST_SERVER  
    // Set the last byte the the current frame's value
    udpBuffer[33] = storage[storagePointer];
    udp.beginPacket(STROMBEWUSST_SERVER, STROMBEWUSST_PORT);
    udp.write(udpBuffer);
    udp.endPacket();
  #endif
}

void pointerChanged()

  Serial.println("Pointer changed to "+String(storagePointer));
}



void push()
{
   #ifdef USE_STROMBEWUSST_SERVER
    strombewusstPush();
  #endif
  #ifdef USE_XS1_SERVER
    xs1Push();
  #endif
}

#ifdef USE_XS1_SERVER
void xs1Push()
{
  IPAddress server XS1_IP;
  String url = XS1_URL+String(storage[storagePointer]);
  if (networkRequest(server, url) == true)
  {
    Serial.println("XS1 updated");
  } else
  {
    Serial.println("XS1 update failed");
  }
}  
#endif

#ifdef USE_NETWORK
bool networkRequest(IPAddress server, String url)
{
  if (client.connect(server, 80))
  {
    requestHeader(url).toCharArray(requestBuffer, 128);
    client.write(requestBuffer);
    return true;
  } else
  {
    return false;
  }
  
}

String requestHeader(String url)
{
 return "GET "+url+"HTTP/1.1\r\nConnection: close\r\n\r\n";
}
#endif

#ifdef USE_STROMBEWUSST_SERVER 
void strombewusstPush()
{
  // Set the last byte the the current frame's value
  udpBuffer[33] = storage[storagePointer];
  udp.beginPacket(STROMBEWUSST_SERVER, STROMBEWUSST_PORT);
  udp.write(udpBuffer);
  udp.endPacket();
}
#endif 

#ifdef USE_NETWORK
String generateJSON()
{
