Script utilities for the Reef-pi reef tank controller
usage: reef-py.py [-h] {list,show,buckets} ...
Command line interface for the reef-pi API. Modeled to resemble the 'reef-pi db' command
positional arguments:
{list,show,buckets}
list List reef-pi items
show Show reef-pi items
buckets Show reef-pi buckets
optional arguments:
-h, --help show this help message and exit
--help is available for subcommands: ./reef-py.py show --help
Examples:
./reef-py.py list temperature --value id
./reef-py.py list temperature --value id,name --sep ' - '
./reef-py.py show temperature_usage 2 --value historical --last
./reef-py.py show ph_readings 4 --value current --last
/reef-py.py show temperature_usage 2 --value current --last value
These Bash completion scripts will provide context-sensative options for the
reef-pi daemon
reef-pi db
reef-pi install
reef-pi reset-password
reef-pi restore-db
reef-py.py show
reef-py.py list
commands using Bash's builtin completion feature with the <TAB> <TAB> key strokes.
It will automatically provide the correct options for configured items in the user's reef-pi system.
Examples
%sudo reef-pi reset-password <TAB> <TAB>
-config --help -password -user
%sudo reef-pi db show e<TAB> <TAB>
equipment errors
%sudo reef-pi db show equipment<TAB> <TAB>
11 <Outlet 8>
3 <Outlet 1>
4 <Heater>
5 <Outlet 2>
6 <Skimmer>
7 <Lights>
8 <CO2 Regulator>
9 <Main Filter>
Hitting <TAB> <TAB> after the equipment argument, will display the list of equiment items configured, with the internal id first and then help text in angle brackets with the configured name.
The install script, adds commands to your ~/.bashrc file to source the completion scripts so they are available for every new Bash shell
NOTE: The _reef-py completion script requires a REEF_PY_PATH environment variable. That is created if you use the installation script. The ./reef-py.py script requires authorization credentials (userid/password) for the API. Those are added in the ./auth/reef_py_secrets.py file