Sessions
A session is a core asset that encapsulates the attempts of the user (driver or admin) to affect a charging transaction. All metrics in a session are based on data reported by the chargestation sensors and meters.
Timeline
Session Creation:
When a new session is created (via a POST API request or via the dashboard), eDRV sends a remote start request to the chargestation (status = created
)
Charging Start:
If the chargestation starts charging the status changes to (status = started
).
Charging Stop:
When the chargestation sends a successful stop charging message, (status = ended
)
Session Cancelled:
If the chargestation does not report that charging has start within 120 seconds
of a session start attempt the session is cancelled (status = cancelled
). E.g. when the driver did not insert his charging cable in time. In this scenario please create a new session to attempt a new charging session.
{
"ok": true,
"message": "Result",
"result": {
"_id": "62b1c19482f1fc562109c551",
"user": "61260088b0686130b470021c",
"chargestation": "6192dea22df1431ea2c4720d",
"connector": "6192dea367f4bc131489c581",
"status": "Started",
"rate": "616dc49ddc0a8d0ecb225efa",
"metrics": {
"chargingStart": "2022-06-21T13:03:59.000Z",
"timezone": "America/Los_Angeles",
"energyPeriod": 2281.215,
"energyConsumed": 1960
},
"energy_report": {
"timestamp": "2022-06-21T13:41:59Z",
"current": {
"value": "16.0",
"unit": "A"
},
"power": {
"value": "3.3",
"unit": "kW"
},
"energy_meter": {
"value": "734.060",
"unit": "kWh"
},
"state_of_charge": {
"unit": "Percent",
"value": "69"
}
},
"charging_activity": [
{
"startTime": "2022-06-21T13:03:59.000Z",
"endTime": "2022-06-21T13:42:00.215Z",
"status": "Charging"
}
],
"cost": {
"amount": 0.588,
"currency": "usd",
"breakdown": [
{
"type": "ENERGY",
"period": {
"startTime": 1655816640000,
"endTime": 1655818921000
},
"rateName": "",
"quantity": 1.96,
"unit": "kWh",
"unitPrice": 0.3,
"beforeTax": 0.588,
"tax": 0,
"totalTax": 0,
"totalCost": 0.588
}
]
},
"createdAt": "2022-06-21T13:04:01.789Z",
"updatedAt": "2022-06-21T13:42:00.215Z"
}
}
Attributes
_id string
The Id of this transaction
user string
The Id of the user
chargestation string
The Id of the chargestation where this charging transaction took place
connector string
The Id of the connector where this charging transaction took place
status string
The live current transaction status
Expected values are [created
,started
,ended
,cancelled
]
rate string
The rate Id applied for this charging session
target object Targets for this session. See Charging with Session Targets
time
: float Max session time inMinutes
cost
: float Max session cost in the currency of the rate applied to this connector
energy
: float Max session energy inkWh
energy_start_time
: date-time string UTC time for session to start delivering energy to a connected EV
energy_stop_time
: date-time string UTC time for session to stop delivering energy to a connected EV
cost object The running estimate or final cost for this session
amount
: float
currency
: string Three digit currency code based on the Rate for this session
cost.breakdown
: array with breakdowns of the cost amount
type
: string Rate type applied. One of [FLAT
,ENERGY
,TIME
]period
: object period during which cost applied
period.startTime
: timestamp
period.endTime
: timestamprateName
: string Rate namequantity
: float Consumption e.g. 22.5kWh or 6.5hunit
: string Unit of quantity. One of [Wh
,kWh
,h
]unitPrice
: float Price per unit e.g. $0.30 per kWhbeforeTax
: float cost before taxtax
: integer Tax as a %agetotalTax
: float Tax amounttotalCost
: float Total with tax
metrics object As reported directly by the chargestation. Final when session.status
= ended
energyConsumed
: float As reported by the chargestation meter in Wh
energyPeriod
: integer Energy consumption time period in Seconds
chargingStart
: datetime Energy consumption start timestamp
chargingStop
: datetime Charging session end timestamp
energy_report object Instantaneous session energy information
timestamp
: datetime report timestamp in UTC
current
: object Instantaneous current flow to the EV
current.value
: floatcurrent.unit
: string Expected values are [A
] for Amperes
power
: object Instantaneous active power imported by the EV.
power.value
: floatpower.unit
: string Expected values are [W
,kW
]
energy_meter
: object Chargestation's Meter register. Reports total lifetime energy imported from the grid supply by this chargestation.
energy_meter.value
: floatenergy_meter.unit
: string Expected values are [Wh
,kWh
]
state_of_charge
: object report the vehicle state of charge if and only if reported by the chargestation
state_of_charge.value
: integer Vehicle State of Charge as a percentagestate_of_charge.unit
: string
charging_activity array of object chronological state changes of the connector during the session
startTime
: datetimeendTime
: datetimestatus
: string
meta_data object
Any session specific data the developer would like to include
createdAt datetime
Creation time of this Session record
updatedAt datetime
Last update time of this Session record
Updated about 2 months ago