🔺 This project is superseded by Microsquad and is now archived. 🔺
A serial port to MQTT bridge in Java with Spring Boot affinities and support for multiple MQTT naming conventions and message formats.
- 🛠️ Supports YAML configuration / Spring cloud client-friendly.
- 🌍️ Deployed to jitpack.io for easy access.
- 🍽️ Provides embedded MQTT broker support via Moquette.
- 🏠️ Provides MQTT Homie naming convention adapters [https://homieiot.github.io/].
- 🔌️ Provides pluggable message formatters (JSON, line protocol)
- 👷️ Expose JMX MBeans for monitoring
- 🔌️ Support MQTT RPC for remote serial port control
- Download the Spring Boot service distribution, for instance version
0.1
:
wget https://jitpack.io/com/github/chibyhq/mqtt-serial-bridge/msb-service/0.1/msb-service-0.1.jar
- Create a Spring Boot configuration in
application.yml
:
msb.serial:
port: ttyACM0
baudrate: 115200
msb.mqtt:
server.enable: true
forward: true
client:
id: ${random.uuid}
server.uri: "tcp://localhost:1883"
-
Connect your serial device using the port name and baud rate indicated in your configuration
-
Fire up your MQTT client (e.g. MQTT Explorer) - you should see the following topics, for instance :
/homie/<hostname>/serial/ttyACM0/in
for messages you want to send to your serial device./homie/<hostname>/serial/ttyACM0/out
for messages you want to collect from your serial device
- Spring-boot based service example.
- Microbit serial line protocol to JSON websocket MQTT sample application.