Device Control
selectedDevice is a device selected from the SDK device list. Run these examples inside an async function.
ℹ️
connect the device first
Send Control Command
import {
IDevice,
} from 'react-native-gizwits-sdk-v5/lib/types';
const device: IDevice = selectedDevice;
// Same for mqtt and lan
let resData = await device.bleCapability.sendDp({
switch: true
})