IoT consoles need to bridge MQTT (the device protocol) to WebSocket (the UI protocol). grit-websockets handles the UI side beautifully; there's no companion for the MQTT side.
Proposed fix:
New grit-mqtt plugin built on eclipse/paho.mqtt.golang:
mqtt.Broker.Connect(url, credentials) — connects to EMQX / Mosquitto / HiveMQ / AWS IoT
mqtt.Subscribe(topic, handler) for incoming device telemetry
mqtt.Publish(topic, payload) for sending commands
- Bridge helper:
mqtt.BridgeToWebSocket(topic, wsRoom) — auto-fans MQTT messages to a grit-websockets room
- TLS support + client certificate auth for production IoT
- Reconnection with backoff
Pairs perfectly with grit-websockets for the IoT use case. Without this every IoT-on-Grit project rewrites the same 200 lines of bridge code.
IoT consoles need to bridge MQTT (the device protocol) to WebSocket (the UI protocol).
grit-websocketshandles the UI side beautifully; there's no companion for the MQTT side.Proposed fix:
New
grit-mqttplugin built oneclipse/paho.mqtt.golang:mqtt.Broker.Connect(url, credentials)— connects to EMQX / Mosquitto / HiveMQ / AWS IoTmqtt.Subscribe(topic, handler)for incoming device telemetrymqtt.Publish(topic, payload)for sending commandsmqtt.BridgeToWebSocket(topic, wsRoom)— auto-fans MQTT messages to a grit-websockets roomPairs perfectly with
grit-websocketsfor the IoT use case. Without this every IoT-on-Grit project rewrites the same 200 lines of bridge code.