Quick Start

Last Updated on : 2021-11-17 08:09:44download

A cloud project provides the message subscription feature. If the device status in the project changes, such as registration, data reporting, and offline events, Message Service is used to actively push event data to external partners with Pulsar. This helps to implement real-time and persistent messages.

Prerequisites: Create a project

For more information about project creation, see Quick Start.

Get connected

Step 1: Enable message service

Enable message service. For more information, see Enable Message Service.

Step 2: Enable message test

If you need a test environment, you can set a linked device as a test device. After a successful setting, the messages reported by the test device will be sent to the test channel to accelerate your device function debugging.
For more information, see Enable Message Test.

Step 3: Integrate with message service

Detailed development processes will be shown here, including sample code.
For more information, see Integrate with Message Service.

Step 4: Develop IoT services

After understanding the above process, you need to know the open message types to develop your IoT services.

Best practices

FAQs

  1. Q: What is the application scenario of message subscription?
    A: When the device status changes, Tuya sends a notification of the change. You can timely get device messages, analyze, or store them.
  2. Q: Can I forward and receive specific types of messages?
    A: After the message subscription is enabled, you will receive all types of messages.
  3. Q: Why cannot I receive device information?
    A: Perform the following troubleshooting steps:
    1. Check whether the message subscription is enabled.
    2. Check the environment configuration of the Pulsar client.
    3. Check whether the device is added to the test device and Pulsar is the official environment.
  4. Q: How is the message subscription service billed?
    A: The service is billed based on the number of forwarded messages. For more information, see Pricing.