TL;DR: In order for smart charging to work, make sure that the device has a meaningful charge_by value configured and is not opted out.
For smart charging a vehicle needs a valid smart charging setup configuration in order to ensure that your customer’s car is smart charged and ready to go when expected. The setup consist of compulsory and optional values that are explained in the table below.
| Parameter | Required | Description | Data type | Example value |
|---|---|---|---|---|
| Charge by time | ✅ | The time in your local time in format “HH:MM” to mark time of day when the smart charging should guarantee a ready-to-go vehicle. We default this to 7 o’clock in the morning. | string | “07:00” - vehicle is smart charged by 7AM each morning. |
| Guaranteed max price | ❌ | The maximum energy price ex VAT in EUR/MWh that the car is permitted to charge at. | float64 | 100.0 - vehicle is smart charged at hours when the energy price is 100.0 EUR/MWh or lower. |
| Guaranteed min SoC | ❌ | In conjunction with guaranteed max price, smart charge my vehicle regardless of price until this given state of charge is reached. | int | 60 - smart charge the vehicle without looking at guaranteed max price value until 60% SoC is reached. Then onwards charge only when the price is lower than guaranteed max price. |
Target state of charge (SoC) is not in the list above by design. We recommend strongly that the vehicle owner sets the target SoC separately in the vehicle itself or in the respective OEM app. This avoids possible conflicting target SoC values and confusions.
In addition to having a valid smart charging setup, the vehicle must also activated. By default all vehicles, when added and set up, have activated smart charging. However, it is possible to temporarily pause smart charging. In Gridio terms this is called “opting out” of smart charging.
| Parameter | Description | Data type | Example value |
|---|---|---|---|
| opt_out_until | UNIX timestamp until when smart charging should be deactivated. When this field in vehicle configuration has value and the timestamp is after current time, then smart charging is paused. | int64 |
| 1745484252 - smart charging is paused until 24 April 2025 0844 hours UTC. | | | | | |
To get the device config current values simply execute get device call
curl -X GET <https://api.gridio.energy/api/v1/businesses/{business_id}/devices/{dev_id}> \\
-H "Authorization: Bearer <backend access token>"
In the response you will get the latest device config values.
To set the new desired values you need to execute PATCH call
curl -X PATCH https://api.gridio.energy/api/v1/businesses/{business_id}/devices/{dev_id} \ -H "Authorization: Bearer <backend access token>" \ -H "Content-Type: application/json" \ -d '{...}'
The payload in this call body needs to include the fields in device parameters that you wish to change. Example below:
{
"charge_by": "10:00",
"guaranteed_max_price": 120.5,
"guaranteed_soc": 50,
"opt_out_until": 1627849329,
}
Include only the fields you want to change to the request. The fields that remain unchanged can be ignored.