Skip to content

New plugin: grit-mqtt — companion to grit-websockets for IoT bridging #65

Description

@MUKE-coder

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions