Skip to main content

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

Metadata

Release files for moncube-modbus 1.1.0

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

Source distribution (sdist)

Source distribution for moncube-modbus 1.1.0
File Size Uploaded Provenance Actions
moncube_modbus-1.1.0.tar.gz 12.6 kB Without provenance Details for moncube_modbus-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for moncube-modbus 1.1.0
File Interpreter ABI Platform Actions
moncube_modbus-1.1.0-py3-none-any.whl Python 3 none any Details for moncube_modbus-1.1.0-py3-none-any.whl

Total release size: 28.1 kB

Release files / moncube_modbus-1.1.0.tar.gz

Download URL moncube_modbus-1.1.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ce459228623bb4af866baa21ecd30e9152d71428ca9f66d4c32a995491803577
BLAKE2b-256 checksum
How to use checksums
fca855beb04b42399ad6671788a9ed87206a9e73f8bf64f3ef7f2687f51b695d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / moncube_modbus-1.1.0-py3-none-any.whl

Download URL moncube_modbus-1.1.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
137d62309a4488d0609db21448f5ac2fe69e1121546990af778f778b8ac7a282
BLAKE2b-256 checksum
How to use checksums
cd04e443965c16b2f161315834deb2ab55494099021af24868d60cc764394cb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Security for moncube-modbus 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

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