ETS can be started with additional command-line arguments. Using these arguments, the user can specify actions that will be executed when ETS starts.
Supported actions
The following actions are supported:
The command line parameters are case-sensitive!
- Open a project
- Create a project
- Delete a project
- Check a project
- Import a project
- Install an ETS App
- Open an ETS App
- Start the Group Monitor
- Start the Bus Monitor
- Start the project creation wizard
- Quit ETS
- Help
- Version
Open a Project
--openProject "name of the project"
or
-o "name of the project"
- Opens an existing project right after ETS start.
- The "name of the project" shall be the actual project name
- If the project requires a password, then the 'Enter password dialog' is shown.
- It can be combined with the parameter --password to open a password protected project. If the project password is incorrect, then the 'Enter password dialog' is shown in order to enter the correct password.
Example
--openProject "My Home project" --password "Password123@#"
or
-o "My Home project" --password "Password123@#"
Create a project
--createProject "name of the project" or -c "name of the project"
- Creates a new project (same function as in the standard project creation dialog), with the following default settings:
- Backbone Medium: IP
- Topology: Create Line 1.1 with medium type TP
- Group Address Style: Three Level
- It can be combined with the parameter --password to create a password protected project.
Example
--createProject "My Home project" --password "Password123@#"
or
-c "My Home project" --password "Password123@#"
Delete a project
--deleteProject "name of the project" or -d "name of the project"
Deletes an existing project from the Project Store. The exit code values indicate the following:
- Successful deletion: return value = 0
- Unsuccessful deletion: return value = -2
Example
--deleteProject "My Home project"
or
-d "My Home project"
Check if a project exists
--existsProject "name of the project" or -e "name of the project"
- Checks if there is an existing project with the specified name in the Project Store.
- The exit code values indicate the following:
- Projects exists: return value = 1
- Project does not exist: return value = 0
- After this ETS closes automatically, i.e. there is no need to add the --quit argument.
Example
--existsProject "My Home project"
or
-e "My Home project"
Import a project
--importProject "file path to the project file" or -i "file path to the project file"
- Imports a specific project file (either in "knxproj" or "pr" format) into the Project Store.
- Importing a password-protected project, then the 'Enter password dialog' is shown in order to be manually entered.
Example
--importProject "C:\MyProjects\MyHomeproject.knxproj"
or
-i "C:\MyProjects\MyHomeproject.knxproj"
Install an ETS App
--installApp "file path to the App file" or -a "file path to the App file"
- Installs an ETS App represented by the specified *.etsapp file.
Example
--installApp "C:\MyProjects\MyApp.etsapp"
or
-a "C:\MyProjects\MyApp.etsapp"
Open an ETS App
--openApp "AppId"
- Opens an ETS App with a specific App Identifier within a project and therefore it also requires an existing project to be specified via the --openProject command.
- The previous project workspace will be discarded and a new workspace will be created which contains only one window, tab and panel and the panel will contain the requested app.
- The exit code values indicate the following:
- "40" when the AppId is not set
- "41" when the given AppId is invalid
- "42" when no ETS App with the given AppId can be found
- "43" when the requested ETS App requires native mode, but ETS runs in compatibility mode
- "44" when the requested ETS App requires compatibility mode, but ETS runs in native mode
- "45" when the requested ETS App cannot be started
- "46" when the requested ETS App is not licensed
Example
--openProject "name of the project" --openApp "M00FA-A0005"
Start the Group Monitor
--groupmon "name of the project" or -g "name of the project"
-
This command starts the Group Monitor in a given project.
Example
--groupmon "My Home project"
or
-g "My Home project"
Start the Bus Monitor
--busmon "name of the project" or -b "name of the project"
-
This command starts the Bus Monitor in a given project.
Example
--busmon "My Home project"
or
-b "My Home project"
Start the project creation wizard
--wizard or -w
-
This command starts the Project Creation wizard.
Quit ETS
--quit or -q
- Closes ETS after executing all other command line arguments.
- ETS will however not close despite the --quit argument if at least one of the other command line arguments caused an error which resulted in ETS error/warning messages dialogs.
Help
--help
-
This command displays the help in the console.
Version
--version
-
This command displays the current ETS version in the console.
Combination of Command-Line Arguments
The only possible combinations of command-line arguments are
- --openProject and --importProject
- --password can be combined with --openProject and --createProject
- --quit can be used together with one other parameter
- --openApp always requires --openProject (and a --password if necessary)
Once ETS6 process is started, the only accepted commands are: --createProject, --wizard and -importProject - they are needed for the ETS Windows taskbar commands.
OpenProject will use the latest active ETS6 window and open - if needed - a new dashboard tab. Any other command that is launched after ETS6 is already started, will not be processed, but will only bring ETS6 to the front.
Error handling
In case of errors or bad commands, ETS will log the messages into the ETS log located at %LOCALAPPDATA%\Knx\ETS6\Log\ETS6.log
Return Codes
For some command-line arguments (e.g. --existsProject), ETS returns an exit code. Exit codes are not printed out to the console but the 'errorlevel' variable receives the exit code value.
In order to evaluate the exit code, a batch script can use the IF ERRORLEVEL construct or use variable expansion like in echo %errorlevel%. When ETS is invoked directly from the command line (and not from a .bat or .cmd script), then it has to be invoked with either cmd /c ETS6.exe ... or start /wait ETS6.exe ...
Common returns codes
Common return codes are return codes that can be set on any command:
- -1 if parameter syntax/options not correct
- -2 if operation failed, e.g. project could not be opened, deleted, imported or created due to an error (but command specific return codes do not apply)