Skip to content

Inverter Documentation

Imeon-Energy edited this page Aug 26, 2024 · 2 revisions

Inverter Class

Overview

class Inverter(builtins.object)

Client data organised as a class storing the collected data, with methods allowing periodical updates. Meant for use in supervision tools (such as Home Assistant).

Note: For manual access, here's the storage structure:

    self._storage = {
            "battery" : {},
            "grid": {},
            "pv": {},
            "input": {},
            "output": {},
            "meter": {},
            "temp": {},
            "monitoring": {},
            "manager": {},
            "inverter": {},
            "timeline": [{}]
        }

Initialization

def __init__(self, address: str)

Initialize self. See help(type(self)) for accurate signature.

Methods

def get_address(self) -> str | None

Returns client IP.

async def init(self) -> None

Request a data initialisation from the Client. Collects "one-time" data.

async def login(self, username: str, password: str) -> None

Request client login. See Client documentation for more details.

async def set_ac_output(self, value: bool) -> bool | None

Activate/deactivate AC output.

async def set_date(self, date: typing.Annotated[str, 'Format: yyyy/mm/ddhh:mm']) -> bool | None

Change the inverter date to the given input.

async def set_feed_in(self, value: bool) -> bool | None

Activate/deactivate grid power injection.

async def set_grid_charge(self, value: bool) -> bool | None

Activate/deactivate grid charge for the battery.

async def set_injection_power(self, value: typing.Annotated[int, '0 <= x']) -> bool | None

Change the injection power limit to the given input.

async def set_inverter_mode(self, mode: Literal['smg', 'bup', 'ong', 'ofg'] = 'smg') -> bool | None

Change the inverter mode to the given input.

async def set_lcd_time(self, time: typing.Annotated[int, '0 <= x <= 20']) -> bool | None

Change the LCD screen sleep time to the given input.

async def set_mppt(self, range: Tuple[int, int]) -> bool | None

Change the maximum power point tracking range to the given input.

async def set_night_discharge(self, value: bool) -> bool | None

Activate/deactivate nightly discharge for the battery.

async def set_relay(self, value: bool) -> bool | None

Activate/deactivate the relay.

async def update(self) -> None

Request a data update from the Client. Replaces older data, but doesn't affect "one-time" data.

Readonly Properties

  • battery
  • grid
  • input
  • inverter
  • manager
  • meter
  • monitoring
  • output
  • pv
  • temp
  • timeline

Data Descriptors

  • __dict__: dictionary for instance variables (if defined)
  • __weakref__: list of weak references to the object (if defined)
Clone this wiki locally