Skip to content

Setting Up Devices

Dave Schmid edited this page Nov 22, 2024 · 2 revisions

Setting Up Qingping Devices to Publish to Local MQTT


Step 1: Request Private MQTT Access

  • Contact Qingping to enable Private MQTT for your devices.
    This feature allows your devices to communicate with a custom MQTT broker.
  • For more details, refer to the Qingping Private MQTT Protocols Guide.

Step 2: Set Up a Local MQTT Broker

  • Install and configure an MQTT broker of your choice, such as:

    • Mosquitto
    • EMQX
    • HiveMQ
  • Configuration:

    • Broker Address: tcp://192.168.x.x:1883
    • Authentication: Set up a username and password for secure access.
    • Enable TLS (optional): Add certificates for encrypted communication if required.

Step 3: Configure Devices in Qingping Portal

  1. Login to Qingping Portal:
    Use your Qingping credentials to access the Qingping Device Portal.

  2. Select Your Devices:
    Navigate to the list of registered devices.

  3. Update MQTT Server Settings:

    • Server Address: tcp://<broker_address>:<port>
    • Authentication:
      • Username: As configured in your broker.
      • Password: As configured in your broker.
    • Topic Structure:
      • Devices publish sensor data to qingping/<device_mac>/up.
      • Devices accept commands on qingping/<device_mac>/down.
  4. Save and Apply Changes:
    Confirm the changes and push the updated settings to the devices.


Step 4: Test Connectivity

  1. Start your MQTT broker and verify it’s listening on the configured address and port.
  2. Use an MQTT client (e.g., MQTT Explorer or mosquitto_sub) to verify that devices are publishing data to qingping/#.
  3. Look for incoming messages from your devices. Example topics:
    • qingping/<device_mac>/up

Notes:

  • Keep Credentials Secure: Ensure the MQTT broker username and password are stored securely.
  • Firewall Settings: Open the configured MQTT port (e.g., 1883 or 8883 for TLS) on your local network.
  • Verify Device Permissions: Devices must have proper access to your MQTT broker. Double-check your broker’s user authentication settings.
Clone this wiki locally