mqtt-bridge
Bridge mqtt <--> websocket
Docker image:
docker run --network=host registry.gitlab.com/roxautomation/components/mqtt-bridge
Configuration
override these environment variables if desired
WS_PORT=9095MQTT_HOST=localhostMQTT_PORT=1883
How it works
- web ui connects to websocket. It then subscibes to topics or publishes data.
- messages are forwarded between websocket and mqtt.
Note current implementation is quite simple, there is in distinction between topic subscriptions from clients. All clients will receive all subscriptions.
Protocol
The protocol is subset of rosbridge protocol
- subscribe
{"op":"subscribe", "topic":<string>}" - publish
{"op":"publish", "topic": <string>, "msg":<json>}
Development
- open in VSCode devcontainer, develop.
- use
invoketo lint, build etc.
Testing
There are a lot of moving parts here (mqtt broker, websockets etc.). It is a lot of work to implement descent tests using pytest for this.
Therefore we rely more on integration tests located in integration folder. These tests simulate a system consisting of a bridge and mqtt and ws clients.
Tooling
- Verisoning :
bump2version - Linting and formatting :
ruff - Typechecking:
mypy
What goes where
src/rox_bridgeapp code.pip install ..dockerfolder contains dockerfiles for images..gitlab-ci.ymltakes care of the building steps.
Metadata
Release files for rox-bridge 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rox_bridge-1.2.1.tar.gz | 8.6 kB | Without provenance | Details for rox_bridge-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rox_bridge-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for rox_bridge-1.2.1-py3-none-any.whl |
Total release size: 17.5 kB
Release files / rox_bridge-1.2.1.tar.gz
| Download URL | rox_bridge-1.2.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1565f776ae6c92ff19f142c3214af36f6bac51a22f6ebf1963f19ad4d31569a6
|
|
BLAKE2b-256 checksum How to use checksums |
174cfcf39bfc3f465aedb4584645532c02170461cba380f195c0b89c57473219
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / rox_bridge-1.2.1-py3-none-any.whl
| Download URL | rox_bridge-1.2.1-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5339f0ac6a6b5a67726269e2d10094212ebf7f58ca07b8b72ab789273f1db017
|
|
BLAKE2b-256 checksum How to use checksums |
300d538dd18a36f173a2c48dc934bb1a983d4fd15f1266df732401ccb9b64ddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for rox-bridge 1.2.1
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.