{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/smart-me-com/json-schema/smart-me-com-pico-charging-data-schema.json",
  "title": "PicoChargingData",
  "description": "Container class for the pico charging station API",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/smart-me-com-openapi.json#/components/schemas/PicoChargingData",
  "type": "object",
  "properties": {
    "state": {
      "$ref": "#/$defs/ChargingStationState"
    },
    "activeChargingPower": {
      "type": "number",
      "description": "The power of the active charging (in kW)",
      "format": "double"
    },
    "activeChargingEnergy": {
      "type": "number",
      "description": "The energy used by this active charging (in kWh)",
      "format": "double"
    },
    "duration": {
      "type": "integer",
      "description": "The duration of this charging in seconds",
      "format": "int32"
    },
    "valueDate": {
      "type": "string",
      "description": "The date of this values",
      "format": "date-time"
    },
    "maxAllowedChargingCurrent": {
      "type": "integer",
      "description": "Max allowed charging current in A",
      "format": "int32"
    },
    "minStationCurrent": {
      "type": "integer",
      "description": "Min. current of the station in A",
      "format": "int32"
    },
    "maxStationCurrent": {
      "type": "integer",
      "description": "Max. current of the station in A",
      "format": "int32"
    },
    "maxLoadmanagementGroupCurrent": {
      "type": "integer",
      "description": "Max. current of the loadmanagement group of this station (if there is any) in A",
      "format": "int32"
    },
    "maxDynamicCurrent": {
      "type": "integer",
      "description": "Max. dynamic current (e.g. set over API or Modbus TCP) of this station or the loadmanagement group of the station if the station is in a group. in A",
      "format": "int32"
    },
    "currentL1": {
      "type": "number",
      "description": "The current on phase L1 in A",
      "format": "double"
    },
    "currentL2": {
      "type": "number",
      "description": "The current on phase L2 in A",
      "format": "double"
    },
    "currentL3": {
      "type": "number",
      "description": "The current on phase L3 in A",
      "format": "double"
    },
    "loadSheddingState": {
      "$ref": "#/$defs/LoadSheddingEnum"
    },
    "loadmanagementGroupName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the loadmanagement group. Or string.empty if the station is not in a group"
    },
    "connectionMode": {
      "$ref": "#/$defs/MeterNetworkToCloudConnectionMode"
    },
    "rssi": {
      "type": "integer",
      "description": "Received Signal Strength Indicator for the connection mode (wifi or mobile).\n-127 (min) to 0 (Max)",
      "format": "int32"
    },
    "lastWarningOrError": {
      "$ref": "#/$defs/MeterEventType"
    },
    "lastWarningOrErrorMessage": {
      "type": [
        "string",
        "null"
      ],
      "description": "The message of the last warning or error of the station."
    },
    "lastWarningOrErrorTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "The time when the LastWarningOrError happend",
      "format": "date-time"
    },
    "lastSeen": {
      "type": [
        "string",
        "null"
      ],
      "description": "The time when we last see the charging station",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ChargingStationState": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7
      ],
      "type": "integer",
      "description": "State of a (pico) charging station<p>Members: </p><ul><li><i>0</i> - Booting</li><li><i>1</i> - ReadyNoCarConnected</li><li><i>2</i> - ReadyCarConnected</li><li><i>3</i> - StartedWaitForCar</li><li><i>4</i> - Charging</li><li><i>5</i> - Installation</li><li><i>6</i> - Authorize</li><li><i>7</i> - Offline</li></ul>",
      "format": "int32"
    },
    "LoadSheddingEnum": {
      "enum": [
        0,
        1,
        2,
        3
      ],
      "type": "integer",
      "description": "Enumeration of the Load-Shedding state<p>Members: </p><ul><li><i>0</i> - MaxCurrent</li><li><i>1</i> - HalfCurrent</li><li><i>2</i> - MinCurrent</li><li><i>3</i> - NoCurrent</li></ul>",
      "format": "int32"
    },
    "MeterEventType": {
      "enum": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        17,
        18,
        19,
        20,
        21,
        22,
        23,
        24,
        25,
        26,
        27,
        28,
        29,
        30,
        31,
        32,
        33,
        257,
        65535
      ],
      "type": "integer",
      "description": "<p>Members: </p><ul><li><i>1</i> - This event is reserved for a meter value datalogger entry</li><li><i>2</i> - The meter has been restarted</li><li><i>3</i> - We have power down on all phases. The meter shuts down</li><li><i>4</i> - The power has been disconnected from phase 1 on the meter.</li><li><i>5</i> - The power has been disconnected from phase 2 on the meter.</li><li><i>6</i> - The power has been disconnected from phase 3 on the meter.</li><li><i>7</i> - The meter has detected a \"open cover\"</li><li><i>8</i> - The meter has detected a magnetic field. If this occurs, the meter must be visited due to a fraud mistake</li><li><i>9</i> - The RTC clock was adjusted.</li><li><i>10</i> - The voltage on all phases has exceeded the limit for overvoltage detection</li><li><i>11</i> - The voltage on all phases has exceeded the limit for undervoltage detection.</li><li><i>12</i> - The voltage on L1 has exceeded the limit for overvoltage detection</li><li><i>13</i> - The voltage on L2 has exceeded the limit for overvoltage detection</li><li><i>14</i> - The voltage on L3 has exceeded the limit for overvoltage detection</li><li><i>15</i> - A charging transaction from a pico charging station</li><li><i>16</i> - A panic message from the pico controller</li><li><i>17</i> - A panic message from the pico MID service</li><li><i>18</i> - Pico Warning: the RCD has triggered</li><li><i>19</i> - Pico Warning: the cable can not be locked</li><li><i>20</i> - Pico Warning: a diode failure</li><li><i>21</i> - Pico Warning: pico has detected a current overload</li><li><i>22</i> - Pico Warning: the internal temperature is too high</li><li><i>23</i> - A LogBook Entry when a parameter has changed (e.g. Impulse Values)</li><li><i>24</i> - A LogBook Entry when the device went down (with date/time) and comes up again (with date/time)</li><li><i>25</i> - A LogBook Entry when there was a general phase error. More Data in the error code field</li><li><i>26</i> - The general error was reset (everything is fine again)</li><li><i>27</i> - A fatal error (see details in the error code)</li><li><i>28</i> - The Magnet Field is fine again</li><li><i>29</i> - The tamper detection is fine again (cover is closed)</li><li><i>30</i> - The clock was adjusted with the old date/time and the new date/time</li><li><i>31</i> - The update of the MSP430 Firmware (with OldFirmware Version and NewFirmware Version)</li><li><i>32</i> - The update of the communication Module Firmware (with OldFirmware Version and NewFirmware Version)</li><li><i>33</i> - Event that the internal logbook of the meter is full</li><li><i>257</i> - Loadprofile (Datalogger values) with Active Energy import and export and the reactive energy. And the OCMF signature</li><li><i>65535</i> - InvalidValue</li></ul>",
      "format": "int32"
    },
    "MeterNetworkToCloudConnectionMode": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6
      ],
      "type": "integer",
      "description": "<p>Members: </p><ul><li><i>0</i> - NetworkToCloudConnectionMode_NoConnection</li><li><i>1</i> - NetworkToCloudConnectionMode_DirectWiFiConnection</li><li><i>2</i> - NetworkToCloudConnectionMode_GPRSConnection</li><li><i>3</i> - NetworkToCloudConnectionMode_NBIotConnection</li><li><i>4</i> - NetworkToCloudConnectionMode_LteCatM1Connection</li><li><i>5</i> - NetworkToCloudConnectionMode_MeshWiFiConnection</li><li><i>6</i> - NetworkToCloudConnectionMode_MeshMobileConnection</li></ul>",
      "format": "int32"
    }
  }
}