Implement a commandline interface for the AVM smart home lib
Implement a ready-to-use application to interface the existing AVM smart home lib
Acceptance criteria:
- The application should be able to make use of a configuration file or via direct arguments
- Direct arguments overwrite config settings
- Make use of the existing AVM interface/test binaries
- Make use of the existsing config interface
Meta:
- Name the application binary
avmctrl
- Support short/long argument name eg.
-h
and--help
- Support dedicated operations like
systemctl list-units
List of arguments:
-
avmctl -h|--help
Show the available operations / arguments -
avmctl -c|--config
Set the path to a config file -
avmctl -H|--host
Set a host for the operations (overwrites config host) -
avmctl -u|--user
Set a username for session (overwrites config username) -
avmctl -p|--password
Set a password for the session (overwrites config password) -
avmctl check-config
Try to start a test session and on success end it -
avmctl list
List all usable actors and print some meta information about them -
avmctl present [ain]
Check if the configured actor is present/connected -
avmctl state [ain]
Retrieve the current state of the actor (EXIT 0 = on, EXIT_FAILURE 1 = off) -
avmctl status [ain]
Print information about presence and state of the actor -
avmctl toggle [ain]
Toggle the state of the actor -
avmctl off [ain]
Turn the actor off -
avmctl on [ain]
Turn the actor on
Other things to do:
-
Document the usage in a man page