{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/smart-me-com/json-schema/smart-me-com-smart-me-device-configuration-container-schema.json",
  "title": "SmartMeDeviceConfigurationContainer",
  "description": "API Container class for the meter configuration",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/smart-me-com-openapi.json#/components/schemas/SmartMeDeviceConfigurationContainer",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the device",
      "format": "uuid"
    },
    "uploadInterval": {
      "$ref": "#/$defs/UploadInterval"
    },
    "switchConfiguration": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/SwitchConfigurationContainer"
      },
      "description": "The configuration for the phase switches"
    },
    "outputConfiguration": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/OutputConfigurationContainer"
      },
      "description": "The configuration for the external outputs"
    },
    "inputConfiguration": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/InputConfigurationContainer"
      },
      "description": "The configuration for the intput outputs"
    },
    "showReactiveEnergy": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Shows the reactive energy values (if the meter supports it). Enabling it needs a professional license."
    },
    "enableModbusTcp": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Enables or disables Modbus TCP (if the meter supports it). Enabling it needs a professional license."
    },
    "dnsUpdateState": {
      "$ref": "#/$defs/MeterDnsUpdateEnum"
    },
    "devicePinCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "PIN code to enter on a external meter (e.g. for the FNN meters)"
    },
    "deviceEncryptionKey": {
      "type": [
        "string",
        "null"
      ],
      "description": "The encryption key used to decrypt messages received from an external meter (used only for the smart-me modules)"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "DigitalInputType": {
      "enum": [
        0,
        1
      ],
      "type": "integer",
      "description": "<p>Members: </p><ul><li><i>0</i> - TariffInput</li><li><i>1</i> - DigitalInput</li></ul>",
      "format": "int32"
    },
    "DigitalOutputNoConnectionAction": {
      "enum": [
        0,
        1,
        2,
        3
      ],
      "type": "integer",
      "description": "Action types of a digital output when the device lost the connection.<p>Members: </p><ul><li><i>0</i> - Does nothing, keep the last state</li><li><i>1</i> - TurnOff</li><li><i>2</i> - TurnOn</li><li><i>3</i> - SetPwmValue</li></ul>",
      "format": "int32"
    },
    "DigitalOutputType": {
      "enum": [
        0,
        1,
        2,
        10,
        50,
        51,
        9999
      ],
      "type": "integer",
      "description": "<p>Members: </p><ul><li><i>0</i> - Normal impulse output (Active Energy Import and Export)</li><li><i>1</i> - ImpulseOutputActiveEnergyImport</li><li><i>2</i> - ImpulseOutputActiveEnergyExport</li><li><i>10</i> - ImpulseOutputReactiveEnergy</li><li><i>50</i> - DigitalOutput</li><li><i>51</i> - AnalogPwmSignalOutput</li><li><i>9999</i> - Disabled</li></ul>",
      "format": "int32"
    },
    "InputConfigurationContainer": {
      "type": "object",
      "properties": {
        "number": {
          "type": "integer",
          "description": "The number of the Input. (1 for Input 1)",
          "format": "int32"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Name of the Input"
        },
        "type": {
          "$ref": "#/$defs/DigitalInputType"
        },
        "onText": {
          "type": [
            "string",
            "null"
          ],
          "description": "The visualization text for an ON action"
        },
        "offText": {
          "type": [
            "string",
            "null"
          ],
          "description": "The visualization text for an OFF action"
        }
      },
      "additionalProperties": false,
      "description": "Configuration for the input of a meter (digital inputs)"
    },
    "MeterDnsUpdateEnum": {
      "enum": [
        0,
        1,
        2
      ],
      "type": "integer",
      "description": "Enumeration for the DNS Update of a device ip<p>Members: </p><ul><li><i>0</i> - No DNS Update</li><li><i>1</i> - Do an DNS Update of the public ip address</li><li><i>2</i> - Do an DNS Update of the internal ip address</li></ul>",
      "format": "int32"
    },
    "OutputConfigurationContainer": {
      "type": "object",
      "properties": {
        "number": {
          "type": "integer",
          "description": "The number of the Output. (1 for Output 1, 2 for Output 2)",
          "format": "int32"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Name of the Output"
        },
        "type": {
          "$ref": "#/$defs/DigitalOutputType"
        },
        "digitalOutputNoConnectionAction": {
          "$ref": "#/$defs/DigitalOutputNoConnectionAction"
        },
        "s0PulseValue": {
          "$ref": "#/$defs/S0PulseValueType"
        }
      },
      "additionalProperties": false,
      "description": "Configuration for the outputs of a meter (analog/digital outputs)"
    },
    "S0PulseValueType": {
      "enum": [
        0,
        1
      ],
      "type": "integer",
      "description": "S0 Pulse values for the smart-me Meters<p>Members: </p><ul><li><i>0</i> - 1'000 pulses / kWh</li><li><i>1</i> - 10'000 pulses / kWh</li></ul>",
      "format": "int32"
    },
    "SwitchConfigurationContainer": {
      "type": "object",
      "properties": {
        "number": {
          "type": "integer",
          "description": "The number of the phase. (e.g. 1 for Phase L1)",
          "format": "int32"
        },
        "canSwitchOff": {
          "type": "boolean",
          "description": "Flag if the switch can be turned off or is always on."
        }
      },
      "additionalProperties": false,
      "description": "The configuration for a phase switch"
    },
    "UploadInterval": {
      "enum": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12
      ],
      "type": "integer",
      "description": "<p>Members: </p><ul><li><i>1</i> - UploadInterval_1s</li><li><i>2</i> - UploadInterval_5s</li><li><i>3</i> - UploadInterval_10s</li><li><i>4</i> - UploadInterval_30s</li><li><i>5</i> - UploadInterval_60s</li><li><i>6</i> - UploadInterval_5min</li><li><i>7</i> - UploadInterval_15min</li><li><i>8</i> - UploadInterval_30min</li><li><i>9</i> - UploadInterval_60min</li><li><i>10</i> - UploadInterval_6h</li><li><i>11</i> - UploadInterval_12h</li><li><i>12</i> - UploadInterval_24h</li></ul>",
      "format": "int32"
    }
  }
}