async deleteUnusedSections(iRoute, iConnection, iSections){
		//let StatesJSON;
		let Status;
		const SectionRegEx = `${this.Fahrplan.name}\\.${this.Fahrplan.instance}\\.${iRoute.toString()}\\.${iConnection.toString()}\\.(\\d*)\\..*$`;
		try{
			const States = await this.Fahrplan.getStatesAsync(`${iRoute.toString()}.${iConnection.toString()}.*`);
			//StatesJSON = JSON.stringify(States);
			this.ReportingInfo("Debug", "Route", `Delete unused sections for Route #${iRoute}, Connection #${iConnection} with max section # ${iSections} and regex:${SectionRegEx}`, "fHelpers", "deleteUnusedSections");
			for (const State in States){
				Status = {action: "For", CurrentState: State.toString(), Delete: false, Type: "unknown"};
				const Searcher = State.toString().match(new RegExp(SectionRegEx));
				if (Searcher !== null){
					if (parseInt(Searcher[1]) > iSections ){
						Status.Delete = true;
						// Verify that associated object exists
						const CurrentObj = await this.Fahrplan.getObjectAsync(State.toString());
						if (CurrentObj){
							Status.Type = "object";
							if (this.isUnloaded === false) await this.Fahrplan.delObjectAsync(State.toString());
						} else{
							const CurrentState = await this.Fahrplan.getStateAsync(State.toString());
							if (CurrentState){
								Status.Type = "state";
								if (this.isUnloaded === false) await this.Fahrplan.deleteStateAsync(State.toString());
							}
						}
					}
				}
			}
		}catch(e){
			this.ReportingError(e, `Exception removing unused Sections`, "fHelpers", "deleteUnusedSections", "DeleteStates",{json: JSON.stringify(Status)});
		}
		let ChannelsJSON;
		try{
			const Channels = await this.Fahrplan.getChannels();
			if (Channels){
				ChannelsJSON = JSON.stringify(Channels);
				for (const Channel of Channels){
					if (Channel["_id"]){
						const Searcher = Channel["_id"].toString().match(new RegExp(SectionRegEx));
						if (Searcher !== null){
							if (parseInt(Searcher[1]) > iSections ){
								if (this.isUnloaded === false) this.Fahrplan.delObject(Channel["_id"]);
							}
						}
					}
				}
			}
		}catch(e){
			this.ReportingError(e, `Exception removing unused Sections`, "fHelpers", "deleteUnusedSections", "DeleteChannels",{json: ChannelsJSON});
		}
	}
/**
	* Sets boolean State
	* @param {Number} iRoute Number of Route from configuration
	* @param {Number} iConnection Number of Connection
	* @param {Number} iSections Number of Sections in Connection
	*/
Sets boolean State
@param {Number} iRoute Number of Route from configuration
@param {Number} iConnection Number of Connection
@param {Number} iSections Number of Sections in Connection
Sets boolean State @param { Number } iRoute Number of Route from configuration @param { Number } iConnection Number of Connection @param { Number } iSections Number of Sections in Connection
async deleteUnusedSections(iRoute, iConnection, iSections){
		let Status;
		const SectionRegEx = `${this.Fahrplan.name}\\.${this.Fahrplan.instance}\\.${iRoute.toString()}\\.${iConnection.toString()}\\.(\\d*)\\..*$`;
		try{
			const States = await this.Fahrplan.getStatesAsync(`${iRoute.toString()}.${iConnection.toString()}.*`);
			this.ReportingInfo("Debug", "Route", `Delete unused sections for Route #${iRoute}, Connection #${iConnection} with max section # ${iSections} and regex:${SectionRegEx}`, "fHelpers", "deleteUnusedSections");
			for (const State in States){
				Status = {action: "For", CurrentState: State.toString(), Delete: false, Type: "unknown"};
				const Searcher = State.toString().match(new RegExp(SectionRegEx));
				if (Searcher !== null){
					if (parseInt(Searcher[1]) > iSections ){
						Status.Delete = true;
						const CurrentObj = await this.Fahrplan.getObjectAsync(State.toString());
						if (CurrentObj){
							Status.Type = "object";
							if (this.isUnloaded === false) await this.Fahrplan.delObjectAsync(State.toString());
						} else{
							const CurrentState = await this.Fahrplan.getStateAsync(State.toString());
							if (CurrentState){
								Status.Type = "state";
								if (this.isUnloaded === false) await this.Fahrplan.deleteStateAsync(State.toString());
							}
						}
					}
				}
			}
		}catch(e){
			this.ReportingError(e, `Exception removing unused Sections`, "fHelpers", "deleteUnusedSections", "DeleteStates",{json: JSON.stringify(Status)});
		}
		let ChannelsJSON;
		try{
			const Channels = await this.Fahrplan.getChannels();
			if (Channels){
				ChannelsJSON = JSON.stringify(Channels);
				for (const Channel of Channels){
					if (Channel["_id"]){
						const Searcher = Channel["_id"].toString().match(new RegExp(SectionRegEx));
						if (Searcher !== null){
							if (parseInt(Searcher[1]) > iSections ){
								if (this.isUnloaded === false) this.Fahrplan.delObject(Channel["_id"]);
							}
						}
					}
				}
			}
		}catch(e){
			this.ReportingError(e, `Exception removing unused Sections`, "fHelpers", "deleteUnusedSections", "DeleteChannels",{json: ChannelsJSON});
		}
	}
async deleteUnusedSections ( iRoute , iConnection , iSections ) { let Status ; const SectionRegEx = ` ${ this . Fahrplan . name } \\ ${ this . Fahrplan . instance } \\ ${ iRoute . toString ( ) } \\ ${ iConnection . toString ( ) } \\ \\ \\ ` ; try { const States = await this . Fahrplan . getStatesAsync ( ` ${ iRoute . toString ( ) } ${ iConnection . toString ( ) } ` ) ; this . ReportingInfo ( "Debug" , "Route" , ` ${ iRoute } ${ iConnection } ${ iSections } ${ SectionRegEx } ` , "fHelpers" , "deleteUnusedSections" ) ; for ( const State in States ) { Status = { action : "For" , CurrentState : State . toString ( ) , Delete : false , Type : "unknown" } ; const Searcher = State . toString ( ) . match ( new RegExp ( SectionRegEx ) ) ; if ( Searcher !== null ) { if ( parseInt ( Searcher [ 1 ] ) > iSections ) { Status . Delete = true ; const CurrentObj = await this . Fahrplan . getObjectAsync ( State . toString ( ) ) ; if ( CurrentObj ) { Status . Type = "object" ; if ( this . isUnloaded === false ) await this . Fahrplan . delObjectAsync ( State . toString ( ) ) ; } else { const CurrentState = await this . Fahrplan . getStateAsync ( State . toString ( ) ) ; if ( CurrentState ) { Status . Type = "state" ; if ( this . isUnloaded === false ) await this . Fahrplan . deleteStateAsync ( State . toString ( ) ) ; } } } } } } catch ( e ) { this . ReportingError ( e , ` ` , "fHelpers" , "deleteUnusedSections" , "DeleteStates" , { json : JSON . stringify ( Status ) } ) ; } let ChannelsJSON ; try { const Channels = await this . Fahrplan . getChannels ( ) ; if ( Channels ) { ChannelsJSON = JSON . stringify ( Channels ) ; for ( const Channel of Channels ) { if ( Channel [ "_id" ] ) { const Searcher = Channel [ "_id" ] . toString ( ) . match ( new RegExp ( SectionRegEx ) ) ; if ( Searcher !== null ) { if ( parseInt ( Searcher [ 1 ] ) > iSections ) { if ( this . isUnloaded === false ) this . Fahrplan . delObject ( Channel [ "_id" ] ) ; } } } } } } catch ( e ) { this . ReportingError ( e , ` ` , "fHelpers" , "deleteUnusedSections" , "DeleteChannels" , { json : ChannelsJSON } ) ; } }
Sets boolean State
 @param {Number} iRoute Number of Route from configuration
 @param {Number} iConnection Number of Connection
 @param {Number} iSections Number of Sections in Connection
Sets boolean State @param { Number } iRoute Number of Route from configuration @param { Number } iConnection Number of Connection @param { Number } iSections Number of Sections in Connection
//let StatesJSON; //StatesJSON = JSON.stringify(States); // Verify that associated object exists