EN

MQTT

  • I have two devices that use the MQTT protocol. How do I send data between them using the platform?
  1. Create a different object for each device.
  2. Configure the devices to connect to the platform, using the IDs of the created objects as the ClientId identifiers of the created objects.
  3. Then you can subscribe, for example, on the first device to a topic of interest to you. you are interested in.
  4. When the second device sends a data packet with this topic, the MQTT broker, built into the platform will forward the packet to the first device. In this broker uses the standard publisher-subscriber model described in the MQTT protocol.
  • How to connect ESP32 and its analogs to the platform?
To connect modules based on ESP8266 and ESP32 to the cloud platform use tutorial video (opens in a new tab) or check out training video (opens in a new tab) or check out article (opens in a new tab). GitHub (opens in a new tab) also has examples of ready-made sketches.
  • Do you support TLS for MQTT?
Yes, to further secure the data transfer process you can issue a X.509 certificate. It allows you to connect to the object using the secure MQTTS protocol (MQTT TLS). Note that MQTT uses port 8883 instead of 1883 for the secure connection. port 8883 instead of 1883.
  • Cannot connect via MQTT. What could be the problem?
  1. Check the server address specified on your device:
  • MQTT(TCP) - dev.rightech.io:1883,
  • MQTTS(TLS) - dev.rightech.io:8883.
  1. Make sure that the object ID in the platform matches the Client ID of the MQTT client.
  2. If you are using Username and Password, make sure they match in the settings of the object and the MQTT client. If you do not use them, make sure that these parameters are not specified in the object settings.
  3. Make sure that you are not connecting with the same Client ID from two different devices. If you do, the devices will interfere with each other's ability to work correctly. Note that the bot enabled on the platform is also is also a full-fledged MQTT client that interferes with the connection of the actual device.
  • You are using the same address to access the MQTT broker. Is it possible for someone to get/intercept my data?
No. In our system, user workspaces are isolated. The sharing data between devices is only shared within your project.