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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_em511-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_em511-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31e858eebf2f2a89616a19b8dbf199b27d87890088f42a8391a29aaee5ba16d2
MD5 523c1dc0d55a7ebb0067219808db7850
BLAKE2b-256 e924982f105f71fe09a9dd1b8e0d66563135c8bbcdf74a005ac92b7f115cc7c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_em511-0.0.1-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