Skip to main content

moat-modbus

% start synopsis % start main

This is an anyio-enabled async Modbus client/server, built on the sans-IO protocol core moat-lib-modbus (no pymodbus dependency).

% end synopsis

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).

% end main

MQTT / MoaT-KV interface

MoaT-Modbus includes a server that's informed by a device profile. This server acts as a bidirectional gateway from and to MQTT and/or MoaT-KV storage.

See "gateway.rst" for details.

TODO

  • configurable codecs
  • get/set attributes
  • pack multiple values into a message
  • read-after-write if no slot

Metadata

Release files for moat-modbus 0.9.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moat-modbus 0.9.15
File Size Uploaded
moat_modbus-0.9.15.tar.gz 46.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moat-modbus 0.9.15
File Interpreter ABI Platform
moat_modbus-0.9.15-py3-none-any.whl Python 3 none any Details

Total release size: 93.0 kB

Release files / moat_modbus-0.9.15.tar.gz

Download URL moat_modbus-0.9.15.tar.gz
Size 46.0 kB
Tags Source
SHA-256 checksum
How to use checksums
311dc1894e3d5d9f700e61e6cc977dc9962f727b517d1cafe87085d9cbbd9338
BLAKE2b-256 checksum
How to use checksums
cad8fe5c02bb1ae8cdb875135a4471a06c178fb7fb6529ae721f9f97288a3f5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / moat_modbus-0.9.15-py3-none-any.whl

Download URL moat_modbus-0.9.15-py3-none-any.whl
Size 47.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7a5764a53f82e3e854fa28dd1d92fae85f5153971d70ff162ed9f0207bfcefe
BLAKE2b-256 checksum
How to use checksums
cda04f53a1f83a37c3e15211680d3a306802778667e1fdc8c3e0c8e87efe33cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.9.16

2 release files

This release

0.9.15 This release

2 release files

0.9.9

2 release files

0.9.7

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.10

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.6.2

2 release files

0.5.3

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.4

2 release files

0.3.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page