Moncube Modbus TCP Facade - Expose Moncube cubicle data via Modbus
Project description
Moncube Modbus Facade
Expose Moncube MQTT sensor data via Modbus TCP for integration with SCADA systems and industrial monitoring tools.
Installation
pip install moncube-modbus
Or from source:
git clone https://github.com/moncube/moncube-modbus.git
cd moncube-modbus
pip install -e .
Quick Start
1. Create Configuration File
Generate a sample configuration:
moncube-modbus init -o config.yaml
Or run without subcommand (backward compatible):
python -m moncube_modbus init -o config.yaml
Then edit config.yaml to add your cubicle UUIDs:
mqtt:
url: "broker.emqx.io"
qos: 1
username: ""
password: ""
modbus:
host: "0.0.0.0"
port: 5020 # Use 502 for standard (requires root)
cubicles:
"2cf51a55-a4bc-4ec2-b22c-a0054963677b": 0
"6e9f7bf2-2f9b-4a6f-8b83-9b9c10f2a0a1": 1
staleness:
warnSec: 30
badSec: 120
2. Run the Server
moncube-modbus run -c config.yaml --log INFO
Or use the shorter form:
moncube-modbus -c config.yaml --log INFO
Usage as a Library
from moncube_modbus import ModbusFacade, FacadeConfig
import yaml
# Load configuration
with open("config.yaml") as f:
config_data = yaml.safe_load(f)
config = FacadeConfig.from_dict(config_data)
# Create and run facade
facade = ModbusFacade(config)
facade.run() # Blocks until stopped
Register Layout
📖 For detailed register documentation, see REGISTERS.md
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moncube_modbus-1.0.0.tar.gz.
File metadata
- Download URL: moncube_modbus-1.0.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50fb61af8fa7029446b426d54ed3f002725b119c8119a0592de4105d483ada24
|
|
| MD5 |
23cc14d17afd2f8eebbb7c11f1425f99
|
|
| BLAKE2b-256 |
b3143584fa8f4ae9857bab60848d36e4ccff84769507605fbc61689555c99a8f
|
File details
Details for the file moncube_modbus-1.0.0-py3-none-any.whl.
File metadata
- Download URL: moncube_modbus-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aefa8b3120f47a8685761a6680bd5d71ce78dc928ddef1ee627143f6b2d0646
|
|
| MD5 |
cf75a0883f82d1128f38533f4f0e1908
|
|
| BLAKE2b-256 |
c8afab4054adb3d87c292f15e79ed28bcb9e5b2573ef955a52d9660aa3868033
|