Skip to content

Commit

Permalink
added get-data script
Browse files Browse the repository at this point in the history
  • Loading branch information
gustonator committed May 20, 2023
1 parent 0a230a8 commit 42b5097
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions get-data.py
Original file line number Diff line number Diff line change
@@ -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())

0 comments on commit 42b5097

Please sign in to comment.