The AlphaMon Platform includes a Command Line Interface (CLI) which allows you to type commands directly into your terminal emulator app.
The following sections describe the supported list of CLI commands:
Firmware Version 4.17
The AlphaMon’s Command Line Interface (CLI) provides a direct gateway to the device’s configuration and system kernel. Access is provided via the USB-Serial service port at 115200 baud. If your terminal app is configured to send your typed commands character-by-character you’ll see the AlphaMon’s log output paused until you hit the Enter key.
1. Core Syntax
Commands follow a hierarchical “Prefix-Command-Value” structure.
- Case Sensitivity: Commands are case-insensitive.
- Separators: Use spaces between tokens and
=or:for assignments. - Quotes: Use double-quotes for values containing spaces (e.g.,
SET AP_SSID = "My WiFi").
2. Configuration Group (CONFIG)
The CONFIG group manages the internal configuration settings which are stored in the file named AlphaMon.cfg in the AlphaMon’s on-device SPIFFS storage area.
NOTE: Files located in SPIFFS storage have an “SP:/” prefix whilst files located on the external micro SD Card have an “SD:/” prefix. Thus, the default AlphaMon Config File appears as “SP:/AlphaMon” in file and directory listings.
Config Assignment Commands:
Update parameters using either the explicit or direct syntax:
- Direct:
CONFIG [VARIABLE] = [VALUE] - Explicit use of the
SETsub-command:CONFIG SET [VARIABLE] = [VALUE] - Example: CONFIG LORA_ENABLED = “N”
Config Utility Commands
CONFIG LIST: Displays all internal config settings and their current values.CONFIG SAVE: Commits in-memory changes to the internal SPIFFS storage.CONFIG SAVE [FILENAME]: Exports settings to a custom backup file.CONFIG SET [VARIABLE] = [VALUE]CONFIG RESTORE [FILENAME]: Loads settings from a specific backup file.CONFIG RELOAD: Discards unsaved changes and reverts to the last saved state.CONFIG RESET: Restores all parameters to factory defaults (Warning: Clears credentials).
3. System Group (SYS)
The SYS group manages hardware state and connectivity.
SYS ID: Displays hardware metadata including MAC address, Firmware version, Build date, and Memory (RAM/PSRAM) health.SYS RECONNECT: Forces a complete reset of the WiFi, Internet, and MQTT stacks. Essential for troubleshooting “Offline” status after config changes.SYS REBOOT: Saves the current state and performs a soft reset of the processor.SYS OTA FIRMWARE: Initiates a download of the latest firmware from the Solargy servers.SYS OTA DEVICES: Updates the.417Device Definition File (DDF) library assets.SYS HELP: Displays a quick-reference summary of all available commands.
4. File & Storage Group (FILE / DIR / SPIFFS)
Commands for managing the internal SPIFFS storage and optional SD card.
- DIR [PATH]: Lists files in the specified directory. If path is omitted, root is displayed.
- FILE LIST [FILENAME]: Displays the raw text content of a file to the console.
- FILE DELETE [FILE]: Permanently removes a file from storage. Note: You can prefix the name with
SP:orSD:to specify the drive.
Example:FILE DELETE SP:ACREL10R.417 - FILE DELETE DEVICES: Permanently deletes all Device Definition Files from SPIFFS storage. The AlphaMon will attempt to pull fresh copies of your specified DDFs from the AlphaMon server via your WiFi link when you next reset your AlphaMon.
5. Advanced “Lazy” Assignments
For speed, configuration file variables can be updated without the “CONFIG” prefix.
If a line contains an = or : and the first word is not a recognised config variable, AlphaMon will attempt a direct variable update.
- Example:
MQTT_SERVER = "mqtt://solargy.com.au"
CLI Safety Note:
Commands that modify system-critical paths or security settings may require a session-based, unique, valid 4 digit device PIN to be entered prior to the command.
ALPHAMON COMMAND HIERARCHY SUMMARY
==================================
ROOT SUB-COMMAND ARGUMENTS / NOTES
|
├── CONFIG [Configuration File]
| ├── SAVE (Save active config to default location)
| ├── SAVE [filename] (Backup active config to a specific file)
| |
| ├── RELOAD (Reload current config from storage)
| ├── RESTORE (Restore from default backup location)
| ├── RESTORE [filename] (Restore from a specific backup file)
| |
| ├── LIST (Display all active configuration keys/values)
| ├── SET [key]=[value] (Modify a specific configuration setting)
| └── RESET (Wipe active config and return to defaults)
|
├── ALIAS [Hardware Pin & Built-in Control]
| ├── LIST (List all current Aliases, alphabetically)
| ├── SET [pin/alias] [value] (Set state/level for a GPIO pin or Modbus Register)
| ├── GET [pin/alias] (Read the current state of a GPIO pin or Modbus Register)
| └── MODE [pin] [type] (Define pin hardware mode e.g. INPUT, OUTPUT, PWM)
|
├── FILE [Low-level SPIFFS File Management]
| ├── LIST [filename] (List the text content of the specified file)
| ├── DELETE [filename] (Delete the file from internal storage)
| └── DELETE DEVICES (Delete all DDF files from internal storage)
| NOTE: AlphaMon doesn't support sub-directories.
|
├── DIR [Storage Navigation]
| └── [SP:] | [SD:] (List files and sizes on specified drive)
|
├── SPIFFS [Storage Management]
| └── FORMAT (Reformat the internal SPIFFS storage drive)
| CAUTION: Only use if internal storage is corrupt.
|
└── SYS [System Operations]
├── RECONNECT (Try to reconnect disconnected devices and services)
├── INFO (View firmware version, uptime, and heap stats)
├── REBOOT (Restart the AlphaMon hardware)
├── DEBUG [on/off] (Enable or disable verbose system logging)
├── OTA DEVICE [ddf_name] (Download specified Device Definition File)
└── OTA FIRMWARE (Force Over-the-Air firmware update)
---------------------------------------------------------------------
USAGE NOTES:
- Hierarchical: Enter the Root Command followed by sub-command (e.g., CONFIG LIST).
- Case-Insensitive: Both 'sys info' and 'SYS INFO' are valid.