Compare commits

..

3 Commits

Author SHA1 Message Date
a408bb05a4 Fixed small typo 2025-05-17 00:19:12 +02:00
5af51ab79f Added usage section to README.md 2025-05-17 00:19:01 +02:00
c68e1e23fb Added more instructions 2025-05-17 00:17:46 +02:00
2 changed files with 37 additions and 2 deletions

View File

@ -11,13 +11,48 @@ Maybe it's straightforward or obvious, but just for completeness: the name comes
2. The ability to turn on and off tasmota devices ("on" and "off" pronounced directly one after the other sounds (a bit) like "onov") 2. The ability to turn on and off tasmota devices ("on" and "off" pronounced directly one after the other sounds (a bit) like "onov")
## Dependencies ## CLI Usage
```
usage: Tasmotonov - simply toggle multiple tasmota lights [-h] [-v] [--version] {file,inline} data {on,off,toggle}
A very simple script which allows you to turn on/off multiple tasmota devices specified.
positional arguments:
{file,inline} Select either to read the adresses (of the devices) from a "file" or from "inline"
data Either the path to the file, or a comma- or semicolon-separated list of tasmota adresses.
{on,off,toggle} Select to turn all tasmota devices "on" or "off" or "toggle" (case insensitive)
options:
-h, --help show this help message and exit
-v, --verbose Turn on verbose file output
--version show program's version number and exit
Info: if you choose a file as source, this files needs to contain the addresses of the tasmota devices either comma-separated, semicolon-separated, or newline-separated!
© Benjamin Burkhardt, 2025
```
## Installation
The CLI script ([tasmotonov.py](tasmotonov.py)) relies on two libaries apart from python3's standard libraries: The CLI script ([tasmotonov.py](tasmotonov.py)) relies on two libaries apart from python3's standard libraries:
- `fqdn`: for validating the FQDN - `fqdn`: for validating the FQDN
- `requests`: for making the HTTP requests - `requests`: for making the HTTP requests
To use it, just execute the following command:
```bash
pip install fqdn requests
```
---
The GUI application is based on Qt with it's python3 bindings PyQt6.
TODO
## License ## License

View File

@ -30,7 +30,7 @@ parser = argparse.ArgumentParser(
prog='Tasmotonov - simply toggle multiple tasmota lights', prog='Tasmotonov - simply toggle multiple tasmota lights',
formatter_class=argparse.RawDescriptionHelpFormatter, formatter_class=argparse.RawDescriptionHelpFormatter,
description='A very simple script which allows you to turn on/off multiple tasmota devices specified.', description='A very simple script which allows you to turn on/off multiple tasmota devices specified.',
epilog='Info: if you choose a file as source, this files needs to contain the addresses of the tasmota devices either comma-separated, semicolon-separated, or newline-separated!\n\n © Benjamin Burkhardt, 2025') epilog='Info: if you choose a file as source, this files needs to contain the addresses of the tasmota devices either comma-separated, semicolon-separated, or newline-separated!\n\n© Benjamin Burkhardt, 2025')
parser.add_argument('source', help='Select either to read the adresses (of the devices) from a "file" or from "inline"', choices=['file', 'inline']) parser.add_argument('source', help='Select either to read the adresses (of the devices) from a "file" or from "inline"', choices=['file', 'inline'])
parser.add_argument('data', help='Either the path to the file, or a comma- or semicolon-separated list of tasmota adresses.') parser.add_argument('data', help='Either the path to the file, or a comma- or semicolon-separated list of tasmota adresses.')