1. Check the device keeps history
sessions: false means the manufacturer records no history. Asking anyway returns 422 DEVICE_NOT_CAPABLE, every time, so read the flag instead of retrying.
2. List sessions
active session has no endedAt or endReason, and its energyDelivered is a running total. Times are UTC, and id is stable, so you can store it as a key.
3. Filter and page
Pin the window when you page: send the first page’s
window.to as to on every later request, so a session that starts mid-walk doesn’t shift rows past you.
pagination.hasMore is false. For energy in the session that’s running now, state.sessionEnergy on the device read is the live figure.
Next steps
Start and stop a session
Charge now, pause, or charge inside a time window.
Pull
Read shape, freshness, and pagination.