Forwarding to an MSSQL database
We forward messages to an MSSQL database by inserting rows into the table(s) we have been granted access to.
Below the schemas for the following messages can be found:
Solar power
Solar assets produce two types of messages: regular messages and environmental sensor messages.
Regular messages
The schema for messages forwarded from a Teleport device that is connected to a solar inverter:
- The
active_power_limit_percentage
field is deprecated and replaced bysetpoints_confirmed_active_power_limit_percentage
.
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_solar_power' and xtype='U') CREATE TABLE "teleport_solar_power"( "id" int not null identity(1,1), "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 "active_power" int DEFAULT NULL, -- in W "reactive_power" decimal(23,3) DEFAULT NULL, -- in var "power_factor" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrant 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1), the PF sign is negative. "generated_energy" bigint DEFAULT NULL, -- in Wh "setpoints_confirmed_active_power_limit_percentage" decimal(4, 1) DEFAULT NULL, -- in % "setpoints_confirmed_active_power_limit" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_confirmed_reactive_power_reactive_power" decimal(23, 3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_confirmed_reactive_power_power_factor" decimal(5, 4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_confirmed_reactive_power_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_desired_active_power_limit_cloud" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_active_control" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_grid_operator" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_modbus_server" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_afrr_delta" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_afrr_reference" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_reactive_power_cloud_reactive_power" decimal(23, 3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_desired_reactive_power_cloud_power_factor" decimal(5, 4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_desired_reactive_power_cloud_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_desired_reactive_power_grid_operator_reactive_power" decimal(23, 3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_desired_reactive_power_grid_operator_power_factor" decimal(5, 4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_desired_reactive_power_grid_operator_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_effective_active_power_limit" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_effective_reactive_power_reactive_power" decimal(23, 3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_effective_reactive_power_power_factor" decimal(5, 4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_effective_reactive_power_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "alarms" nvarchar(4000) DEFAULT NULL, -- See solar alarms under error codes section. Empty if inverter-specific alarms are present in inverter array. If not null, will contain a JSON aray of string elements. "scheduled" bit 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, -- in UTC "created_at" datetime NOT NULL, -- in UTC PRIMARY KEY ("id"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_solar_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=3, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_solar_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=3, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_solar_power';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_solar_power_inverters' and xtype='U') CREATE TABLE "teleport_solar_power_inverters"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "slave_id" int NOT NULL, "attempt" int NOT NULL, "active_power" int DEFAULT NULL, -- in W "reactive_power" decimal(23,3) DEFAULT NULL, -- in var "power_factor" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrant 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1), the PF sign is negative. "generated_energy" bigint DEFAULT NULL, -- in Wh "setpoints_confirmed_active_power_limit_percentage" decimal(4, 1) DEFAULT NULL, -- in % "setpoints_confirmed_active_power_limit" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_confirmed_reactive_power_reactive_power" decimal(23, 3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_confirmed_reactive_power_power_factor" decimal(5, 4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_confirmed_reactive_power_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "alarms" nvarchar(4000) DEFAULT NULL, -- See solar alarms under error codes section. If not null, will contain a JSON aray of string elements. "scheduled" bit 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"), INDEX "inverters" ("slave_id","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "slave_id", "measured_at") WITH (IGNORE_DUP_KEY = ON));
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_solar_power' and xtype='U') CREATE TABLE "teleport_solar_power"( "id" int not null identity(1,1), "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 "active_power" int DEFAULT NULL, -- in W "generated_energy" bigint DEFAULT NULL, -- in Wh "active_power_limit_percentage" decimal(4,1) DEFAULT NULL, "alarms" nvarchar(4000) DEFAULT NULL, -- See solar alarms under error codes section. Empty if inverter-specific alarms are present in inverter array. If not null, will contain a JSON aray of string elements. "scheduled" bit 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, -- in UTC "created_at" datetime NOT NULL, -- in UTC PRIMARY KEY ("id"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_solar_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=2, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_solar_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=2, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_solar_power';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_solar_power_inverters' and xtype='U') CREATE TABLE "teleport_solar_power_inverters"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "slave_id" int NOT NULL, "attempt" int NOT NULL, "active_power" int DEFAULT NULL, -- in W "generated_energy" bigint DEFAULT NULL, -- in Wh "active_power_limit_percentage" decimal(4,1) DEFAULT NULL, "alarms" nvarchar(4000) DEFAULT NULL, -- See solar alarms under error codes section. If not null, will contain a JSON aray of string elements. "scheduled" bit 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"), INDEX "inverters" ("slave_id","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "slave_id", "measured_at") WITH (IGNORE_DUP_KEY = ON));
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_solar_power' and xtype='U') CREATE TABLE "teleport_solar_power"( "id" int not null identity(1,1), "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 "active_power" int DEFAULT NULL, -- in W "generated_energy" bigint DEFAULT NULL, -- in Wh "active_power_limit_percentage" decimal(4,1) DEFAULT NULL, "scheduled" bit 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, -- in UTC "created_at" datetime NOT NULL, -- in UTC PRIMARY KEY ("id"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_solar_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_solar_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_solar_power';
Environmental sensor messages
The schema for messages forwarded from a Teleport device that is connected to a solar inverter with an envrionmental sensor:
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_environmental_sensors' and xtype='U') CREATE TABLE "teleport_environmental_sensors"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "sensor_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, "irradiance" decimal(23, 3) DEFAULT NULL, -- in W/m² "irradiance_factor" decimal(23, 3) DEFAULT NULL, -- a static property defined as product of area and efficiency, used to calculate availableActivePower (area is the total surface area of the solar panels in square meters, efficiency is the efficiency of the solar panels + inverters) "wind_speed" decimal(8, 3) DEFAULT NULL, -- in m/s "scheduled" bit NOT NULL, "measured_at" datetime NOT NULL, "created_at" datetime NOT NULL, PRIMARY KEY ("id"), INDEX "sensor" ("sensor_identifier", "created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "sensor_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_environmental_sensors') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_environmental_sensors'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_environmental_sensors';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_environmental_sensors_temperature' and xtype='U') CREATE TABLE "teleport_environmental_sensors_temperature"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "sensor_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, "name" varchar(128) NOT NULL, -- representing temperature measurement "temperature" decimal(6,2) DEFAULT NULL, -- in °C "scheduled" bit NOT NULL, "measured_at" datetime NOT NULL, "created_at" datetime NOT NULL, PRIMARY KEY ("id"), INDEX "sensor_temperature" ("name","created_at"), INDEX "sensor" ("sensor_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "sensor_identifier", "name", "measured_at") WITH (IGNORE_DUP_KEY = ON));
Wind power
The schema for messages forwarded from a Teleport device that is connected to a wind energy converter:
- The
active_power_limit_percentage
field is deprecated and replaced bysetpoints_confirmed_active_power_limit_percentage
.
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_wind_power' and xtype='U') CREATE TABLE "teleport_wind_power"( "id" int not null identity(1,1), "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 "active_power" decimal(23,3), -- in W "reactive_power" decimal(23,3), -- in var "power_factor" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrant 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1), the PF sign is negative. "wind_speed" decimal(8,3), -- in m/s "available_active_power" decimal(23,3), -- in W "constrained_available_active_power_current_wind" decimal(23,3), -- in W "constrained_available_active_power_technical" decimal(23,3), -- in W "constrained_available_active_power_force_majeure" decimal(23,3), -- in W "constrained_available_active_power_external_setpoints" decimal(23,3), -- in W "setpoints_confirmed_active_power_limit_percentage" decimal(4, 1) DEFAULT NULL, -- in % "setpoints_confirmed_active_power_limit" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_confirmed_reactive_power_reactive_power" decimal(23, 3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_confirmed_reactive_power_power_factor" decimal(5, 4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. For capacitive loads (leading power factor, quadrant 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1), the PF sign is negative. "setpoints_confirmed_reactive_power_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_desired_active_power_limit_cloud" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_active_control" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_grid_operator" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_modbus_server" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_desired_active_power_limit_afrr_delta" decimal(23, 3) DEFAULT NULL, -- in W, contains `deltaSetpoint` provided through the "applyAfrrDeltaSetpoint" API command "setpoints_desired_active_power_limit_afrr_reference" decimal(23, 3) DEFAULT NULL, -- in W, eference value for on which Teleport will apply the delta on, is the minimum of "availableActivePower" and all other active setpoints "setpoints_desired_reactive_power_cloud_reactive_power" decimal(23, 3) DEFAULT NULL, -- in var "setpoints_desired_reactive_power_cloud_power_factor" decimal(5, 4) DEFAULT NULL, -- unitless "setpoints_desired_reactive_power_cloud_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_desired_reactive_power_grid_operator_reactive_power" decimal(23, 3) DEFAULT NULL, -- in var "setpoints_desired_reactive_power_grid_operator_power_factor" decimal(5, 4) DEFAULT NULL, -- unitless "setpoints_desired_reactive_power_grid_operator_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_effective_active_power_limit" decimal(23, 3) DEFAULT NULL, -- in W "setpoints_effective_reactive_power_reactive_power" decimal(23, 3) DEFAULT NULL, -- in var "setpoints_effective_reactive_power_power_factor" decimal(5, 4) DEFAULT NULL, -- unitless "setpoints_effective_reactive_power_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "generated_energy" decimal(23,3), -- in Wh "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"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_wind_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=4, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_wind_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=4, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_wind_power';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_wind_power_converters' and xtype='U') CREATE TABLE "teleport_wind_power_converters"( "id" int not null identity(1,1), "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 NOT NULL, -- 0-indexed delivery attempt "active_power" decimal(23,3), -- in W "reactive_power" decimal(23,3), -- in var "power_factor" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrant 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1), the PF sign is negative. "wind_speed" decimal(8,3), -- in m/s "generated_energy" decimal(23,3), -- in Wh, "status" varchar(32), -- can be "running", "on", "pause", "stop" "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"), INDEX "converter" ("converter_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset_converter" UNIQUE ("teleport_hash_id", "asset_identifier", "converter_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_wind_power' and xtype='U') CREATE TABLE "teleport_wind_power"( "id" int not null identity(1,1), "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 "active_power" decimal(23,3), -- in W "wind_speed" decimal(8,3), -- in m/s "available_active_power" decimal(23,3), -- in W "constrained_available_active_power_current_wind" decimal(23,3), -- in W "constrained_available_active_power_technical" decimal(23,3), -- in W "constrained_available_active_power_force_majeure" decimal(23,3), -- in W "constrained_available_active_power_external_setpoints" decimal(23,3), -- in W "active_power_limit_percentage" decimal(4,1), "generated_energy" decimal(23,3), -- in Wh "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"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_wind_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=3, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_wind_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=3, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_wind_power';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_wind_power_converters' and xtype='U') CREATE TABLE "teleport_wind_power_converters"( "id" int not null identity(1,1), "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 NOT NULL, -- 0-indexed delivery attempt "active_power" decimal(23,3), -- in W "wind_speed" decimal(8,3), -- in m/s "generated_energy" decimal(23,3), -- in Wh, "status" varchar(32), -- can be "running", "on", "pause", "stop" "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"), INDEX "converter" ("converter_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset_converter" UNIQUE ("teleport_hash_id", "asset_identifier", "converter_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_wind_power' and xtype='U') CREATE TABLE "teleport_wind_power"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "attempt" int NOT NULL, "active_power" int DEFAULT NULL, "wind_speed" decimal(8,3) DEFAULT NULL, "available_active_power" int DEFAULT NULL, "constrained_available_active_power_current_wind" int DEFAULT NULL, "constrained_available_active_power_technical" int DEFAULT NULL, "constrained_available_active_power_force_majeure" int DEFAULT NULL, "constrained_available_active_power_external_setpoints" int DEFAULT NULL, "active_power_limit_percentage" decimal(4,1) DEFAULT NULL, "measured_at" datetime NOT NULL, "created_at" datetime NOT NULL, PRIMARY KEY ("id"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_wind_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=2, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_wind_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=2, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_wind_power';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_wind_power_converters' and xtype='U') CREATE TABLE "teleport_wind_power_converters"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "converter_identifier" varchar(128) NOT NULL, "attempt" int NOT NULL, "active_power" int DEFAULT NULL, "wind_speed" decimal(8,3) DEFAULT NULL, "measured_at" datetime NOT NULL, "created_at" datetime NOT NULL, PRIMARY KEY ("id"), INDEX "converter" ("converter_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset_converter" UNIQUE ("teleport_hash_id", "asset_identifier", "converter_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
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.
Regular messages in full
An example of a request containing one message forwarded from a Teleport device that is connected to a battery:
- The
configuration
object is deprecated and replaced bysetpoints
. - Mappings are applied as follows:
configuration_dispatch_power_active_power
=setpoints_confirmed_active_power
.configuration_deliver_fcr_max_rate
=setpoints_confirmed_deliver_fcr
.configuration_charge_to_state_percentage
=setpoints_confirmed_charge_to_percentage
.
- Following properties are renamed and new columns are created
active_power_setpoint_dispatch_power
toactive_power_setpoint_active_power
active_power_setpoint_charge_to_state
toactive_power_setpoint_charge_to_percentage
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_battery_power' and xtype='U') CREATE TABLE "teleport_battery_power"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "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 "power_factor" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrants 2 and 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1 and 3), the PF sign is negative. "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_active_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_percentage" 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 "setpoints_confirmed_active_power" decimal(23,3) DEFAULT NULL, -- in W, positive means discharging, negative charging. "setpoints_confirmed_reactive_power_reactive_power" decimal(23,3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_confirmed_reactive_power_power_factor" decimal(5,4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_confirmed_reactive_power_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_confirmed_deliver_fcr" decimal(23,3) DEFAULT NULL, -- in W, nonnegative "setpoints_confirmed_charge_to_percentage" decimal(7,4) DEFAULT NULL, -- in %, nonnegative "setpoints_desired_active_power_cloud" decimal(23,3) DEFAULT NULL, -- in W "setpoints_desired_active_power_active_control" decimal(23,3) DEFAULT NULL, -- in W "setpoints_desired_active_power_grid_operator" decimal(23,3) DEFAULT NULL, -- in W "setpoints_desired_active_power_modbus_server" decimal(23,3) DEFAULT NULL, -- in W "setpoints_desired_reactive_power_cloud_reactive_power" decimal(23,3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_desired_reactive_power_cloud_power_factor" decimal(5,4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_desired_reactive_power_cloud_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_desired_reactive_power_grid_operator_reactive_power" decimal(23,3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_desired_reactive_power_grid_operator_power_factor" decimal(5,4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_desired_reactive_power_grid_operator_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "setpoints_desired_charge_to_percentage_cloud" decimal(7,4) DEFAULT NULL, "setpoints_desired_deliver_fcr_cloud" decimal(23,3) DEFAULT NULL, -- in W "setpoints_effective_active_power" decimal(23,3) DEFAULT NULL, -- in W "setpoints_effective_reactive_power_reactive_power" decimal(23,3) DEFAULT NULL, -- setpoint for "fixedReactivePower" mode, in var. "setpoints_effective_reactive_power_power_factor" decimal(5,4) DEFAULT NULL, -- setpoint for "fixedPowerFactor" mode, unitless. "setpoints_effective_reactive_power_mode" varchar(32) DEFAULT NULL, -- reactive power control mode, either "fixedReactivePower" or "fixedPowerFactor". "warnings" nvarchar(4000) DEFAULT NULL, -- if not null, will contain a JSON aray of string elements. see error codes section "errors" nvarchar(4000) 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" bit 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"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_battery_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=4, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_battery_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=4, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_battery_power';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_battery_power_bess' and xtype='U') CREATE TABLE "teleport_battery_power_bess"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "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" nvarchar(4000) DEFAULT NULL, -- if not null, will contain a JSON aray of string elements. see error codes section "errors" nvarchar(4000) DEFAULT NULL, -- if not null, will contain a JSON array of string elements. see error codes section "scheduled" bit 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"), INDEX "bess" ("bess_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "bess_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_battery_power_bess_rack' and xtype='U') CREATE TABLE "teleport_battery_power_bess_rack"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "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" bit 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"), INDEX "bess_rack" ("rack_identifier","created_at"), INDEX "bess" ("bess_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "bess_identifier", "rack_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_battery_power' and xtype='U') CREATE TABLE "teleport_battery_power"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "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. When dispatchPower is null but the battery system does not support stand-by mode, the Teleport will send a schedule with 0 W to the asset, while the reported dispatchPower is null. "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" nvarchar(4000) DEFAULT NULL, -- if not null, will contain a JSON aray of string elements. see error codes section "errors" nvarchar(4000) 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" bit 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"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_battery_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=3, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_battery_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=3, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_battery_power';
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_battery_power_bess' and xtype='U') CREATE TABLE "teleport_battery_power_bess"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "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" nvarchar(4000) DEFAULT NULL, -- if not null, will contain a JSON aray of string elements. see error codes section "errors" nvarchar(4000) DEFAULT NULL, -- if not null, will contain a JSON array of string elements. see error codes section "scheduled" bit 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"), INDEX "bess" ("bess_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "bess_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_battery_power_bess_rack' and xtype='U') CREATE TABLE "teleport_battery_power_bess_rack"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "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" bit 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"), INDEX "bess_rack" ("rack_identifier","created_at"), INDEX "bess" ("bess_identifier","created_at"), INDEX "teleport" ("teleport_hash_id","asset_identifier","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "bess_identifier", "rack_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
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.
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_battery_power_flash' and xtype='U') CREATE TABLE "teleport_battery_power_flash"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifier" varchar(128) NOT NULL, "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" bit 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"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_battery_power_flash') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_battery_power_flash'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_battery_power_flash';
Set battery operation commands
The SetBatteryOperation commands that you send in through our cloud API can also be forwarded.
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_command_set_battery_operation' and xtype='U') CREATE TABLE "teleport_command_set_battery_operation"( "id" int not null identity(1,1), "teleport_hash_id" varchar(32) NOT NULL, "asset_identifiers" varchar(max) DEFAULT NULL, "attempt" int NOT NULL, "start_at" datetime NOT NULL, "end_at" datetime NOT NULL, "dispatch_power_active_power" decimal(23,3) DEFAULT NULL, "deliver_fcr_max_rate" decimal(23,3) DEFAULT NULL, "charge_to_state_percentage" decimal(7,4) DEFAULT NULL, "received_at" datetime NOT NULL, "created_at" datetime NOT NULL, PRIMARY KEY ("id"), INDEX "teleport_created_at" ("teleport_hash_id","created_at"), INDEX "teleport_start_at" ("teleport_hash_id","start_at"), INDEX "teleport_received_at" ("teleport_hash_id","received_at"));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_command_set_battery_operation') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_command_set_battery_operation'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_command_set_battery_operation';
Meter power
The schema for messages forwarded from a Teleport device that is connected to a meter:
- The phase voltage values are mapped to corresponding phase voltage fields:
voltage_phase_l1 = phase_voltage_l1
,voltage_phase_l2 = phase_voltage_l2
,voltage_phase_l3 = phase_voltage_l3
.- The line voltage fields are set to NULL, based on the assumption that all connection types are wye-connected, where phase and line voltages are not equal.
- Current values are mapped to both phase and line fields, as in wye-connected metering, phase and line currents are equal:
current_phase_l1 = current_l1
,current_phase_l2 = current_l2
,current_phase_l3 = current_l3
.current_line_l1 = current_l1
,current_line_l2 = current_l2
,current_line_l3 = current_l3
.
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_meter_power' and xtype='U') CREATE TABLE "teleport_meter_power"( "id" int not null identity(1,1), "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 "voltage_phase_l1" decimal(23,3) DEFAULT NULL, -- in V, nonnegative "voltage_phase_l2" decimal(23,3) DEFAULT NULL, -- in V, nonnegative "voltage_phase_l3" decimal(23,3) DEFAULT NULL, -- in V, nonnegative "voltage_line_l1" decimal(23,3) DEFAULT NULL, -- in V, nonnegative "voltage_line_l2" decimal(23,3) DEFAULT NULL, -- in V, nonnegative "voltage_line_l3" decimal(23,3) DEFAULT NULL, -- in V, nonnegative "current_phase_l1" decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value "current_phase_l2" decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value "current_phase_l3" decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value "current_line_l1" decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value "current_line_l2" decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value "current_line_l3" decimal(23,3) DEFAULT NULL, -- in A, delivering to the grid is a positive value "three_phase_connection_type" varchar(32) DEFAULT NULL, -- can be "wye" or "delta" "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 "apparent_power_l1" decimal(23,3) DEFAULT NULL, -- in VA, nonnegative "apparent_power_l2" decimal(23,3) DEFAULT NULL, -- in VA, nonnegative "apparent_power_l3" decimal(23,3) DEFAULT NULL, -- in VA, nonnegative "apparent_power_sum" decimal(23,3) DEFAULT NULL, -- in VA, nonnegative "power_factor_l1" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrants 2 and 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1 and 3), the PF sign is negative. "power_factor_l2" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrants 2 and 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1 and 3), the PF sign is negative. "power_factor_l3" decimal(5, 4) DEFAULT NULL, -- unitless. For capacitive loads (leading power factor, quadrants 2 and 4), the PF sign is positive. For inductive loads (lagging power factor, quadrants 1 and 3), the PF sign is negative. "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 "scheduled" bit 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, -- in UTC "created_at" datetime NOT NULL, -- in UTC PRIMARY KEY ("id"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_meter_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=2, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_meter_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=2, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_meter_power';
USE master;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'teleport') CREATE DATABASE teleport;
USE teleport;
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='teleport_meter_power' and xtype='U') CREATE TABLE "teleport_meter_power"( "id" int not null identity(1,1), "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 "scheduled" bit 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, -- in UTC "created_at" datetime NOT NULL, -- in UTC PRIMARY KEY ("id"), INDEX "teleport" ("teleport_hash_id","created_at"), INDEX "teleport_asset" UNIQUE ("teleport_hash_id", "asset_identifier", "measured_at") WITH (IGNORE_DUP_KEY = ON));
IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_meter_power') AND [name] = N'version' AND [minor_id] = 0) EXEC sys.sp_addextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_meter_power'ELSE EXEC sys.sp_updateextendedproperty @name=N'version', @value=1, @level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'teleport_meter_power';