Skip to main content

Driver for Carlo Gavazzi EM511 Series Single Phase Energy Meters using Modbus RTU

Project description

OpenSSF Scorecard

python-em511

python-em511 provides a simple, Pythonic interface for reading and writing data from Carlo Gavazzi EM511 series energy meters over Modbus RTU. It builds on top of pymodbus.

Example usage:

from em511 import Em511
from pymodbus.client import ModbusSerialClient

# Configure the Modbus client
client = ModbusSerialClient(
   port="COM3",  # or "/dev/ttyUSB0" on Linux
   baudrate=9600,
   parity="E",
   stopbits=1,
   bytesize=8,
   # datasheet specifies maximum response timeout of 500ms (typical 40ms)
   timeout=0.5,
)

# Device Modbus address
device_address = 1

# Initialize the EM511 driver
meter = Em511(device_address=device_address, client=client)

# Read voltage
voltage = meter.V
print(f"Voltage: {voltage} V")

# Example of writing a password-protected parameter
meter.password = 1234

Report issues

If you run into problems, you can ask for help in our issue tracker on GitHub.

Contributing

See CONTRIBUTING.MD and DEVELOPMENT.MD.

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

python_em511-0.0.1.post1.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

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

python_em511-0.0.1.post1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file python_em511-0.0.1.post1.tar.gz.

File metadata

  • Download URL: python_em511-0.0.1.post1.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_em511-0.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 b07f12a40b2e4313d9db2aad5c6feeee763a87256578c532a75aa0b5f037fe4b
MD5 ce7a805b426ac6bd047ebca4dd664f7d
BLAKE2b-256 933f51e92eeb5494bc21552d600c66fc4477ec1bb00d501aabcb26a8450c5245

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_em511-0.0.1.post1.tar.gz:

Publisher: publish-to-pypi.yml on id8-engineering/python-em511

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_em511-0.0.1.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_em511-0.0.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 f1ffef60c91a32ddcf5c0524cb853ebf485a6354524f12c636cbc8e63b4a6eec
MD5 3d60fd8bd5ecc6d3ba3c71c3055d1814
BLAKE2b-256 02a3d3ae037fa50e0b8273e74d1d302ab85391a539e8fca79f7aef72863eee62

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_em511-0.0.1.post1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on id8-engineering/python-em511

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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