Skip to main content

Asynchronous UDP client for Marstek energy storage systems

Project description

py-marstek

Python client for Marstek energy storage systems. Provides asynchronous UDP helpers to discover devices and query status information.

Features

  • UDP broadcast discovery of Marstek devices
  • Helpers to query ES mode, battery statistics, and PV status
  • Simple command builder utilities
  • Optional support for multi-interface broadcast via psutil

Installation

pip install py-marstek

Usage

import asyncio
from pymarstek import MarstekUDPClient, get_es_mode

async def main():
    client = MarstekUDPClient()
    await client.async_setup()
    devices = await client.discover_devices()
    if not devices:
        print("No devices found")
        return

    device_ip = devices[0]["ip"]
    response = await client.send_request(get_es_mode(), device_ip, 30000)
    print(response)

    await client.async_cleanup()

asyncio.run(main())

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_marstek-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_marstek-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file py_marstek-0.1.0.tar.gz.

File metadata

  • Download URL: py_marstek-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.9

File hashes

Hashes for py_marstek-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3fb4ebd015be8e3d305c4106459ff926775ab609c4c39caab28e54963147dde7
MD5 2a86819b91ee4262a1a65f87422d2d77
BLAKE2b-256 30c4c993f31a17b9205e2411ebd5dc9129b4b1cdd490f30988f3f2be4740207b

See more details on using hashes here.

File details

Details for the file py_marstek-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_marstek-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efeb949520b67862bbdea2d1189d455f5bad004ffaf5cdd227ba7797f40c296b
MD5 f5e68f351a39d0bb659b1d7de86e2268
BLAKE2b-256 b607f8f96013f8e56fb77f1b105da8f4d51c6a5aba63cca890f8c4cada16e9f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page