lib/devices.js
function history(device, from, to) {
    return api.request('/device/history?' + querystring.stringify({id: device.id || device, from: from, to: to}));
  }
function history(device, from, to) {
    return api.request('/device/history?' + querystring.stringify({id: device.id || device, from: from, to: to}));
  }
function history ( device , from , to ) { return api . request ( '/device/history?' + querystring . stringify ( { id : device . id || device , from : from , to : to } ) ) ; }
Returns device history
@param device either {id: anId} or anId
@param from timestamp in seconds
@param to timestamp in seconds
@returns {*} a Promise
Returns device history