 			device_type: deviceType
 		customOptions:
 			apikey: apiKey
-	).then ->
-		return uuid
+	).then (data) ->
+		_.pick(data, 'id', 'uuid')
 
 module.exports = ->
 	# Load config file

crypto = require 'crypto'
config = require './config'
PlatformAPI = require 'pinejs-client-js/request'

PLATFORM_ENDPOINT = url.resolve(config.apiEndpoint, '/ewa/')
resinAPI = new PlatformAPI(PLATFORM_ENDPOINT)

		if userConfig.uuid? and userConfig.registered_at?
			return userConfig
		registerDevice(userConfig.apiKey, userConfig.userId, userConfig.applicationId, userConfig.deviceType, userConfig.uuid)
		.then (device) ->
			userConfig.uuid = device.uuid
			userConfig.deviceId = device.id
			fs.writeFileAsync('/boot/config.json', JSON.stringify(userConfig))
		.return(userConfig)
	.then ->
		console.log('Finishing bootstrapping')
		Promise.all([
