 
     else if ( request->hasArg( "sensor" ) ) {
       if ( !logger.sensorCount() ) return request->send( 501, HEADER_HTML, NOT_PRESENT_ERROR_501 );
-      if ( !request->hasArg( "number" ) ) return request->send( 400, HEADER_HTML, "No sensornumber" );
+      if ( !request->hasArg( "number" ) ) return request->send( 400, HEADER_HTML, NO_SENSORNUMBER );
       uint8_t num = request->arg( "number" ).toInt();
-      if ( num >= logger.sensorCount() ) return request->send( 400, HEADER_HTML, "Invalid sensornumber" );
+      if ( num >= logger.sensorCount() ) return request->send( 400, HEADER_HTML, INVALID_SENSORNUMBER );
       sensorName_t name;
       sensorId_t id;
       AsyncResponseStream *response = request->beginResponseStream( HEADER_HTML );

        logger.stopErrorLogging();
        return request->send( 200, HEADER_HTML, "OFF" );
      }
      else return request->send( 400, HEADER_HTML, "Invalid option." );
    }

    else if ( request->hasArg( "sensorname" ) ) {
      if ( request->arg( "sensorname" ).length() > sizeof( sensorName_t ) )
        return request->send( 400, HEADER_HTML, "Sensorname too long" );

      if ( !request->hasArg( "number" ) ) return request->send( 400, HEADER_HTML, "No sensornumber" );
      uint8_t num = request->arg( "number" ).toInt();
      if ( num > logger.sensorCount() ) return request->send( 400, HEADER_HTML, "Invalid sensornumber" );
      sensorId_t id;
      logger.getSensorId( num, id );
      if ( !logger.setSensorName( id, request->arg( "sensorname" ).c_str() ) )

        logger.stopTempLogging();
        return request->send( 200, HEADER_HTML, "OFF" );
      }
      else return request->send( 400, HEADER_HTML, INVALID_OPTION );
    }

    else if ( request->hasArg( "sensorerrorlogging" ) ) {
