Skip to content

MQTT Forwarding

Publish device data to your MQTT broker in real-time. MQTT forwarding enables seamless integration with IoT platforms, home automation systems, and industrial applications.

Overview

Device data is automatically published to your MQTT broker, allowing subscribers to receive updates instantly.

Quick Start

Step 1: Prepare Your MQTT Broker

  1. Set up an MQTT broker (or use a cloud service like HiveMQ, EMQX)
  2. Create credentials for YenGear IoT Cloud
  3. Note your broker host, port, and topic

Step 2: Create a Forwarding Profile

  1. Go to Org → Data Forwarding
  2. Click + New Profile
  3. Select MQTT as the type
  4. Enter your broker details
  5. Click Save

Configuration Options

OptionRequiredDescription
HostYesMQTT broker hostname
PortYesBroker port (1883 or 8883 for TLS)
TopicYesTopic to publish messages
UsernameNoAuthentication username
PasswordNoAuthentication password

Message Format

Messages are published as JSON:

json
{
  "device_id": "d-1000-abc",
  "project_id": "proj-xyz",
  "timestamp": 1709856000,
  "factors": [
    {
      "agri_id": "d-1000-abc-1-00",
      "value": 25.5,
      "unit": "°C"
    }
  ]
}

Security Tips

  • Use port 8883 with TLS encryption
  • Create a dedicated user with publish-only permissions
  • Use strong passwords

Troubleshooting

ProblemSolution
Connection refusedVerify broker host and port
Authentication failedCheck username and password
Messages not receivedVerify topic subscription pattern
TLS errorsEnsure TLS is properly configured

Use Cases

  • Real-time Monitoring: Subscribe to device updates instantly
  • Home Automation: Integrate with Home Assistant, OpenHAB
  • Industrial IoT: Connect to SCADA systems
  • Cloud Platforms: Stream to AWS IoT, Azure IoT Hub

Need Help?

Contact us at [email protected] for technical support.