Skip to content

Forwarding to a MySQL database

We forward messages to a MySQL database by insering rows into the table(s) we have been granted the INSERT and SELECT rights to.

Below the schemas for the following messages can be found:

Solar power

The schema for messages forwarded from a Teleport device that is connected to a solar inverter:

CREATE TABLE `teleport_solar_power` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`attempt` int unsigned NOT NULL, -- 0-indexed delivery attempt
`active_power` int DEFAULT NULL, -- in W
`generated_energy` bigint DEFAULT NULL, -- in Wh
`active_power_limit_percentage` decimal(4,1) DEFAULT NULL,
`measured_at` datetime NOT NULL, -- when read-out started, in UTC
`created_at` datetime NOT NULL, -- when row was written, in UTC
PRIMARY KEY (`id`),
KEY `teleport` (`teleport_hash_id`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`,`asset_identifier`,`measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":3}';

Wind power

The schema for messages forwarded from a Teleport device that is connected to a wind energy converter:

CREATE TABLE `teleport_wind_power` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`attempt` int unsigned NOT NULL, -- 0-indexed delivery attempt
`active_power` int DEFAULT NULL, -- in W
`wind_speed` decimal(8,3) DEFAULT NULL, -- in m/s
`available_active_power` int DEFAULT NULL, -- in W
`constrained_available_active_power_current_wind` int DEFAULT NULL, -- in W
`constrained_available_active_power_technical` int DEFAULT NULL, -- in W
`constrained_available_active_power_force_majeure` int DEFAULT NULL, -- in W
`constrained_available_active_power_external_setpoints` int DEFAULT NULL, -- in W
`active_power_limit_percentage` decimal(4,1) DEFAULT NULL,
`measured_at` datetime NOT NULL, -- when read-out started, in UTC
`created_at` datetime NOT NULL, -- when row was written, in UTC
PRIMARY KEY (`id`),
KEY `teleport` (`teleport_hash_id`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`, `asset_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":3}';
CREATE TABLE `teleport_wind_power_converters` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`converter_identifier` varchar(128) NOT NULL, -- serial number of the converter
`attempt` int unsigned NOT NULL, -- 0-indexed delivery attempt
`active_power` int DEFAULT NULL, -- in W
`wind_speed` decimal(8,3) DEFAULT NULL, -- in m/s
`measured_at` datetime NOT NULL, -- when read-out started, in UTC
`created_at` datetime NOT NULL, -- when row was written, in UTC
PRIMARY KEY (`id`),
KEY `converter` (`converter_identifier`, `created_at`),
KEY `teleport` (`teleport_hash_id`, `asset_identifier`, `created_at`),
UNIQUE KEY `teleport_asset_converter` (`teleport_hash_id`, `asset_identifier`, `converter_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":3}';

Battery power

Batteries produce two types of messages: regular messages and flash messages. Batteries report flash messages more often than regular messages (typically every second) and contain information that is needed for dispatching algorithms and to forward to the TSO when doing aFRR/FCR. For the strings that can occur in the errors and warnings properties, see Battery power error and warning codes.

CREATE TABLE `teleport_battery_power` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`attempt` int NOT NULL,
`battery_status` varchar(32) DEFAULT NULL, -- can be "on", "off", "other" or null (see warning and errors in case of 'other')
`energy_charged` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`energy_discharged` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`frequency` decimal(7,2) DEFAULT NULL, -- in Hz, nonnegative
`active_power` decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging
`reactive_power` decimal(23,3) DEFAULT NULL, -- in var, positive is injecting reactive power to the grid and negative is absorbing reactive power
`state_of_charge` decimal(7,4) DEFAULT NULL, -- in %, nonnegative
`state_of_health` decimal(7,4) DEFAULT NULL, -- in %, nonnegative
`available_energy` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`rated_energy` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`available_active_power_charge` decimal(23,3) DEFAULT NULL, -- in W, nonnegative
`available_active_power_discharge` decimal(23,3) DEFAULT NULL, -- in W, nonnegative
`available_reactive_power_inject` decimal(23,3) DEFAULT NULL, -- in var, nonnegative
`available_reactive_power_absorb` decimal(23,3) DEFAULT NULL, -- in var, nonnegative
`active_power_setpoint_dispatch_power` decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging
`active_power_setpoint_deliver_fcr` decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging
`active_power_setpoint_charge_to_state` decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging
`active_power_setpoint_aggregate` decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging
`three_phase_connection_type_high_voltage` varchar(32) DEFAULT NULL, -- can be "wye" or "delta"
`ac_voltage_medium_voltage_phase_l1` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_medium_voltage_phase_l2` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_medium_voltage_phase_l3` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_medium_voltage_line_l1` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_medium_voltage_line_l2` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_medium_voltage_line_l3` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_current_medium_voltage_phase_l1` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_medium_voltage_phase_l2` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_medium_voltage_phase_l3` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_medium_voltage_line_l1` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_medium_voltage_line_l2` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_medium_voltage_line_l3` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`auxiliary_power_active` decimal(23,3) DEFAULT NULL, -- in W, can be null. Negative means consuming, positive generating, will be negative or 0
`auxiliary_power_reactive` decimal(23,3) DEFAULT NULL, -- in Var, can be null. Negative means consuming, positive generating, will be negative or 0
`configuration_dispatch_power_active_power` decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging
`configuration_deliver_fcr_max_rate` decimal(23,3) DEFAULT NULL, -- in W, nonnegative
`configuration_charge_to_state_percentage` decimal(7,4) DEFAULT NULL, -- in %, nonnegative
`warnings` JSON DEFAULT NULL, -- if not null, will contain a JSON aray of string elements. see error codes section
`errors` JSON DEFAULT NULL, -- if not null, will contain a JSON array of string elements. see error codes section
`schedule_complete_until` datetime DEFAULT NULL, -- first gap in the schedule for this asset_identifier
`scheduled` tinyint(1) NOT NULL, -- false for measurements that are not part of the regular reporting interval, eg. directly after command execution and at Teleport initialisation
`measured_at` datetime NOT NULL, -- when read-out started
`created_at` datetime NOT NULL, -- when written to the table
PRIMARY KEY (`id`),
KEY `teleport` (`teleport_hash_id`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`, `asset_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":3}';
CREATE TABLE `teleport_battery_power_bess` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`bess_identifier` varchar(128) NOT NULL,
`attempt` int NOT NULL,
`cell_temperature_min` decimal(6,2) DEFAULT NULL, -- in ºC, min value of all cells
`cell_temperature_max` decimal(6,2) DEFAULT NULL, -- in ºC, max value of all cells
`room_temperature` decimal(6,2) DEFAULT NULL, -- in ºC, max value of all cells
`state_of_charge` decimal(7,4) DEFAULT NULL, -- in %, nonnegative
`available_energy` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`available_active_power_charge` decimal(23,3) DEFAULT NULL, -- in W, nonnegative
`available_active_power_discharge` decimal(23,3) DEFAULT NULL, -- in W, nonnegative
`three_phase_connection_type_low_voltage` varchar(32) DEFAULT NULL, -- can be "wye" or "delta"
`ac_voltage_low_voltage_phase_l1` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_low_voltage_phase_l2` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_low_voltage_phase_l3` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_low_voltage_line_l1` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_low_voltage_line_l2` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_voltage_low_voltage_line_l3` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`ac_current_low_voltage_phase_l1` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_low_voltage_phase_l2` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_low_voltage_phase_l3` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_low_voltage_line_l1` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_low_voltage_line_l2` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`ac_current_low_voltage_line_l3` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`warnings` JSON DEFAULT NULL, -- if not null, will contain a JSON aray of string elements. see error codes section
`errors` JSON DEFAULT NULL, -- if not null, will contain a JSON array of string elements. see error codes section
`scheduled` tinyint(1) NOT NULL, -- false for measurements that are not part of the regular reporting interval, eg. directly after command execution and at Teleport initialisation
`measured_at` datetime NOT NULL, -- when read-out started
`created_at` datetime NOT NULL, -- when written to the table
PRIMARY KEY (`id`),
KEY `bess` (`bess_identifier`,`created_at`),
KEY `teleport` (`teleport_hash_id`,`asset_identifier`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`, `asset_identifier`, `bess_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":3}';
CREATE TABLE `teleport_battery_power_bess_rack` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`bess_identifier` varchar(128) NOT NULL,
`rack_identifier` varchar(128) NOT NULL,
`attempt` int NOT NULL,
`dc_voltage` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`dc_current` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`scheduled` tinyint(1) NOT NULL, -- false for measurements that are not part of the regular reporting interval, eg. directly after command execution and at Teleport initialisation
`measured_at` datetime NOT NULL, -- when read-out started
`created_at` datetime NOT NULL, -- when written to the table
PRIMARY KEY (`id`),
KEY `bess` (`bess_identifier`,`created_at`),
KEY `bess_rack` (`rack_identifier`,`created_at`),
KEY `teleport` (`teleport_hash_id`,`asset_identifier`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`, `asset_identifier`, `bess_identifier`, `rack_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":3}';
CREATE TABLE `teleport_battery_power_flash` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`attempt` int NOT NULL,
`frequency` decimal(7,2) DEFAULT NULL, -- in Hz, nonnegative
`active_power` decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging
`state_of_charge` decimal(7,4) DEFAULT NULL, -- in %, nonnegative
`available_energy` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`available_active_power_charge` decimal(23,3) DEFAULT NULL, -- in W, nonnegative
`available_active_power_discharge` decimal(23,3) DEFAULT NULL, -- in W, nonnegative
`scheduled` tinyint(1) NOT NULL, -- false for measurements that are not part of the regular reporting interval, eg. directly after command execution and at Teleport initialisation
`measured_at` datetime NOT NULL, -- when read-out started
`created_at` datetime NOT NULL, -- when written to the table
PRIMARY KEY (`id`),
KEY `teleport` (`teleport_hash_id`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`, `asset_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":1}';

Thermal power

The schema for messages forwarded from a Teleport device that is connected to a thermal energy store:

CREATE TABLE `teleport_thermal_power` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`attempt` int unsigned NOT NULL, -- 0-indexed delivery attempt
`asset_clock_at` datetime DEFAULT NULL, -- time as reported by the asset, in UTC. Slight delay compared to measured_at could be explained by communication time with the asset
`configuration_furnace_temperature_min` decimal(6,2) DEFAULT NULL, -- in ºC
`configuration_furnace_temperature_max` decimal(6,2) DEFAULT NULL, -- in ºC
`uptime_plc` int DEFAULT NULL, -- in minutes
`uptime_system` int DEFAULT NULL, -- in minutes
`uptime_furnaces` int DEFAULT NULL, -- in minutes
`uptime_fan` int DEFAULT NULL, -- in minutes
`warnings`JSON DEFAULT NULL, -- if not null, will contain a JSON aray of string elements. see error codes section
`measured_at` datetime NOT NULL, -- when read-out started, in UTC
`created_at` datetime NOT NULL, -- when row was written, in UTC
PRIMARY KEY (`id`),
KEY `teleport` (`teleport_hash_id`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`, `asset_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":1}';
CREATE TABLE `teleport_thermal_power_furnaces` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`furnace_identifier` varchar(128) NOT NULL, -- serial number of the converter
`attempt` int unsigned NOT NULL, -- 0-indexed delivery attempt
`temperature` decimal(6,2) DEFAULT NULL, -- in ºC
`measured_at` datetime NOT NULL, -- when read-out started, in UTC
`created_at` datetime NOT NULL, -- when row was written, in UTC
PRIMARY KEY (`id`),
KEY `furnace` (`furnace_identifier`, `created_at`),
KEY `teleport` (`teleport_hash_id`, `asset_identifier`, `created_at`),
UNIQUE KEY `teleport_asset_furnace` (`teleport_hash_id`, `asset_identifier`, `furnace_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":1}';

Meter power

The schema for messages forwarded from a Teleport device that is connected to a meter:

CREATE TABLE `teleport_meter_power` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`teleport_hash_id` varchar(32) NOT NULL, -- uniquely identifies the teleport device
`asset_identifier` varchar(128) NOT NULL, -- globally unique identifier of the asset, when available the brand and serial number of the asset
`attempt` int NOT NULL, -- 0-indexed delivery attempt
`phase_voltage_l1` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`phase_voltage_l2` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`phase_voltage_l3` decimal(23,3) DEFAULT NULL, -- in V, nonnegative
`current_l1` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`current_l2` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`current_l3` decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value
`active_power_l1` decimal(23,3) DEFAULT NULL, -- in W, delivering to the grid is a positive value
`active_power_l2` decimal(23,3) DEFAULT NULL, -- in W, delivering to the grid is a positive value
`active_power_l3` decimal(23,3) DEFAULT NULL, -- in W, delivering to the grid is a positive value
`active_power_sum` decimal(23,3) DEFAULT NULL, -- in W, delivering to the grid is a positive value
`reactive_power_l1` decimal(23,3) DEFAULT NULL, -- in var, positive is injecting reactive power to the grid and negative is absorbing reactive power
`reactive_power_l2` decimal(23,3) DEFAULT NULL, -- in var, positive is injecting reactive power to the grid and negative is absorbing reactive power
`reactive_power_l3` decimal(23,3) DEFAULT NULL, -- in var, positive is injecting reactive power to the grid and negative is absorbing reactive power
`reactive_power_sum` decimal(23,3) DEFAULT NULL, -- in var, positive is injecting reactive power to the grid and negative is absorbing reactive power
`frequency` decimal(7,2) DEFAULT NULL, -- in Hz, nonnegative
`active_energy_consumed_l1` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`active_energy_consumed_l2` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`active_energy_consumed_l3` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`active_energy_consumed_sum` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`active_energy_delivered_l1` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`active_energy_delivered_l2` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`active_energy_delivered_l3` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`active_energy_delivered_sum` decimal(23,3) DEFAULT NULL, -- in Wh, nonnegative
`errors` JSON DEFAULT NULL, -- if not null, will contain a JSON array of string elements. see error codes section
`scheduled` tinyint(1) NOT NULL, -- false for measurements that are not part of the regular reporting interval, eg. directly after command execution and at Teleport initialisation
`measured_at` datetime NOT NULL, -- when read-out started, in UTC
`created_at` datetime NOT NULL, -- when row was written, in UTC
PRIMARY KEY (`id`),
KEY `teleport` (`teleport_hash_id`,`created_at`),
UNIQUE KEY `teleport_asset` (`teleport_hash_id`, `asset_identifier`, `measured_at`)
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='{"version":1}';