Contact Us
Log In

Advanced Syntax

Last Updated on : 2022-08-25 09:22:14download

Dual channel data point route

In the scenarios of communication links that combine cellular 4G and Bluetooth, you can define a data point (DP) that specifies the Bluetooth or cellular 4G link.

Tuya provides the high-level syntax that deals with the DP route to switch between the Bluetooth and cellular 4G links.

Edit DP

  1. Log in to the Tuya IoT Development Platform.

  2. Click Create.

    If you have created a product, click Product Management and select the desired product.

    Advanced Syntax

  3. Find Standard Category, and choose Outdoor Travel > Travel > Smart Electric Vehicle.

    Advanced Syntax

  4. Follow the prompts to select the smart mode and solution, complete the product information, and then click Create.

    For more information about how to create a product, see Create Smart Electric Vehicle and Create Products.

  5. In the step of Function Definition, click Edit in the Operation column to edit the data point.

    Advanced Syntax

  6. On the page that appears, edit the standard functions. Take Lock Switch for example.

    Advanced Syntax

    In the field of Special Configuration, choose among three options:

    • DP Routing - Not Set: A cellular network is preferred. If a cellular network is unavailable, Bluetooth LE is used.

    • DP Routing - Bluetooth Priority: Bluetooth LE is preferred. If Bluetooth LE is disconnected, a cellular network is used.

    • DP Routing - Force Bluetooth: Bluetooth LE is forcibly used. If Bluetooth LE is disconnected, the app panel will display an error message.

Things to note

  • After you complete the settings on the Tuya IoT Development Platform, the mobile app will work in strict accordance with the specified logic. Meanwhile, we recommend that you process the embedded firmware with the same logic.
  • It is strongly recommended that a command and its response shall be routed through the same type of communication link. For example, the mobile app sends a start command over the cellular 4G network. We recommend that the embedded hardware of the device should respond to the command over the cellular 4G network. This contributes to clear logic and easy troubleshooting.