Improve docs and inline help
This commit is contained in:
parent
bd6b57d1ed
commit
71c62845d8
29
README.md
29
README.md
@ -1,10 +1,29 @@
|
|||||||
# SolarEdge Cloud API Exporter
|
# SolarEdge Inverter Exporter
|
||||||
|
|
||||||
## Configuration
|
## Local Modbus/TCP Exporter
|
||||||
|
|
||||||
Edit the script and put your API key, site id and inverter serial number
|
Usage:
|
||||||
|
```
|
||||||
|
solaredge_modbus.py [-d] [-l LISTEN] [-p PORT] HOST [PORT]
|
||||||
|
|
||||||
|
Prometheus exporter for SolarEdge inverters
|
||||||
|
|
||||||
|
positional arguments:
|
||||||
|
HOST Inverter Network Address
|
||||||
|
PORT Inverter Modbus/TCP port (default: 1502)
|
||||||
|
|
||||||
|
options:
|
||||||
|
-h, --help show this help message and exit
|
||||||
|
-d, --debug Enable debug info in HTTP answers (default: False)
|
||||||
|
-l LISTEN, --listen LISTEN
|
||||||
|
Address to bind for the HTTP server (default: localhost)
|
||||||
|
-p PORT, --listen-port PORT
|
||||||
|
Port of the HTTP server (default: 9150)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cloud API Exporter
|
||||||
|
|
||||||
|
Edit the `solaredge_api` script and put your API key, site id and inverter serial number
|
||||||
Edit the listening host and port if needed
|
Edit the listening host and port if needed
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Run the script as a service, add the URL to prometheus.
|
|
||||||
|
@ -59,12 +59,14 @@ def export(d, m):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(prog='solaredge_modbus.py', description='SolarEdge Modbus Exporter')
|
parser = argparse.ArgumentParser(prog='solaredge_modbus.py',
|
||||||
parser.add_argument('-d', '--debug', action='store_true')
|
description='Prometheus exporter for SolarEdge inverters',
|
||||||
parser.add_argument('-b', '--bind', default='localhost')
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||||
parser.add_argument('-p', '--bind-port', default='9150')
|
parser.add_argument('-d', '--debug', action='store_true', help="Enable debug info in HTTP answers")
|
||||||
parser.add_argument('host')
|
parser.add_argument('-l', '--listen', default='localhost', help="Address to bind for the HTTP server")
|
||||||
parser.add_argument('port', nargs='?', default=1502)
|
parser.add_argument('-p', '--listen-port', default='9150', help="Port of the HTTP server")
|
||||||
|
parser.add_argument('host', help="Network address of the inverter to monitor")
|
||||||
|
parser.add_argument('port', nargs='?', default=1502, help="Inverter Modbus/TCP port")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user