Skip to main content

Communicate to Pylontech batteries using a RS485 interface

Project description

pylontech-python

Functions to communicate to Pylontech Batteries using RS-485 serial communication

3 Layer model - each can be used as lib:

  1. pylontech_base.py - Communication layer, RS485 to pylontech with raw frame support
  2. pylontech_decode.py and pylontech_encode.py for decodeing and encoding the frame content
  3. pylontech_stack.py high level abstraction for the whole stack. It iterates over batteries and calculates overall results and combines battery results to lists. Some detail information from layer 2 might not be implemented in this layer.

Installation using setup.py:

run 'python3 ./setup.py install'

Example: an example to use pylontech-python:

from pylontech import PylontechStack x = PylontechStack("/dev/ttyUSB0",baud=115200,manualBattcountLimit=5) x.battcount 2

A big "Thanks" to Daniel Schramm for his contibution!

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

pylontech-0.1.3.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file pylontech-0.1.3.tar.gz.

File metadata

  • Download URL: pylontech-0.1.3.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for pylontech-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a1dd286c3b408ea1ee2da87b7be96331c9a3cd7b29b35b7ad155e73e4e4c53cb
MD5 7ac05c1a378462591265dd2980b86abb
BLAKE2b-256 080cd956044ef679e4c711684ad70dec7ad69ab8d78de18d4d5ffa2703055809

See more details on using hashes here.

Supported by

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