From 55efdb0c77030f2b437f2cb4eb787888b59b8997 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 8 Aug 2021 23:09:15 +0300 Subject: support arguments passing --- inverter-http-proxy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'inverter-http-proxy') diff --git a/inverter-http-proxy b/inverter-http-proxy index c658e1e..64b9227 100755 --- a/inverter-http-proxy +++ b/inverter-http-proxy @@ -14,12 +14,16 @@ inv_port = None async def variable_handler(request): command = request.match_info['command'] + args = [] + if 'args' in request.query: + args = request.query['args'].split(',') + inverter = InverterClient(host=inv_host, port=inv_port) inverter.connect() inverter.format(Format.JSON) try: - response = inverter.exec(command) + response = inverter.exec(command, arguments=args) except InverterError as e: response = str(e) -- cgit v1.2.3