Bridge mqtt <--> websocket
Project description
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=9095
MQTT_HOST=localhost
MQTT_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>}
Quick start
- open in VSCode devcontainer, develop.
- use
invoke
to lint, build etc.
Tooling
- Verisoning :
bump2version
- Linting and formatting :
ruff
- Typechecking:
mypy
What goes where
src/rox_bridge
app code.pip install .
.docker
folder contains dockerfiles for images..gitlab-ci.yml
takes care of the building steps.
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
rox_bridge-1.1.0.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for rox_bridge-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f91487a809b909252611857a098fa02ba2660264bb657dc58dcc3405c0e29e |
|
MD5 | 63b1081689ab309c7a1c36cf53747d9c |
|
BLAKE2b-256 | 9acdaac12217ddca4609ad00903a49a7d1ad9f86c0e03b4bf585dc31570e9160 |