From 42b5097a359194e5d02dde1c2c92b6ec02ffd751 Mon Sep 17 00:00:00 2001 From: gustonator <rudolf.brosztl@gmail.com> Date: Sat, 20 May 2023 18:29:26 +0200 Subject: [PATCH] added get-data script --- get-data.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 get-data.py diff --git a/get-data.py b/get-data.py new file mode 100644 index 0000000..279c6d6 --- /dev/null +++ b/get-data.py @@ -0,0 +1,17 @@ +import asyncio +import goodwe + + +async def get_runtime_data(): + #ip_address = '2a00:1028:c000:fdb:730b:1770:8783:6eac' + ip_address = '5.181.93.153' + + inverter = await goodwe.connect(ip_address) + runtime_data = await inverter.read_runtime_data() + + for sensor in inverter.sensors(): + if sensor.id_ in runtime_data: + print(f"{sensor.id_}: \t\t {sensor.name} = {runtime_data[sensor.id_]} {sensor.unit}") + + +asyncio.run(get_runtime_data())