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).
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
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
Built Distribution
File details
Details for the file moat-modbus-0.8.0.tar.gz
.
File metadata
- Download URL: moat-modbus-0.8.0.tar.gz
- Upload date:
- Size: 35.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 982345372f761722cc69ecf8198a792c9e4835353045b4a9bd84905301352e50 |
|
MD5 | b9d69d993c112e0b0d1ab6625e9a0650 |
|
BLAKE2b-256 | 6a82d92fcab82c10062102d524873e7dbd07256bcf8a24968d5cc1a0fc2d2c8f |
File details
Details for the file moat_modbus-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: moat_modbus-0.8.0-py3-none-any.whl
- Upload date:
- Size: 33.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa72e2fb346252ab9a6804e5291e31e51792cd21819179879063b5ff250aece9 |
|
MD5 | 01621a00110f0210f31ab4517d6de920 |
|
BLAKE2b-256 | 996e871afa1788b37f0729d558aeccd1db63aab9cdc11b86b7d2760a99d7e992 |