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.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| moat_modbus-0.9.9.tar.gz | 44.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moat_modbus-0.9.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.3 kB
Release files / moat_modbus-0.9.9.tar.gz
| Download URL | moat_modbus-0.9.9.tar.gz |
|---|---|
| Size | 44.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cd90f9929c39e18f1e9d98d7431f607dc98c86a665ef6e7ec8181163d04a48a
|
|
BLAKE2b-256 checksum How to use checksums |
d465983e80cdb72ceecd6d5d51c5bfd1624787e8e068c92b19331111d2c4b0a6
|
| 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.9-py3-none-any.whl
| Download URL | moat_modbus-0.9.9-py3-none-any.whl |
|---|---|
| Size | 45.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d341ea42541e38ee3cbd34b87a43a506cd5365a7419213324d127eb36523c407
|
|
BLAKE2b-256 checksum How to use checksums |
dde0924556408b79177fabcc50a9db12d1e6cfc85f7c3f2ff53c7b4d8438429d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|