Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sessypy"
version = "0.2.2"
version = "0.2.3"
authors = [
{ name="PimDoos" },
]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = sessypy
version = 0.2.2
version = 0.2.3
author = PimDoos
url = https://github.com/PimDoos/sessypy
long_description = file: README.md
Expand Down
8 changes: 8 additions & 0 deletions src/sessypy/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class SessyApiCommand(StrEnum):

METER_GRID_TARGET = f"{API_VERSION_1}/meter/grid_target"
METER_STATUS = f"{API_VERSION_1}/meter/status"

MODBUS_DETAILS = f"{API_VERSION_1}/modbus/details"

NETWORK_SCAN = f"{API_VERSION_1}/network/scan"
NETWORK_STATUS = f"{API_VERSION_1}/network/status"
Expand Down Expand Up @@ -63,6 +65,12 @@ class SessyP1State(StrEnum):
PARSE_ERROR = "P1_PARSE_ERR"
OK = "P1_OK"

class SessyModbusState(StrEnum):
DISABLED = "MODBUS_DISABLED"
ERROR = "MODBUS_ERROR"
OK = "MODBUS_OK"
UNSUPPORTED = "MODBUS_UNSUPPORTED"

class SessyOtaTarget(StrEnum):
SELF = "OTA_TARGET_SELF"
SERIAL = "OTA_TARGET_SERIAL"
Expand Down
3 changes: 3 additions & 0 deletions src/sessypy/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ async def get_meter_status(self):
class SessyP1Meter(SessyMeter):
async def get_p1_details(self):
return await self.api.get(SessyApiCommand.P1_DETAILS)

async def get_modbus_details(self):
return await self.api.get(SessyApiCommand.MODBUS_DETAILS)

class SessyCTMeter(SessyMeter):
async def get_ct_details(self):
Expand Down