Examples for MQTT publish from App

I would like to publish from an app to an MQTT broker on an Edge Device. From some of the release notes it seems that the MQTT bridge is the thing needed for publishing from Tulip but I have not found any details on using it. Despite having the MQTT services enabled on my edge device I’m unable to create a connector to them within the Tulip account. Can you provide an example of the setup and technique for publishing to MQTT from an app? Thanks!

Hey @Lance -

Thanks for reaching out! The way this would be setup is as follows:

  1. Create a connector leveraging an edge device connector host
  2. Configure the server address to localhost, port 1883
  3. Enable the MQTT broker on the edge device.
  4. Test and save the connector
  5. Create functions to write to that mqtt connector.

Today you will run into a fairly major blocker - Publication to MQTT just came out, and it is not yet supported on the connector host on our edge devices, but support will be coming very soon - this will block this use case today, but will be totally possible with that update.

The MQTT bridge feature is a mechanism that connects two or more MQTT brokers, allowing messages to be exchanged seamlessly between them. It acts as a relay or a communication link, enabling devices and applications connected to one broker to interact with those connected to another.

Use Cases:

  • IoT Deployments: Connecting local MQTT brokers in edge devices to a central cloud broker.
  • Cross-Region Communication: Linking MQTT brokers in different geographical locations for global coverage.
  • Hybrid Systems: Integrating on-premises MQTT systems with cloud-based systems.
  • Redundancy and Failover: Creating a backup MQTT broker to ensure system reliability.

Example:

Imagine a smart building with multiple floors, where each floor has its own local MQTT broker managing devices. An MQTT bridge can connect these brokers to a central broker, enabling cross-floor communication and centralized monitoring.

Pete

1 Like

Pete,
Thanks! I went this route starting out but must have hit the roadblock that you mentioned. Right now, despite having the connector host and MQTT enables on the device, I cannot select the edge device when setting up the connector (as you showed).
Do you have a sense for timing of the update that will allow this?
In the meantime, I’m looking at exposing a Node-RED http end-point that acts as a simple proxy to MQTT. Do you see any issues with that in the short term?
Thanks again!
Lance