Live demo — data resets daily at 03:00 UTC. Nothing you enter is saved. Server UI →

exit - Exit Application

Description

The exit command terminates the AccordionShell application. This cleanly closes any active connections and exits the program.

Syntax

exit

Options

This command has no options.

Examples

Exit the Application

exit

Output:

See ya later!

The application then terminates.

In Script Context

# Connect and perform operations
init --host 192.168.1.100
get --channel "SENSOR_1"
set --channel "OUTPUT" --value "1"

# Clean exit
exit

Output Format

See ya later!

Output Colors

  • Dark Yellow: Exit message

Behavior

  1. Displays farewell message
  2. Calls Environment.Exit(0)
  3. Immediately terminates application
  4. Exit code: 0 (success)

Use Cases

Interactive Mode Exit

AccordionShell.exe
> init --host accordion-dev
> list
> get --channel "STATUS"
> exit

Application closes and returns to shell prompt.

Script Completion

# script.bat
AccordionShell.exe init --host 192.168.1.100
AccordionShell.exe set --channel "POWER" --value "ON"
AccordionShell.exe wait --channel "READY" --value "1"
AccordionShell.exe exit

Ensures clean termination after scripted operations.

Error Recovery Exit

# If errors occur, exit cleanly
init --host 192.168.1.100
# ... error occurs ...
exit  # Clean shutdown

Connection Handling

Active Connections

exit terminates immediately:

  • Does NOT send disconnect to hardware
  • Does NOT wait for pending operations
  • Connection is abruptly closed

Best Practice: For clean disconnection, use specific disconnect options first:

# Clean disconnect for firmware operations
firmware --disconnect
exit

# For standard operations, exit is sufficient
exit

Alternatives to Exit

Alternative Use Case
Ctrl+C Interrupt running operation, then exit
firmware --disconnect Disconnect SSH session before exit
Close window Force termination (not recommended)

Exit Codes

Code Meaning
0 Normal exit via exit command
Other Abnormal termination or error

Notes

  • Immediate: Exit is immediate, no confirmation prompt
  • No Cleanup: Does not perform hardware cleanup operations
  • State Lost: Any unsaved state is lost
  • Connection: Hardware connection is dropped (hardware continues running)

Best Practices

  1. Save Work First: Ensure critical operations are complete
  2. Document State: Note hardware state before exiting
  3. Clean Disconnect: Use firmware disconnect for SSH sessions
  4. Script Usage: Always include exit at end of scripts

Interactive Mode

In interactive mode, you can also exit by:

  • Typing exit
  • Pressing Ctrl+C (keyboard interrupt)
  • Closing the terminal window

The exit command is the cleanest method.

Script Mode

In script mode, exit is typically not needed as AccordionShell exits after executing the command:

# This exits automatically after execution
AccordionShell.exe get --channel "SENSOR"

# Exit is redundant but harmless
AccordionShell.exe get --channel "SENSOR"
AccordionShell.exe exit

Comparison with Other Commands

Command Purpose Connection
exit Terminate application Dropped
firmware --disconnect Close SSH session SSH closed, app continues
reset Reset hardware Maintained

Error Scenarios

Cannot Exit (Theoretical)

The exit command calls Environment.Exit(0) which forcefully terminates the process. It cannot fail under normal circumstances.

If the application appears frozen:

  1. Press Ctrl+C
  2. Close terminal window
  3. Use Task Manager (Windows) or kill command (Linux)

Example Sessions

Quick Check Session

$ AccordionShell.exe
> init --host 192.168.1.50
Connected to 192.168.1.50
> get --channel "TEMPERATURE"
23.5 °C
> exit
See ya later!
$

Configuration Session

$ AccordionShell.exe
> init --host accordion-lab-01
> alias --activate "lab_config.xml"
> list --filter "POWER.*"
POWER_MAIN: ON
POWER_AUX: OFF
> set --channel "POWER_AUX" --value "ON"
> exit
See ya later!
$

See Also

  • init - Initialize connection
  • firmware - Firmware operations (includes disconnect option)
  • reset - Reset hardware (not exit application)
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.