public JsonObject addDevice(DeviceInfo selectedDevice){
  JsonObject initJsonObjectParams=broadlinkStandardParams(BroadlinkConstants.CMD_DEVICE_ADD_ID,BroadlinkConstants.CMD_DEVICE_ADD);
  initJsonObjectParams.addProperty("mac",selectedDevice.getMac());
  initJsonObjectParams.addProperty("type",selectedDevice.getType());
  initJsonObjectParams.addProperty("name",selectedDevice.getName());
  initJsonObjectParams.addProperty("lock",selectedDevice.getLock());
  initJsonObjectParams.addProperty("password",selectedDevice.getPassword());
  initJsonObjectParams.addProperty("id",selectedDevice.getId());
  initJsonObjectParams.addProperty("subdevice",selectedDevice.getSubdevice());
  initJsonObjectParams.addProperty("key",selectedDevice.getKey());
  return broadlinkExecuteCommand(initJsonObjectParams);
}

public JsonObject addDevice ( DeviceInfo selectedDevice ) { JsonObject initJsonObjectParams = broadlinkStandardParams ( BroadlinkConstants . CMD_DEVICE_ADD_ID , BroadlinkConstants . CMD_DEVICE_ADD ) ; initJsonObjectParams . addProperty ( "mac" , selectedDevice . getMac ( ) ) ; initJsonObjectParams . addProperty ( "type" , selectedDevice . getType ( ) ) ; initJsonObjectParams . addProperty ( "name" , selectedDevice . getName ( ) ) ; initJsonObjectParams . addProperty ( "lock" , selectedDevice . getLock ( ) ) ; initJsonObjectParams . addProperty ( "password" , selectedDevice . getPassword ( ) ) ; initJsonObjectParams . addProperty ( "id" , selectedDevice . getId ( ) ) ; initJsonObjectParams . addProperty ( "subdevice" , selectedDevice . getSubdevice ( ) ) ; initJsonObjectParams . addProperty ( "key" , selectedDevice . getKey ( ) ) ; return broadlinkExecuteCommand ( initJsonObjectParams ) ; }
add a device to broadlink sdk before it can be controlled
