device_controller - bruno-beloff/scs_analysis GitHub Wiki

docs > software repositories > scs_analysis > commands > device control


DESCRIPTION

The device_controller utility is used to interact with a remote host, using the device's control topic. A command / receipt message regime provides an interactive system over the messaging infrastructure.

An appropriate email address and password must have been stored using the cognito_user_credentials utility.

In the interactive mode, the aws_mqtt_control command-line interpreter supports history [UP] and [DOWN] keys. The mode supports command completion with the [TAB] key and command listing with [TAB][TAB]. Exit from the interactive mode with [CTRL-C].

A maximum of 30 seconds is available for the device to respond to the published message. After this time, the device_controller utility will terminate.

The --credentials flag is only required where the user wishes to store multiple identities. Setting the credentials is done interactively using the command line interface.

SYNOPSIS

device_controller.py [-c CREDENTIALS] -t DEVICE_TAG { [-s] -m CMD_TOKENS | [-w] [-i INDENT] } [-v]

Options
--version show program's version number and exit
-h, --help show this help message and exit
-c CREDENTIALS_NAME, --credentials=CREDENTIALS_NAME the stored credentials to be presented
-t DEVICE_TAG, --device-tag=DEVICE_TAG the device tag
-m MESSAGE, --message=MESSAGE send the given command(s)
-s, --std write to stderr and stdout
-w, --wrapper report message wrapper
-i INDENT, --indent=INDENT pretty-print the output with INDENT
-v, --verbose report narrative to stderr

EXAMPLES

device_controller.py -c super -t scs-be2-3 -m "vcal_baseline -i4" -s

SEE ALSO

scs_analysis/cognito_user_credentials

BUGS

On macOS, interactive history features require full disk access for the Terminal app:
Stack Overflow: PermissionError: [Errno 1] Operation not permitted after macOS Catalina Update