Skip to main content

Modular async modbus client and server

Project description

This is an anyio-enabled async frontend for pymodbus.

Usage

Check the example client and server for rudimentary usage.

Documentation patches gladly accepted.

Background

moat-modbus diverges from pymodbus in that it does not expose a “data store” context to the user. Instead, every bus value is a separate object, with arbitrary length and encapsulating its own encoding and decoding rules.

A Modbus server exposing writeable registers only needs to

  • register the value in question

  • wait for it to be written to

The rest happens behind the scenes.

Device Server

As some Modbus devices only allow ine server at a time, MoaT’s Modbus supports a simple bidirectional gateway.

How to get there:

  • Write a generic device description. Put it in the modbus-data repository.

  • Add an interface overlay that describes which topic to send the data to / which topic to read.

  • Run moat modbus dev poll FILE.yaml. You can use a generic systemd service if you copy the file to /etc/moat/modbus.

The values can be modified (factor+offset); the gateway works in both directions (command/state).

TODO

  • plain MQTT

  • configurable codecs

  • get/set attributes

  • pack multiple values into a message

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

moat-modbus-0.5.3.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

moat_modbus-0.5.3-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file moat-modbus-0.5.3.tar.gz.

File metadata

  • Download URL: moat-modbus-0.5.3.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/65.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.9

File hashes

Hashes for moat-modbus-0.5.3.tar.gz
Algorithm Hash digest
SHA256 21ce0e5f0b5e548ef71dc7a848c182ba411279852ece91e161f7a4eb44fdf753
MD5 2d0a8fa036147b1d9a3e2de555183d15
BLAKE2b-256 9a971ca93ed6182111c3551d3b9698eb877ded651b99239125a25fc592a96a06

See more details on using hashes here.

Provenance

File details

Details for the file moat_modbus-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: moat_modbus-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/65.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.9

File hashes

Hashes for moat_modbus-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bb10b096bc5974e9f940855d9150d803d6501ab4d47648616c0d53bacce73cfb
MD5 e9266955f475975ea2eb7a17ae6c8c98
BLAKE2b-256 3ad4367415a90e3a158ac772c2886e58c316d090d6fbb5dca9325a388e5da4ae

See more details on using hashes here.

Provenance

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