Skip to content
Imeon-Energy edited this page Aug 27, 2024 · 9 revisions

Imeon Inverter Standalone API Wiki

A standalone API allowing communication with Imeon Energy inverters.

Pages

Examples

from imeon_inverter_api.inverter import Inverter
import asyncio
import json

# Test inverter
async def _test():
    i = Inverter("192.168.200.110")
    await i.login("user@local", "password")
    await i.update()
    print(json.dumps(i._storage, indent=2, sort_keys=True))
    print(i.battery)

asyncio.run(_test())
from imeon_inverter_api.client import Client
import asyncio
import json

# Display hourly data as a dict
async def dataset_test() -> dict:

    # Create a client for the address of the inverter
    c = Client("192.168.200.110")

    # Async authentification
    await c.login('user@local', 'password')

    # Fetch hourly data from the inverter
    data = await c.get_data_timed('hour')

    # Format the dict and print it
    print(json.dumps(data, indent=2, sort_keys=True))

asyncio.run(dataset_test())
Clone this wiki locally