init - Initialize Connection
Description
The init command establishes a connection to an Accordion hardware device. This is typically the first command you run before performing any hardware operations.
Syntax
init --host <hostname_or_ip> [options]
Required Options
| Option | Short | Description |
|---|---|---|
--host |
-h |
The hostname or IP address of the Accordion hardware to connect to |
Optional Options
| Option | Short | Description | Default |
|---|---|---|---|
--notification |
-n |
Enable notification event reception | false |
--telemetry |
-t |
Enable telemetry event reception | false |
Examples
Basic Connection
init --host 192.168.1.100
Connection with Notifications
init --host accordion-dev-01 --notification
Connection with Telemetry
init --host 192.168.1.100 --telemetry
Connection with Both Events
init -h 192.168.1.100 -n -t
Behavior
- Establishes connection to the specified host
- Calls WebApiState.Connect() with the host URL
- Retrieves connection status from the API
- Warns if host responds but reports not connected
- Reports success message
- If notification or telemetry flags are used, displays a notice that they are not supported in WebApi mode
Output
Success message:
Connecting to http://192.168.1.100...
Connected to http://192.168.1.100
With notifications/telemetry requested:
Connecting to http://192.168.1.100...
Connected to http://192.168.1.100
→ Notifications requested but not supported in WebApi mode
→ Telemetry requested but not supported in WebApi mode
Event Handlers
Notifications
The --notification flag is accepted but not currently supported in WebApi mode. A message is displayed indicating this limitation.
Telemetry
The --telemetry flag is accepted but not currently supported in WebApi mode. A message is displayed indicating this limitation.
Note: These flags exist for compatibility but have no effect in the current WebApi client implementation. The shell will display a dim-colored notice when these flags are used.
Notes
- You must initialize a connection before using most other commands
- Only one connection can be active at a time
- Connection state persists in interactive mode
- Use this command first in batch scripts
Error Handling
Common errors:
- Host not found: Check hostname/IP address
- Connection refused: Verify the Accordion service is running
- Timeout: Check network connectivity and firewall settings