Sensor measurements

In order to limit the available power for charging sessions, Stekker needs to know the current power consumption. This can be useful when you want to constrain your power usage in order to prevent breaching a contract limit. This is done by sending sensor measurements to the Stekker API. The sensor measurements are used to calculate the available power for charging sessions.

POST/api/v1/events

Event: SensorMeasurements

The sensorId field is expected to be unique and can be any non-empty string (for example a UUID v4).

Please note that currently we only support the following values for the name field:

  • total_active_power
  • active_current_l1
  • active_current_l2
  • active_current_l3
  • active_voltage_l1
  • active_voltage_l2
  • active_voltage_l3
  • active_power_l1
  • active_power_l2
  • active_power_l3

And we only support the following units for the unit field:

  • kW
  • A
  • V

The timestamp field should be in ISO 8601 compatible format, including the timezone and optional nanoseconds.

Request

curl --location --request POST 'https://api.stekker.app/api/v1/events' \
--header 'Authorization: Token provided-secret' \
--header 'Content-Type: application/json' \
--data-raw '{
  "event": "MeasurementValues",
  "sensorId": "49da624a-1df8-405f-8a3f-9379d8c63d17",
  "values": [
    {
      "name": "total_active_power",
      "value": 102.3155,
      "unit": "kW",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_current_l1",
      "value": 139.97,
      "unit": "A",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_current_l2",
      "value": 146.6,
      "unit": "A",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_current_l3",
      "value": 161.64,
      "unit": "A",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_voltage_l1",
      "value": 237.25,
      "unit": "V",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_voltage_l2",
      "value": 237.85,
      "unit": "V",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_voltage_l3",
      "value": 236.56,
      "unit": "V",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_power_l1",
      "value": 32.09791,
      "unit": "kW",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_power_l2",
      "value": 34.10683,
      "unit": "kW",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    },
    {
      "name": "active_power_l3",
      "value": 36.11077,
      "unit": "kW",
      "timestamp": "2024-07-08T14:52:15.0000000Z"
    }
  ]
}'