Skip to main content

aiomarstek

PyPI Python CI License: MIT

Async client library for local Marstek device communication.

aiomarstek contains the UDP protocol, command builder, discovery cache, polling pause handling, and high-level status helpers used by the Home Assistant Marstek integration. hold_glitches keeps the previous battery level where the firmware reports an implausible spike to 0 %, so every consumer of the library gets the same protection. Lifetime energy counters are passed through unchanged; the sensors expose them as TOTAL_INCREASING, for which Home Assistant treats a lower reading as a meter reset.

Installation

python -m pip install aiomarstek

Example

import asyncio

from aiomarstek import MarstekUDPClient


async def main() -> None:
    client = MarstekUDPClient()
    await client.async_setup()
    try:
        devices = await client.discover_devices()
        print(devices)
    finally:
        await client.async_cleanup()


asyncio.run(main())

Development

python -m pip install -e ".[test]"
python -m pytest
python -m ruff check .
python -m build

Metadata

Release files for aiomarstek 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiomarstek 0.1.13
File Size Uploaded Provenance
aiomarstek-0.1.13.tar.gz 17.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aiomarstek 0.1.13
File Interpreter ABI Platform
aiomarstek-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 29.9 kB

Release files / aiomarstek-0.1.13.tar.gz

Download URL aiomarstek-0.1.13.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b7fb943d92a68f35f62d9db2f80821d4a0b2488eabb3d348492a150a0686d146
BLAKE2b-256 checksum
How to use checksums
ea708047efd0edc4080154f198fde031338c32b07af50e03c72dec1f7495e31d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / aiomarstek-0.1.13-py3-none-any.whl

Download URL aiomarstek-0.1.13-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d926d94c02f177854b5a8819dc62844f34fcea72f3cca2a2fb7940f6f2f35f0b
BLAKE2b-256 checksum
How to use checksums
d5baf0ec558a43909211f3db80308af37d40670e038bd8d7d503d2109412837e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for aiomarstek 0.1.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiomarstek-0.1.13.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page