Last Updated on : 2024-06-19 06:07:30download
Numerous Bluetooth products have emerged within Tuya’s ecosystem and been widely used in complex scenarios. In order to break the limits of Bluetooth connections and broaden the scenario coverage of a single Bluetooth connection strategy, the scenarios of Bluetooth connection and disconnection are classified, as described in the following sections. Choose the connection and disconnection strategy that suits your product features and optimize the Bluetooth connection.
Go to the Tuya Developer Platform and click Product.
Find a product in the Developing status, and click Continue to Develop in the Operation column.
In the Function Definition step, scroll down the page, find the Advanced Functions section, and then enable Bluetooth Connection Strategy.
Click Configuration to set up the device connection and disconnection logic.
The following figure shows the app’s logic to process Bluetooth connection and disconnection.
Connection option | Open app or pull homepage to refresh | Enable Bluetooth | Open panel | Initiate access to panel feature | Automatic reconnection to device |
---|---|---|---|---|---|
Default connection | ✅ | ✅ | ✅ | ✅ | ❌ |
Connect on demand | ❌ | ❌ | ✅ | ✅ | ❌ |
Keep connected | ✅ | ✅ | ✅ | ✅ | ✅ |
Do not connect | ❌ | ❌ | ❌ | ✅ | ❌ |
✅: Indicates that the connection will be triggered or the feature is supported. Note that the item “Initiate access to panel feature” only indicates whether the feature is supported. The implementation depends on the specific panel features.
❌: indicates that the connection will not be triggered.
Disconnection option | Close the app or disable Bluetooth | Disconnected from panel for 30s | Always-on or running in background for 30s | Terminate access to panel feature |
---|---|---|---|---|
Disconnect in time | ✅ | ❌ | ✅ | ✅ |
Disconnect on demand | ✅ | ❌ | ❌ | ✅ |
Continuous connection | ✅ | ❌ | ❌ | ✅ |
Disconnect in time & on demand | ✅ | ✅ | ✅ | ✅ |
✅: indicates that the device will be disconnected from Bluetooth.
❌: indicates that disconnection will not be triggered.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback