code: function turnOff(device) {
      return api.request('/device/turnOff?' + querystring.stringify({id: device.id || device}));
    }
docs: Turns a device on
  @param device either {id: anId} or anId
  @returns {*} a Promise