diff --git a/README.md b/README.md index 7999cbfe8bea2f3f4698d61952c9b89ddc9d9ad7..f08c937e9aaacaad6312dcffc636c093dc0048fb 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,31 @@ deactivate # And finally install the module dependencies python3 -m pip install -r requirements.txt ``` +# Install it +The software is installed by executing: `python3 setup.py install` # Execute it -The software can be simply executed with Python3: `python3 pypcc2.py -c RCU,CLK,UNB2` +The software can be executed using commandline parameters, for example specifying the config yaml file (RECVTR.yaml) and OPC-UA port (4840): `hwtr -c RECVTR -p 4840` -Optional parameters are explained when the `-h` or `--help` parameter is supplied: +Alternativly the 4 hardware translators can be executed, using it's default parameters as: +- `apscttr` +- `recvtr` +- `unb2tr` +- `apsputr` + +# Install it as a service +The translators can also be installed as services: +- `cp bin/*.service /lib/systemd/system/.` +- `systemctl daemon-reload` +- `systemctl enable recvtr.service` so it is startup at boot +- `systemctr start recvtr.service` start the translator + +The log can then be monited by `journalctl -f -u recvtr.service` ```bash -python3 pypcc2.py --help -usage: pypcc2.py [-h] [-s] [-t] [-p PORT] [-l {DEBUG,INFO,WARNING,ERROR}] [-c CONFIG] +hwtr --help +usage: hwtr [-h] [-s] [-t] [-p PORT] [-l {DEBUG,INFO,WARNING,ERROR}] [-c CONFIG] optional arguments: -h, --help show this help message and exit @@ -49,6 +64,7 @@ optional arguments: -p PORT, --port PORT Port number to listen on [4842]. -l {DEBUG,INFO,WARNING,ERROR}, --loglevel {DEBUG,INFO,WARNING,ERROR} Log level [INFO]. + --loghost LOGHOST Logstash host to which to forward logs [] -c CONFIG, --config CONFIG YAML config files, comma seperated [RCU]