Skip to main content

/v1/limits GET

The /limits endpoint provides control functionality for the limits of the SECC.You can set the limits through the SET endpoint, and use a GET to get the current values set through the API.

The limits are only active if the enabled value is set to true. If you set the limits for amperageLimit and powerLimit, the lower effective value will be used.

Values

  • amperageLimit - float - Get or Set the maximum current the SECC will allow the vehicle to draw in amps.

    • The SECC always sets the limit to the minimum of all currently valid limits. This could lead to a situation where the limit set by the API is ignored because it is higher than the limit set by another part of the system.
    • A limit below 6A will be ignored and the SECC will set the limit to 0A.
    • A limit above the effectiveAmperageLimit will be ignored and the SECC will set the limit to the effectiveAmperageLimit.
  • powerLimit - int - Get or set the maximum power the SECC will allow the vehicle to draw in watts.

    • The power limit is effectively calculated back to the amperage limit and behaves the same as described above.
      (powerLimit ÷ voltage ÷ usedPhases = amperageLimit)
  • timeout - int - Get or set the time in milliseconds how long the data, set by the API, will be valid.

    • The default timeout for values set by the API is 300,000 milliseconds (5 minutes).

Example Output

http://127.0.0.1/api/v1/limits
{
"amperageLimit":NaN,
"powerLimit":NaN,
"timeout": 300000
}

/v1/limits PUT

The SET endpoint for the limits looks different depending on the protocol used, the REST endpoint allows you to set all values at once, while the WebSocket endpoint only allows you to set one value at a time. If you want to give up control over a value, set it to NaN.

Set the request body to the desired values. If you want to change only one value, you can leave the others out.

http://127.0.0.1/api/v1/limits
{
"setAmperageLimit": NaN,
"sePowerLimit": NaN,
"setTimeout": 300000,
"setOnePhaseLimit": true,
"setPhaseRotation": true
}