Battery API Beta

This is a new battery API management protocol for managing your GivEnergy inverter system. This is still a beta API protocol so providing feedback is important in the continued development of this API.

 

You can view this collection using this linkhttps://www.getpostman.com/collections/85bd4515dd999fccba52

URLhttps://api.givenergy.cloud/

 

 

You can find your authentication by clicking the slider on the account details of your page


 

 Binding API Key

 

POST - "/signup"

 

 

By signing up to the API, we register our users with the same authentication key on the GivEnergy Cloud Portal and attaching a permanent API key that’s binded with your serial number

 

End Users have a binding limit of 3 API keys.

 

Successful Response: { "apiKey": "", "serialNumber": "" }

Failed Response: { "timestamp": "", "status": 500, "error": "Internal Server Error", "message": "Record already exists", "path": "/signup" }

 
JSON
{
  "apiKeyGiv": "{{apiKeyGiv}}",
  "serialNumber": "{{serialNumber}}"
}
Response
{
    "apiKey""",
    "serialNumber"""
}

GET - "/signup"

 

Recollect your API key using your GivEnergy API key

 

Successful Response: [{ "apiKey": "", "serialNumber": "" }...]

 
Request Headers
Authorization : {{apiKeyGiv}}
 

DEL - "/signup"

 

Deletes your API key from the record

 
Request Headers
Authorization : {{apiKey}}
 

 
General Battery Information
 
When retrieving battery information, there are a number of negative values that display should there be an error
"-1" : Battery Timeout
"-2" : Inverter Offline
"-3" : Inverter binded does not exist 
 

GET - "/batteryData/all"

Returns all battery data including charge and discharge timers

 
Request Headers
Authorization : {{apiKey}}
Response
{
"batteryStatus""NORMAL",
"mode""7",
"batteryPercent""78",
"selfConsumptionMode""1",
"shallowCharge""4",
"dischargeFlag""1",
"dischargeScheduleStart""1600",
"dischargeScheduleEnd""2300",
"dischargeDownTo""4",
"chargeFlag""1",
"chargeScheduleStart""300",
"chargeScheduleEnd""500",
"chargeUpTo""70"
}

GET - "/batteryData"

Returns basic battery information

 
Request Headers
Authorization : {{apiKey}}
Response
{
"batteryStatus""NORMAL",
"mode""7",
"batteryPercent""78",
"selfConsumptionMode""1"
}

GET - "/chargeBattery"

Returns battery charge information

 
Request Headers
Authorization : {{apiKey}}
Response
{
"batteryStatus""NORMAL",
"mode""7",
"selfConsumptionMode""1",
"chargeFlag""1",
"shallowCharge""4",
"chargeScheduleStart""300",
"chargeScheduleEnd""500",
"chargeUpTo""70"
}

GET - "/dischargeBattery"

Return battery discharge information

 
Request Headers
Authorization : {{apiKey}}
Response
{
"batteryStatus""NORMAL",
"mode""7",
"selfConsumptionMode""1",
"dischargeFlag""1",
"shallowCharge""4",
"dischargeScheduleStart""1600",
"dischargeScheduleEnd""2300",
"dischargeDownTo""4"
}

GET - "/recalibrateBattery"

Returns the current state of the battery

0 = ready for calibration
Do not recalibrate if number is not 0

 
Request Headers
Authorization : {{apiKey}}

GET - "/mode"

Returns Mode setting

 
Request Headers
Authorization : {{apiKey}}
 

Response


 
Independent Register Readings
 

GET - "/registers/selfConsumption"

 

The property for whether battery charge is used to power your home demand. Battery will not discharge to home if set off

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/chargeFlag"

Property that flags the charge timers from grid

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/chargeStart"

Start of the charge timer

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/chargeEnd"

End of the charge timer

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/dischargeFlag"

Property that flags the discharge timers to grid. If self consumption is off, grid discharge is forced

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/dischargeStart"

Start of the discharge timer

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/dischargeEnd"

End of the discharge timer

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/shallowValue"

Property that sets the limit of when the battery will discharge should the battery percentage hit the shallow value

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/chargeUpTo"

Maximum percentage the battery will charge up to

 
Request Headers
Authorization : {{apiKey}}
 

GET - "/registers/dischargeDownTo"

Minimum percentage the battery will discharge down to

 
Request Headers
Authorization : {{apiKey}}
 

 
Battery Control
 

POST - "/registers/selfConsumption"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "1"
}

POST - "/registers/chargeFlag"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "1"
}

POST - "/registers/chargeStart"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "230"
}

POST - "/registers/chargeEnd"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "400"
}

POST - "/registers/dischargeFlag"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "1"
}

POST - "/registers/dischargeStart"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "1600"
}

POST - "/registers/dischargeEnd"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "2230"
}

POST - "/registers/shallowValue"

 
 
Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "4"
}

POST - "/registers/chargeUpTo"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "70"
}

POST - "/registers/dischargeDownTo"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "value": "4"
}

POST - "/chargeBattery"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "enable": true,
  "start": "0000",
  "finish": "0000",
  "chargeToPercent": "100"
}
Response
{
    "chargeFlag""1",
    "chargeScheduleStart""300",
    "chargeScheduleEnd""500",
    "chargeUpTo""70"
}

POST - "/dischargeBattery"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "enable": true,
  "start": "1600",
  "finish": "2300",
  "dischargeToPercent": "4"
}
Response
{
   "dischargeFlag""1",
    "dischargeScheduleStart""1600",
    "dischargeScheduleEnd""2300",
    "dischargeUpTo""4"
}

POST - "/recalibrateBattery"

Sets your battery for soc calibration

DO NOT CHANGE SETTINGS DURING CALIBRATION

 
Request Headers
Authorization : {{apiKey}}
 

POST - "/mode"

Request Headers
Authorization : {{apiKey}}
JSON
 
 
 
{
  "mode""1"
}
Posted by: Adam Reynolds - June 8, 2021. This article has been viewed 785 times.
Online URL: https://kb.givenergy.cloud/article.php?id=54

Powered by PHPKB (Knowledge Base Software)