-
public interface IThingBleManager
Thing BLE operate manager. Provide basic ability of Thing BLE
-
-
Method Summary
Modifier and Type Method Description abstract void
notifyNoneForScan()
stop ble connect taskDeprecate abstract void
addScanLinkTaskIds(String idJsonString)
Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored abstract void
disconnectLinkedIds(List<String> ids)
Disconnect device Bluetooth connection. abstract void
connectBleDevice(List<BleConnectBuilder> builderList)
* Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored abstract void
disconnectAllBleDevices()
abstract void
directConnectBleDevice(BleConnectBuilder builder)
direct connect the device form ble abstract void
disconnectBleDevice(List<BleConnectBuilder> builderList)
Disconnect device Bluetooth connection. abstract void
startBleConfig(long homeId, String devUuid, Map<String, Object> params, IThingBleConfigListener configListener)
Device activation function, when the device is scanned, you can use this method to activate. abstract void
stopBleConfig(String devUuid)
stop activation abstract boolean
isBleLocalOnline(String devId)
Get the device‘s local online status abstract boolean
isBleLocalOnlineByMaster(String devId)
abstract void
removeDeviceLocal(String devId, IResultCallback iControlCallback)
Remove the Bluetooth device, the device will become to be activated if the device is online locally. abstract void
resetFactoryLocal(String devId, IResultCallback iControlCallback)
Restore the factory settings of the Bluetooth device, the device will become to be activated if the device is locally online. abstract void
publishDps(String devId, String dps, IResultCallback iControlCallback)
send data points to device by bluetooth abstract void
queryDps(String devId, List<String> dpList, IResultCallback iResultCallback)
query data points from device by bluetooth abstract void
startBleOta(String uuid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)
Upgrade the firmware of the device by bluetooth abstract void
startBleOta(String uuid, String pid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)
abstract void
startBleOta(BleOTABean otaBean, OnBleUpgradeListener listener)
Upgrade the firmware of the device/Accessories by bluetooth abstract void
cancelBleOta(String uuid)
Stop upgrading firmware abstract String
getDeviceAllDps(String devId)
Get the latest data points status of the current bluetooth device. abstract String
scanFilter(Array<byte> scan, String devName, String address)
abstract void
readBleRssi(String devId, BleRssiListener listener)
get the rssi of the bluetooth device. abstract void
postDataChannel(String devId, String command, DataChannelListener listener)
abstract void
postDataChannel(Map<String, Object> params, DataChannelListener listener)
Big data channel of V4.1 protocal. abstract int
getConfigDeviceFlag(String uuid)
abstract void
registerBusinessLog(BleLogCallback logCallback)
register business log , Can monitor internal communication logs. abstract void
unregisterBusinessLog(BleLogCallback logCallback)
unregister business log. abstract void
registerDeviceConnectStatus(String devId, BleConnectStatusListener statusListener)
register device connection status changes abstract void
unregisterDevcieConnectStatus(String devId)
unregister the monitor abstract void
registerTransferListener(String devId, OnBleDataTransferListener listener)
Register the custom data channel of some device, the custom data of the device will be returned through the monitoring abstract void
unregisterTransferListener(String devId, OnBleDataTransferListener listener)
Unregister the custom data channel of some device abstract void
publishTransferData(String devId, Array<byte> raw, IResultCallback iResultCallback)
Send the custom data to the device abstract void
publishSystemTimeWithDeviceId(String devId)
Get the system time and send it to the device abstract void
uploadCacheDataToServer(String devId)
upload dps cache data to server,such as when there is no network during data interaction, it will be cached abstract void
clearBleDataCache(List<String> devIdList)
clear ble connect cache abstract void
clearBigDataChannelData(String devId, int type, IResultCallback callback)
abstract List<DeviceRespBean.CommunicationModuleT>
orderLocalCommunicationList(DeviceRespBean respBean)
order the communication list abstract void
getDeviceAttribute(String deviceId, OnDeviceAttributeListener listener)
get device attribute from device info abstract void
registerBleIotListener(OnBleIoTChannelListener listener)
Register the iot data channel of some device, the iot data of the device will be returned through the monitoring abstract void
unregisterBleIotListener(OnBleIoTChannelListener listener)
Unregister the iot data channel listener of some device abstract void
publishIoTTransparentData(String deviceId, DevIotDataBean iotData, OnBleSendChannelListener listener)
Send the iot data to the device abstract void
publishTransparentData(String deviceId, Array<byte> data, OnBleSendChannelListener listener)
push user business data to device by BLE abstract void
registerBleRespListener(OnBleToDeviceListener listener)
register a listener to accept data from device abstract void
unRegisterBleRespListener(OnBleToDeviceListener listener)
abstract void
getBluetoothState(String devId, IThingResultCallback<BluetoothBondStateBean> response)
abstract void
bindSlaveDeviceToMaster(String masterDevId, String slaveDevId, IResultCallback callback)
abstract void
unbindSlaveDeviceFromMaster(String masterDevId, String slaveDevId, IResultCallback callback)
abstract void
activeExtenModuleByBLEActived(String deviceId, IResultCallback iResultCallback)
active exten module by BLE abstract void
activeExtenModuleByBLEActived(String devId, Map<String, Object> params, IResultCallback callback)
abstract int
getExtModuleType(String devId)
abstract void
registerExtModuleStatus(ExtModuleStatusListener listener)
abstract void
unregisterExtModuleStatus(ExtModuleStatusListener listener)
abstract void
postFileTransfer(String devId, FileTransferInfo fileTransferInfo, ActionProgressResponse<Boolean> listener)
Transfer files to the device abstract void
registerDataLocalProcessingListener(OnDataLocalProcessingListener listener)
abstract void
setLocationWeatherAbility(IGetLocationWeather iGetLocationWeather)
set location weather abstract void
setLocationWeatherAbility(IGetCustomLocationWeather iGetLocationWeather)
set location weather abstract void
setHomeWeatherAbility(IGetHomeWeather iGetHomeWeather)
set home weather abstract void
setHomeWeatherAbility(IGetCustomHomeWeather iGetHomeWeather)
set home weather abstract int
readRssiByCache(String uuid)
abstract void
recoverDeviceStatus(String uuid)
abstract void
queryWifiListForDeviceScan(QueryWifiSetting setting, IThingResultCallback<List<WiFiInfo>> callback)
abstract void
fetchDeviceLog(String uuid, IThingResultCallback<Array<byte>> callback)
abstract void
queryActiveStatus(String uuid, IThingResultCallback<Array<byte>> callback)
abstract Boolean
isDeviceInOta(String deviceId)
abstract int
getBleConnectAbility(String devId)
abstract void
checkBleWifiDeviceReset(CheckDeviceSetting setting, IThingResultCallback<CheckResultBean> callback)
Whether it can be reset, and whether it still needs to be reset in the cloud-bound state abstract void
startResetBleWifiDevice(ResetBleSetting setting, IResultCallback callback)
Support Bluetooth scan code reset service abstract int
getBleExpandAttr(String devId)
abstract void
recordBleConnectEvent(String devId, int src, String traceId)
Record ble connect event. abstract BWFlashPackage
getBWFlashPackage(String address)
abstract void
getRcs(IThingDataCallback<JSONObject> callback)
-
-
Method Detail
-
notifyNoneForScan
@Deprecated() abstract void notifyNoneForScan()
stop ble connect taskDeprecate
-
addScanLinkTaskIds
@Deprecated() abstract void addScanLinkTaskIds(String idJsonString)
Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored
- Parameters:
idJsonString
- devId List to JsonString, The devId of the device you want to connect,new method connectBleDevice}
-
disconnectLinkedIds
@Deprecated() abstract void disconnectLinkedIds(List<String> ids)
Disconnect device Bluetooth connection.
- Parameters:
ids
- devId List to JsonString ,The devId of the device you want to disconnect.
-
connectBleDevice
abstract void connectBleDevice(List<BleConnectBuilder> builderList)
* Reconnect the devices, if the BLE device is not connected, it will reconnect the device,if it is already connected, it will be ignored
- Parameters:
builderList
- com.thingclips.smart.android.ble.builder.BleConnectBuilder
-
disconnectAllBleDevices
abstract void disconnectAllBleDevices()
-
directConnectBleDevice
abstract void directConnectBleDevice(BleConnectBuilder builder)
direct connect the device form ble
-
disconnectBleDevice
abstract void disconnectBleDevice(List<BleConnectBuilder> builderList)
Disconnect device Bluetooth connection.
- Parameters:
builderList
- com.thingclips.smart.android.ble.builder.BleConnectBuilder
-
startBleConfig
abstract void startBleConfig(long homeId, String devUuid, Map<String, Object> params, IThingBleConfigListener configListener)
Device activation function, when the device is scanned, you can use this method to activate.
params:param.put("ssid", "xxxx"); //wifi ssidparam.put("password", "xxxxxx"); //wifi pwdparam.put("token", "xxxxxxxxxxxxx"); // user token
- Parameters:
homeId
- current homeId ,Your device will be activated under the current home.devUuid
- device's uuid getUuidparams
- Activation parameters.configListener
- callback IThingBleConfigListener
-
stopBleConfig
abstract void stopBleConfig(String devUuid)
stop activation
- Parameters:
devUuid
- device's uuid getUuid
-
isBleLocalOnline
abstract boolean isBleLocalOnline(String devId)
Get the device‘s local online status
- Parameters:
devId
- device id
-
isBleLocalOnlineByMaster
abstract boolean isBleLocalOnlineByMaster(String devId)
-
removeDeviceLocal
abstract void removeDeviceLocal(String devId, IResultCallback iControlCallback)
Remove the Bluetooth device, the device will become to be activated if the device is online locally.If the device is offline locally, there will be no effect
- Parameters:
devId
- device IdiControlCallback
- IResultCallback
-
resetFactoryLocal
abstract void resetFactoryLocal(String devId, IResultCallback iControlCallback)
Restore the factory settings of the Bluetooth device, the device will become to be activated if the device is locally online.If the device is offline locally, there will be no effect
- Parameters:
devId
- device IdiControlCallback
- IResultCallback
-
publishDps
abstract void publishDps(String devId, String dps, IResultCallback iControlCallback)
send data points to device by bluetooth
- Parameters:
devId
- device Iddps
- Data pointsiControlCallback
- IResultCallback
-
queryDps
abstract void queryDps(String devId, List<String> dpList, IResultCallback iResultCallback)
query data points from device by bluetooth
- Parameters:
devId
- device iddpList
- Data point IdsiResultCallback
- IResultCallback
-
startBleOta
@Deprecated() abstract void startBleOta(String uuid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)
Upgrade the firmware of the device by bluetooth
- Parameters:
uuid
- device uuid getUuidtype
- 0: normal firmware 1:mcu firmwareversion
- the version of the new firmwarebinPackagePath
- the path of the downloaded firmware on the phone storagelistener
- ota process callback OnBleUpgradeListener
-
startBleOta
@Deprecated() abstract void startBleOta(String uuid, String pid, int type, String version, String binPackagePath, OnBleUpgradeListener listener)
-
startBleOta
abstract void startBleOta(BleOTABean otaBean, OnBleUpgradeListener listener)
Upgrade the firmware of the device/Accessories by bluetooth
- Parameters:
otaBean
- OTA device datalistener
- ota process callback OnBleUpgradeListener
-
cancelBleOta
abstract void cancelBleOta(String uuid)
Stop upgrading firmware
- Parameters:
uuid
- device uuid getUuid
-
getDeviceAllDps
abstract String getDeviceAllDps(String devId)
Get the latest data points status of the current bluetooth device. only for ble device
- Parameters:
devId
- device id getDevId
-
scanFilter
@Deprecated() abstract String scanFilter(Array<byte> scan, String devName, String address)
-
readBleRssi
abstract void readBleRssi(String devId, BleRssiListener listener)
get the rssi of the bluetooth device.
If the device is connected, it can be obtained correctly, otherwise an error will be returned
- Parameters:
devId
- device id getDevIdlistener
- backback BleRssiListener
-
postDataChannel
@Deprecated() abstract void postDataChannel(String devId, String command, DataChannelListener listener)
-
postDataChannel
abstract void postDataChannel(Map<String, Object> params, DataChannelListener listener)
Big data channel of V4.1 protocal. Need equipment support.
This function can be used for transferring some large amounts of historical data
- Parameters:
params
- The map of params.listener
- Callback DataChannelListener
-
getConfigDeviceFlag
@Deprecated() abstract int getConfigDeviceFlag(String uuid)
-
registerBusinessLog
@Deprecated() abstract void registerBusinessLog(BleLogCallback logCallback)
register business log , Can monitor internal communication logs.
- Parameters:
logCallback
- BleLogCallback
-
unregisterBusinessLog
@Deprecated() abstract void unregisterBusinessLog(BleLogCallback logCallback)
unregister business log.
- Parameters:
logCallback
- the callback what you want unregister
-
registerDeviceConnectStatus
abstract void registerDeviceConnectStatus(String devId, BleConnectStatusListener statusListener)
register device connection status changes
- Parameters:
devId
- device id getDevIdstatusListener
- BleConnectStatusListener
-
unregisterDevcieConnectStatus
abstract void unregisterDevcieConnectStatus(String devId)
unregister the monitor
-
registerTransferListener
abstract void registerTransferListener(String devId, OnBleDataTransferListener listener)
Register the custom data channel of some device, the custom data of the device will be returned through the monitoring
- Parameters:
devId
- device id getDevIdlistener
- OnBleDataTransferListener
-
unregisterTransferListener
abstract void unregisterTransferListener(String devId, OnBleDataTransferListener listener)
Unregister the custom data channel of some device
- Parameters:
devId
- device id getDevIdlistener
- the listener what you want unregister
-
publishTransferData
abstract void publishTransferData(String devId, Array<byte> raw, IResultCallback iResultCallback)
Send the custom data to the device
- Parameters:
devId
- device id getDevIdraw
- the custom data defined with equipmentiResultCallback
- send result IResultCallback
-
publishSystemTimeWithDeviceId
abstract void publishSystemTimeWithDeviceId(String devId)
Get the system time and send it to the device
- Parameters:
devId
- device id getDevId
-
uploadCacheDataToServer
abstract void uploadCacheDataToServer(String devId)
upload dps cache data to server,such as when there is no network during data interaction, it will be cached
- Parameters:
devId
- device id getDevId
-
clearBleDataCache
abstract void clearBleDataCache(List<String> devIdList)
clear ble connect cache
-
clearBigDataChannelData
abstract void clearBigDataChannelData(String devId, int type, IResultCallback callback)
-
orderLocalCommunicationList
abstract List<DeviceRespBean.CommunicationModuleT> orderLocalCommunicationList(DeviceRespBean respBean)
order the communication list
-
getDeviceAttribute
abstract void getDeviceAttribute(String deviceId, OnDeviceAttributeListener listener)
get device attribute from device info
- Parameters:
deviceId
- device id getDevIdlistener
- result callback OnDeviceAttributeListener
-
registerBleIotListener
abstract void registerBleIotListener(OnBleIoTChannelListener listener)
Register the iot data channel of some device, the iot data of the device will be returned through the monitoring
- Parameters:
listener
- OnBleIoTChannelListener
-
unregisterBleIotListener
abstract void unregisterBleIotListener(OnBleIoTChannelListener listener)
Unregister the iot data channel listener of some device
- Parameters:
listener
- the listener what you want unregister OnBleIoTChannelListener
-
publishIoTTransparentData
abstract void publishIoTTransparentData(String deviceId, DevIotDataBean iotData, OnBleSendChannelListener listener)
Send the iot data to the device
- Parameters:
deviceId
- device id getDevIdiotData
- the iot data defined with equipmentlistener
- send result OnBleSendChannelListener
-
publishTransparentData
abstract void publishTransparentData(String deviceId, Array<byte> data, OnBleSendChannelListener listener)
push user business data to device by BLE
- Parameters:
deviceId
- device iddata
- user business data(such as timing data)listener
- callback
-
registerBleRespListener
abstract void registerBleRespListener(OnBleToDeviceListener listener)
register a listener to accept data from device
- Parameters:
listener
- listener
-
unRegisterBleRespListener
abstract void unRegisterBleRespListener(OnBleToDeviceListener listener)
-
getBluetoothState
abstract void getBluetoothState(String devId, IThingResultCallback<BluetoothBondStateBean> response)
-
bindSlaveDeviceToMaster
abstract void bindSlaveDeviceToMaster(String masterDevId, String slaveDevId, IResultCallback callback)
-
unbindSlaveDeviceFromMaster
abstract void unbindSlaveDeviceFromMaster(String masterDevId, String slaveDevId, IResultCallback callback)
-
activeExtenModuleByBLEActived
abstract void activeExtenModuleByBLEActived(String deviceId, IResultCallback iResultCallback)
active exten module by BLE
- Parameters:
deviceId
- device IDiResultCallback
- send result IResultCallback
-
activeExtenModuleByBLEActived
abstract void activeExtenModuleByBLEActived(String devId, Map<String, Object> params, IResultCallback callback)
-
getExtModuleType
abstract int getExtModuleType(String devId)
-
registerExtModuleStatus
abstract void registerExtModuleStatus(ExtModuleStatusListener listener)
-
unregisterExtModuleStatus
abstract void unregisterExtModuleStatus(ExtModuleStatusListener listener)
-
postFileTransfer
abstract void postFileTransfer(String devId, FileTransferInfo fileTransferInfo, ActionProgressResponse<Boolean> listener)
Transfer files to the device
- Parameters:
devId
- device id getDevIdfileTransferInfo
- File informationFileTransferInfolistener
- file transfer result ActionProgressResponse
-
registerDataLocalProcessingListener
abstract void registerDataLocalProcessingListener(OnDataLocalProcessingListener listener)
-
setLocationWeatherAbility
@Deprecated() abstract void setLocationWeatherAbility(IGetLocationWeather iGetLocationWeather)
set location weather
- Parameters:
iGetLocationWeather
- location weather from business layer
-
setLocationWeatherAbility
abstract void setLocationWeatherAbility(IGetCustomLocationWeather iGetLocationWeather)
set location weather
- Parameters:
iGetLocationWeather
- location weather from business layer
-
setHomeWeatherAbility
@Deprecated() abstract void setHomeWeatherAbility(IGetHomeWeather iGetHomeWeather)
set home weather
- Parameters:
iGetHomeWeather
- home weather from business layer
-
setHomeWeatherAbility
abstract void setHomeWeatherAbility(IGetCustomHomeWeather iGetHomeWeather)
set home weather
- Parameters:
iGetHomeWeather
- home weather from business layer
-
readRssiByCache
@Deprecated() abstract int readRssiByCache(String uuid)
-
recoverDeviceStatus
abstract void recoverDeviceStatus(String uuid)
-
queryWifiListForDeviceScan
abstract void queryWifiListForDeviceScan(QueryWifiSetting setting, IThingResultCallback<List<WiFiInfo>> callback)
-
fetchDeviceLog
abstract void fetchDeviceLog(String uuid, IThingResultCallback<Array<byte>> callback)
-
queryActiveStatus
abstract void queryActiveStatus(String uuid, IThingResultCallback<Array<byte>> callback)
-
isDeviceInOta
abstract Boolean isDeviceInOta(String deviceId)
-
getBleConnectAbility
abstract int getBleConnectAbility(String devId)
-
checkBleWifiDeviceReset
abstract void checkBleWifiDeviceReset(CheckDeviceSetting setting, IThingResultCallback<CheckResultBean> callback)
Whether it can be reset, and whether it still needs to be reset in the cloud-bound state
-
startResetBleWifiDevice
abstract void startResetBleWifiDevice(ResetBleSetting setting, IResultCallback callback)
Support Bluetooth scan code reset service
-
getBleExpandAttr
abstract int getBleExpandAttr(String devId)
-
recordBleConnectEvent
abstract void recordBleConnectEvent(String devId, int src, String traceId)
Record ble connect event.
- Parameters:
devId
- device idsrc
- source, 1 means form lock paneltraceId
- trace id, It is used to track the source of the event
-
getBWFlashPackage
abstract BWFlashPackage getBWFlashPackage(String address)
-
getRcs
abstract void getRcs(IThingDataCallback<JSONObject> callback)
-
-
-
-