lib/devices.js
function turnOn(device) {
    return api.request('/device/turnOn?' + querystring.stringify({id: device.id || device}));
  }
function turnOn(device) {
    return api.request('/device/turnOn?' + querystring.stringify({id: device.id || device}));
  }
function turnOn ( device ) { return api . request ( '/device/turnOn?' + querystring . stringify ( { id : device . id || device } ) ) ; }
Turns a device off
@param device either {id: anId} or anId
@returns {*} a Promise
Turns a device off