registry_charge_event
To register a battery charge, use the unit/registry_charge_event command.
svc=unit/registry_charge_event¶ms={
"date": <uint>,
"volume": <double>,
"cost": <double>,
"location": "<text>",
"x": <double>,
"y": <double>,
"description": "<text>",
"itemId": <long>
}
Parameters
| Parameter | Description |
|---|---|
| date | Date. |
| volume | Amount of energy used to recharge the battery, in kWh. |
| cost | Cost. |
| location | Unit location. |
| x | Longitude. |
| y | Latitude. |
| description | Description. |
| itemId | Unit ID. |
Response
If the request is completed successfully, an empty response is returned.
{ }
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | This user can’t execute the request. |
| 6 | Failed to register a battery charge. |
| 7 | The user doesn’t have the Manage events access right to the unit. |