1. Device Configuration BizBundle

1.1. Features

The business functions cover all the Wi-Fi devices, ZigBee devices, Bluetooth devices, QR code scanning devices (such as GPRS & NB-IOT devices) and other types of devices currently equipped with TuyaSmart APP.

1.1.1. Wi-Fi Devices

Support Wi-Fi smart devices to connect xto the cloud service. The Wi-Fi network configuration mainly includes two network configuration modes, namely, EZ mode and AP mode. And the camera device supports scanning QR code Configuration network.

Attributes Description
EZ mode Also known as the fast connection mode, the APP packs the network data packets into the designated area of the 802.11 data packets and sends them to the surrounding environment; the Wi-Fi module of the smart device is in the promiscuous model and monitors the capture network All the packets in the parsing, according to the agreed protocol data format, parse out the network information packet sent by the APP.
AP mode Also known as hotspot mode, the mobile phone connects the smart device's hotspot. The two parties establish a Socket connection to exchange data through the agreed port.
Camera scan code configuration network The camera device obtains the distribution data information by scanning the QR code on the APP.

1.1.2. ZigBee Devices

Support ZigBee gateway and sub-device network Configuration.

Attributes Description
ZigBee ZigBee technology is a short-range, low-complexity, low-power, low-speed, low-cost two-way wireless communication technology. It is mainly used for data transmission between various electronic devices with short distances, low power consumption and low transmission rates, as well as typical applications with periodic data, intermittent data and low response time data transmission.
ZigBee Gateway The device that integrates the coordinator and WiFi functions in the ZigBee network is responsible for the establishment of the ZigBee network and the storage of data information.
sub-device Routing or terminal equipment in ZigBee network, responsible for data forwarding or terminal control response.

1.1.3. Bluetooth Devices

Tuya Bluetooth has three technical lines, including SingleBLE, SigMesh, TuyaMesh, and dual-mode devices.

Attributes Description
SingleBLE Bluetooth single point device connected one-to-one with mobile phone via Bluetooth
SigMesh Adopts the Bluetooth topology communication released by the Bluetooth Technology Alliance
TuyaMesh Adopting Tuya's self-developed Bluetooth topology communication
Dual-mode Device Support multi-protocol devices, ie devices with both Wi-Fi and BLE capabilities

1.1.4. Scanning code network Configuration Devices

This type of device is connected to the Tuya cloud service after being powered on. The APP scans the QR code on the device (must be the QR code rule supported by the Tuya cloud service, and supports specific firmware access methods. Consult Tuya Technology-related business and project managers ) Enable the device to activate the binding of Tuya Cloud

Attributes Description
GPRS Device Smart devices that use GPRS communication technology to access the network and connect to cloud services
NB-IOT Device Smart device adopting NarrowBand-Internet of Things technology

1.1.5. Automatic network discovery

Integrated with graffiti intelligent universal Configuration network technology to provide users with a set of fast Configuration network functions

1.2. Integrate

1.2.1. Preparation for Integration

The Biz Bundle is based on Tuya Smart SDK version 3.17.0, so before integration, you need to do some preparations:

1.2.2. Integrate Biz Bundle

    dependencies { 
     api 'com.tuya.smart:tuyasmart-bizbundle-device_activator:3.20.0-7'
    }
  • Configure the progurad
    #fastJson
    -keep class com.alibaba.fastjson.**{*;}
    -dontwarn com.alibaba.fastjson.**

    #rx
    -dontwarn rx.**
    -keep class rx.** {*;}
    -keep class io.reactivex.**{*;}
    -dontwarn io.reactivex.**
    -keep class rx.**{ *; }
    -keep class rx.android.**{*;}

    #fresco
    -keep class com.facebook.drawee.backends.pipeline.Fresco
    -keep @com.facebook.common.internal.DoNotStrip class *
    -keepclassmembers class * {
    @com.facebook.common.internal.DoNotStrip *;
    }

    #tuya
    -keep class com.tuya.**{*;}
    -dontwarn com.tuya.**

1.3. Function call

1.3.1. Function configuration

Configuration item Field name Description
AP hotspot name configuration <string name="ap_mode_ssid">SmartLife</string> List of hotspot prefixes supported by AP configuration, default configuration: SmartLife
Support BLE <bool name="is_need_ble_support">true</bool> Whether to support the network function of BLE devices, the default configuration: true
Support MESH <bool name="is_need_blemesh_support">true</bool> Whether to support the network function of MESH devices, the default configuration: true
Theme color configuration <color name="primary_button_bg_color">#FF5A28</color> Button background color
Theme color configuration <color name="primary_button_font_color">#FFFFFF</color> Button text color
Support Scan <bool name="is_scan_support">true</bool> Whether to support the top right corner of the list page scan function, the default configuration: true

1.3.2. Method call

  TuyaDeviceActivatorManager.startDeviceActiveAction(activity, homeId, 
        new ITuyaDeviceActiveListener() {
            @Override
            public void onDevicesAdd(List<String> devIds, boolean updateRoomData) {

            }

            @Override
            public void onRoomDataUpdate() {

            }

            @Override
            public void onOpenDevicePanel(String s) {

            }

            @Override
            public void onExitConfigBiz() {

            }
        });

Parameters

Parameters Description
activity activity
homeId Family ID, For details, please refer to Tuya Smart SDK Home Creation

Parameters

Parameters Description
devIds List of device IDs with successful network configuration
updateRoomData Whether the room equipment information has been changed
onOpenDevicePanel You can open a touch panel and choose to implement according to actual business needs
onExitConfigBiz If the configuration network is not executed, the configuration network service will be voluntarily withdrawn and selected to be implemented according to the actual business needs

results matching ""

    No results matching ""