Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
NOTE: OSLP v0.5.1 is deprecated.
Contract for
// import "nanopb.proto";
package oslp;
option java_package = "org.opensmartgridplatform.oslp";
message Message {
optional RegisterDeviceRequest registerDeviceRequest = 1;
optional RegisterDeviceResponse registerDeviceResponse = 2;
optional StartSelfTestRequest startSelfTestRequest = 3;
optional StartSelfTestResponse startSelfTestResponse = 4;
optional StopSelfTestRequest stopSelfTestRequest = 5;
optional StopSelfTestResponse stopSelfTestResponse = 6;
optional UpdateFirmwareRequest updateFirmwareRequest = 7;
optional UpdateFirmwareResponse updateFirmwareResponse = 8;
optional SetLightRequest setLightRequest = 9;
optional SetLightResponse setLightResponse = 10;
optional GetStatusRequest getStatusRequest = 11;
optional GetStatusResponse getStatusResponse = 12;
optional ResumeScheduleRequest resumeScheduleRequest = 13;
optional ResumeScheduleResponse resumeScheduleResponse = 14;
optional SetEventNotificationsRequest setEventNotificationsRequest = 15;
optional SetEventNotificationsResponse setEventNotificationsResponse = 16;
optional EventNotificationRequest eventNotificationRequest = 17;
optional EventNotificationResponse eventNotificationResponse = 18;
optional GetFirmwareVersionRequest getFirmwareVersionRequest = 19;
optional GetFirmwareVersionResponse getFirmwareVersionResponse = 20;
optional SetScheduleRequest setScheduleRequest = 21;
optional SetScheduleResponse setScheduleResponse = 22;
optional SetConfigurationRequest setConfigurationRequest = 25;
optional SetConfigurationResponse setConfigurationResponse = 26;
optional GetPowerUsageHistoryRequest getPowerUsageHistoryRequest = 27;
optional GetPowerUsageHistoryResponse getPowerUsageHistoryResponse = 28;
optional GetActualPowerUsageRequest getActualPowerUsageRequest = 29;
optional GetActualPowerUsageResponse getActualPowerUsageResponse = 30;
optional SetRebootRequest setRebootRequest = 31;
optional SetRebootResponse setRebootResponse = 32;
optional SetTransitionRequest setTransitionRequest = 33;
optional SetTransitionResponse setTransitionResponse = 34;
optional GetConfigurationRequest getConfigurationRequest = 35;
optional GetConfigurationResponse getConfigurationResponse = 36;
optional ConfirmRegisterDeviceRequest confirmRegisterDeviceRequest = 37;
optional ConfirmRegisterDeviceResponse confirmRegisterDeviceResponse = 38;
}
// ========= Device Installation
message RegisterDeviceRequest {
required string deviceIdentification = 1; // [(nanopb).max_size = 41];
required bytes ipAddress = 2; // [(nanopb).max_size = 4];
required DeviceType deviceType = 3;
required bool hasSchedule = 4;
required uint32 randomDevice = 5; // 16 bits
}
message RegisterDeviceResponse {
required Status status = 1;
required string currentTime = 2; // [(nanopb).max_size = 15];// - format YYYYMMDDhhmmss UTC
required uint32 randomDevice = 3;
required uint32 randomPlatform = 4;
optional LocationInfo locationInfo = 5; // Location information of device
}
message StartSelfTestRequest {
optional bool present = 1 [default = true];
}
message StartSelfTestResponse {
required Status status = 1;
}
message StopSelfTestRequest {
optional bool present = 1 [default = true];
}
message StopSelfTestResponse {
required Status status = 1;
required bytes selfTestResult = 2; // [(nanopb).max_size = 1];
}
// ========= Firmware Management
message GetFirmwareVersionRequest {
optional bool present = 1 [default = true];
}
message GetFirmwareVersionResponse {
required string firmwareVersion = 1; // [(nanopb).max_size = 7]; // RXX
}
message UpdateFirmwareRequest {
required string firmwareDomain = 1; // [(nanopb).max_size = 100]; // Servername
required string firmwareUrl = 2; // [(nanopb).max_size = 255]; // /firmware/PSLD/RXX
}
message UpdateFirmwareResponse {
required Status status = 1;
}
// ========= Ad-Hoc & Status
message SetLightRequest {
repeated LightValue values = 1; // [(nanopb).max_count = 6];
}
message SetLightResponse {
required Status status = 1;
}
message GetStatusRequest {
optional bool present = 1 [default = true];
}
message GetStatusResponse {
required Status status = 1;
repeated LightValue value = 2; // [(nanopb).max_count = 6];
required LinkType preferredLinktype = 3;
required LinkType actualLinktype = 4;
required LightType lightType = 5;
required uint32 eventNotificationMask = 6; // Bitmask for max 32 events, using NotificationBit for bit positions.
}
message ResumeScheduleRequest {
optional bytes index = 1; // [(nanopb).max_size = 1]; // index number of connected light (DALI), none means all connected ligts.
required bool immediate = 2; // [default = false]; // Resume at next schedule item or direct
}
message ResumeScheduleResponse {
required Status status = 1;
}
message SetRebootRequest {
optional bool present = 1 [default = true];
}
message SetRebootResponse {
required Status status = 1;
}
message SetTransitionRequest {
required TransitionType transitionType = 1; // Night-Day or Day-Night transition
optional string time = 2; // [(nanopb).max_size = 7]; // - format hhmmss UTC
}
message SetTransitionResponse {
required Status status = 1;
}
message SetEventNotificationsRequest {
required uint32 NotificationMask = 1; // Bitmask for max 32 events, using NotificationBit for bit positions.
}
message SetEventNotificationsResponse {
required Status status = 1;
}
message EventNotificationRequest {
repeated EventNotification notifications = 1; // [(nanopb).max_count = 6];
}
message EventNotificationResponse {
required Status status = 1;
}
// ========= Scheduling
message SetScheduleRequest {
repeated Schedule schedules = 1; // [(nanopb).max_count = 50];
optional PageInfo pageInfo = 2;
required RelayType scheduleType = 3; // RT_NOT_SET is NOT supported!
}
message SetScheduleResponse {
required Status status = 1;
}
// ========= Configuration
message SetConfigurationRequest {
optional LightType lightType = 1;
optional DaliConfiguration daliConfiguration = 2; // contains specific configuration for DALI controllers
optional RelayConfiguration relayConfiguration = 3; // contains specific configuration for Relay
optional uint32 shortTermHistoryIntervalMinutes = 4;
optional LinkType preferredLinkType = 5;
optional MeterType meterType = 6;
optional uint32 longTermHistoryInterval = 7;
optional LongTermIntervalType longTermHistoryIntervalType = 8;
}
message SetConfigurationResponse {
required Status status = 1;
}
message GetConfigurationRequest {
optional bool present = 1 [default = true];
}
message GetConfigurationResponse {
required Status status = 1;
optional LightType lightType = 2;
optional DaliConfiguration daliConfiguration = 3; // contains specific configuration for DALI controllers
optional RelayConfiguration relayConfiguration = 4; // contains specific configuration for Relay
optional uint32 shortTermHistoryIntervalMinutes = 5;
optional LinkType preferredLinkType = 6;
optional MeterType meterType = 7;
optional uint32 longTermHistoryInterval = 8;
optional LongTermIntervalType longTermHistoryIntervalType = 9;
}
message ConfirmRegisterDeviceRequest {
required uint32 randomDevice = 1;
required uint32 randomPlatform = 2;
}
message ConfirmRegisterDeviceResponse {
required Status status = 1;
required uint32 randomDevice = 2;
required uint32 randomPlatform = 3;
required uint32 sequenceWindow = 4;
}
// ========= Monitoring
message GetPowerUsageHistoryRequest {
required TimePeriod timePeriod = 1;
optional uint32 page = 2;
required HistoryTermType termType = 3;
}
message GetPowerUsageHistoryResponse {
required Status status = 1;
repeated PowerUsageData powerUsageData = 2; // [(nanopb).max_count = 20];
optional PageInfo pageInfo = 3;
}
message GetActualPowerUsageRequest {
optional bool present = 1 [default = true];
}
message GetActualPowerUsageResponse {
required Status status = 1;
required PowerUsageData powerUsageData = 2;
}
// ========= Types
message LocationInfo {
optional sint32 timeOffset = 1; // correction in minutes with respect to UTC
optional sint32 latitude = 2; // divide by 1000000 to get float value
optional sint32 longitude = 3; // divide by 1000000 to get float value
}
message LightValue {
optional bytes index = 1; // [(nanopb).max_size = 1]; // index number of connected light (DALI), none means all connected ligts.
required bool on = 2;
optional bytes dimValue = 3; // [(nanopb).max_size = 1]; // 1 - 100 %
}
message EventNotification {
required Event event = 1;
optional bytes index = 2; // [(nanopb).max_size=1];
optional string description = 3; // [(nanopb).max_size = 81];
}
message Schedule {
required Weekday weekday = 1;
optional string startDay = 2; // [(nanopb).max_size = 9]; //- format YYYYMMDD UTC, indicates the range of a schedule entry, from startDay
optional string endDay = 3; // [(nanopb).max_size = 9]; // - format YYYYMMDD UTC, including endDay
required ActionTime actionTime = 4;
optional string time = 5; // [(nanopb).max_size = 7]; // - format hhmmss localtime set when actionTime = ABSOLUTETIME
optional Window window = 6; // window to wait for light sensor trigger
repeated LightValue value = 7; // [(nanopb).max_count = 6];
optional TriggerType triggerType = 8; // React to setTransition or switch astronomical
}
message Window {
required uint32 minutesBefore = 1; // minutes before sunset / sunrise
required uint32 minutesAfter = 2; // minutes after sunset / sunrise
}
message DaliConfiguration {
optional bytes numberOfLights = 1; // [(nanopb).max_size = 1]; // number of lights connected to DALI controller
repeated IndexAddressMap addressMap = 2; // [(nanopb).max_count = 4];
}
message RelayConfiguration {
repeated IndexAddressMap addressMap = 1; // [(nanopb).max_count = 6];
}
message IndexAddressMap {
required bytes index = 1; // [(nanopb).max_size = 1]; // external index, for example 1
required bytes address = 2; // [(nanopb).max_size = 1]; // internal address, for example 2
required RelayType relayType = 3;
}
message PageInfo {
required uint32 currentPage = 1; // Pages start from 1
required uint32 pageSize = 2;
required uint32 totalPages = 3;
}
message TimePeriod {
required string startTime = 1; // [(nanopb).max_size = 15]; // - format YYYYMMDDhhmmss UTC
required string endTime = 2; // [(nanopb).max_size = 15]; // - format YYYYMMDDhhmmss UTC
}
message PowerUsageData {
required string recordTime = 1; // [(nanopb).max_size = 15]; // Record time - format YYYYMMDDhhmmss UTC
required MeterType meterType = 2; // Meter type (P1, Pulse, Aux)
required uint64 totalConsumedEnergy = 3; // Electricity delivered to client (Tariff I + Tarrif II) in 0,001 kWh
required uint32 actualConsumedPower = 4; // Actual Electricity power delivered in W
optional PsldData psldData = 5;
optional SsldData ssldData = 6;
}
message PsldData {
required uint32 totalLightingHours = 1; // Total lighting hours
}
message SsldData {
required uint32 actualCurrent1 = 1; // Instantaneous current L1 in mA
required uint32 actualCurrent2 = 2; // Instantaneous current L2 in mA
required uint32 actualCurrent3 = 3; // Instantaneous current L3 in mA
required uint32 actualPower1 = 4; // Instantaneous active power L1 in W
required uint32 actualPower2 = 5; // Instantaneous active power L2 in W
required uint32 actualPower3 = 6; // Instantaneous active power L3 in W
required uint32 averagePowerFactor1 = 7; // Power factor L1 (in 1/2^32) in steps of 0.1, 10 equals a power factor of 1
required uint32 averagePowerFactor2 = 8; // Power factor L2 (in 1/2^32) in steps of 0.1, 10 equals a power factor of 1
required uint32 averagePowerFactor3 = 9; // Power factor L3 (in 1/2^32) in steps of 0.1, 10 equals a power factor of 1
repeated RelayData relayData = 10; // [(nanopb).max_count = 4]; // Measurement data per relay
}
message RelayData {
required bytes index = 1; // [(nanopb).max_size = 1]; // external index, for example 1
required uint32 totalLightingMinutes = 2; // Total lighting minutes for lighting relay
}
// ========= Enumerations
// ========= Event Notification
enum NotificationBit {
DIAG_EVENTS = 1;
HARDWARE_FAILURE = 2;
LIGHT_EVENTS = 4; // For example LightValue changes
TARIFF_EVENTS = 8; // For example Tariff changes
MONITOR_EVENTS = 16; // For example monitor buffer is almost full
FIRMWARE_EVENTS = 32; // For example firmware activation
COMM_EVENTS = 64; // For example alternative channel
SECURITY_EVENTS = 128; // For example out of sequence
}
//Events must map to their notification bit:
//EG: 0000-0999 =1
// 1000-1999 =2
// 2000-2999 =4
// 3000-3999 =8
// 4000-4999 =16
// 5000-5999 =32
// 6000-6999 =64
// 7000-7999 =128
// OR to check 2^((event num)/1000)=notification bit
enum Event {
// 0 - 999 Diagnostics
DIAG_EVENTS_GENERAL = 0;
// 1000 - 1999 Hardware Failures
HARDWARE_FAILURE_RELAY = 1000; // Index indicates relay (not supported yet)
// 2000 - 2999 Light Events
LIGHT_EVENTS_LIGHT_ON = 2000; // Index indicates light
LIGHT_EVENTS_LIGHT_OFF = 2001; // Index indicates light
LIGHT_FAILURE_DALI_COMMUNICATION = 2500; // DALI communication failure
LIGHT_FAILURE_BALLAST = 2501; // Ballast failure detected (DALI only)
LIGHT_FAILURE_TARIFF_SWITCH_ATTEMPT = 2502; // Attempt to switch an endpoint configured as tariff from OVL schedule or manual override (index indicates endpoint)
// 3000 - 3999 Tariff Events
TARIFF_EVENTS_TARIFF_ON = 3000; // Tariff switched on
TARIFF_EVENTS_TARIFF_OFF = 3001; // Tariff switched off
// 4000 - 4999
MONITOR_EVENTS_LONG_BUFFER_FULL = 4000; // Long term monitoring buffer overrun occurred
MONITOR_FAILURE_P1_COMMUNICATION = 4500; // P1 meter could not be read
MONITOR_SHORT_DETECTED = 4600;
MONITOR_SHORT_RESOLVED = 4601;
MONITOR_DOOR_OPENED = 4700;
MONITOR_DOOR_CLOSED = 4701;
// 5000 - 5999 Firmware Events
FIRMWARE_EVENTS_ACTIVATING = 5000; // Start activating new firmware, after downloading
FIRMWARE_EVENTS_DOWNLOAD_NOTFOUND = 5501; // Download of firmware failed, i.e. location incorrect
FIRMWARE_EVENTS_DOWNLOAD_FAILED = 5502; // Download of firmware failed, image incorrect
// 6000 – 6999
COMM_EVENTS_ALTERNATIVE_CHANNEL = 6000; // Alternative channel selected for communication (description contains selected channel GPRS/CDMA/Ethernet)
COMM_EVENTS_RECOVERED_CHANNEL = 6001; // Communication has been recovered for this channel
// 7000 - 7999
SECURITY_EVENTS_OUT_OF_SEQUENCE = 7000; // Out of sequence occurred and sequence number is renegotiated
}
// ========= Enums
enum TriggerType {
TT_NOT_SET = 0;
LIGHT_TRIGGER = 1;
ASTRONOMICAL = 2;
}
enum TransitionType {
NIGHT_DAY = 0;
DAY_NIGHT = 1;
}
enum Weekday {
MONDAY = 1;
TUESDAY = 2;
WEDNESDAY = 3;
THURSDAY = 4;
FRIDAY = 5;
SATURDAY = 6;
SUNDAY = 7;
WEEKDAY = 8;
WEEKEND = 9;
ABSOLUTEDAY = 10;
ALL = 11;
}
enum ActionTime {
ABSOLUTETIME = 1;
SUNRISE = 2;
SUNSET = 3;
}
enum DeviceType {
PSLD = 0;
SSLD = 1;
}
enum Status {
OK = 0;
FAILURE = 1; // general failure
REJECTED = 2; // request received in wrong state
}
enum LightType {
LT_NOT_SET = 0;
RELAY = 1;
ONE_TO_TEN_VOLT = 2;
ONE_TO_TEN_VOLT_REVERSE = 3;
DALI = 4;
}
enum RelayType {
RT_NOT_SET = 0;
LIGHT = 1;
TARIFF = 2;
}
enum MeterType {
MT_NOT_SET = 0;
P1 = 1;
PULSE = 2;
AUX = 3;
}
enum LinkType {
LINK_NOT_SET = 0;
GPRS = 1;
CDMA = 2;
ETHERNET = 3;
}
enum LongTermIntervalType {
LT_INT_NOT_SET = 0;
DAYS = 1;
MONTHS = 2;
}
enum HistoryTermType {
Short = 0;
Long = 1;
}
The OSLP is a lightweight message based protocol. OSLP uses Google Protocol Buffers and is used for communication with SSLD devices (and device simulators). It is defined as a contract/interface. The interface defines datatypes and messages which use those data types. Google Protocol Buffers is used to generate the protocol implementations for Java (for the platform) and C/C++ (for the SSLD devices).
Open street light protocol does not use ASN.1 but Google Protocol Buffers. The main reason for this is the lack of a good quality free ASN.1 compiler for Java or C. Google Protocol Buffers offers a fast and free compiler for Java and C which produces small message sizes.
Public/private key pair
Signing of messages through Elliptic Curve DSA 256 bit
** Integrity of the message is ensured
** Sender identity is ensured
** No encryption, because content is not confidential
Replay attack prevention
Special note on Java security provider:
When both the DLMS and OSLP providers are deloyed within the same Java VM, the SunEC provider will not work properly. To workaround this issue, the SunPKCS11-NSS provider must be used for the OSLP protocol adapter. By default this provider is enabled on the development VM.
The protobuf contract for OSLP v0.5.1. For v0.5.1 port number 12121 is used.
The protobuf contract for OSLP v0.6.1. For v0.6.1 port number 12122 is used.
The requests and responses are sent using an OSLP envelope. This structure contains the following fields: securityKey, sequenceNumber, deviceId and payloadMessage. The first 3 field are byte arrays, the payloadMessage is a protobuf type which is serializable.
class OslpEnvelope {
/**
* Length of the security hash.
* Length for ECDSA is 71 or 72 or 73 bytes.
* Length for RSA is 128 bytes.
*/
public static final int SECURITY_KEY_LENGTH = 128;
/**
* Length of the sequence number.
*/
public static final int SEQUENCE_NUMBER_LENGTH = 2;
/**
* Length of the manufacturer id.
*/
public static final int MANUFACTURER_ID_LENGTH = 2;
/**
* Length of the device id.
*/
public static final int DEVICE_ID_LENGTH = 10;
/**
* Length of the length.
*/
public static final int LENGTH_INDICATOR_LENGTH = 2;
/**
* Buffer for security key bytes.
*/
public byte[] securityKey = new byte[SECURITY_KEY_LENGTH];
/**
* Buffer for sequence number bytes.
*/
public byte[] sequenceNumber = new byte[SEQUENCE_NUMBER_LENGTH];
/**
* Buffer for deviceid bytes.
*/
public byte[] deviceId = new byte[DEVICE_ID_LENGTH + MANUFACTURER_ID_LENGTH];
/**
* Buffer for OSLP payload.
*/
public Message payloadMessage;
}
The device registration is a 2 step process. First RegisterDeviceRequest and RegisterDeviceResponse are exchanged between device and platform. Second ConfirmRegisterDeviceRequest and ConfirmRegisterDeviceResponse messages are exchanged.
Request that notifies the platform a device which wants to register. During the registration the sequence number is reset to a random value the platform is notified if the device has a light schedule, the type of the device, the device identification, and the device communicates its IP address to the platform. Also a random number is determined by the device and this 'randomDevice' should be present in the response form the platform.
Response which holds the time of the platform so the device can synchronize the time, contains location information for the device like GPS coordinates and Daylight Saving Time information. The device will sent ConfirmRegisterDeviceRequest after receiving the RegisterDeviceResponse. Also a random number is determined by the platform and this 'randomPlatform' should be present in the next request 'ConfirmRegisterDeviceRequest' by the device.
message RegisterDeviceRequest {
required string deviceIdentification = 1; // [(nanopb).max_size = 41];
required bytes ipAddress = 2; // [(nanopb).max_size = 4];
required DeviceType deviceType = 3;
required bool hasSchedule = 4;
required uint32 randomDevice = 5; // 16 bits
}
message RegisterDeviceResponse {
required Status status = 1;
required string currentTime = 2; // [(nanopb).max_size = 15];// - format YYYYMMDDhhmmss UTC
required uint32 randomDevice = 3;
required uint32 randomPlatform = 4;
optional LocationInfo locationInfo = 5; // Location information of device
}
enum DeviceType {
PSLD = 0;
SSLD = 1;
}
enum Status {
OK = 0;
FAILURE = 1; // general failure
REJECTED = 2; // request received in wrong state
}
message LocationInfo {
optional sint32 timeOffset = 1; // correction in minutes with respect to UTC
optional sint32 latitude = 2; // divide by 1000000 to get float value
optional sint32 longitude = 3; // divide by 1000000 to get float value
}
OSLP RegisterDeviceRequest sent from 'device-01' to platform:
registerDeviceRequest {
deviceIdentification: "device-01"
ipAddress: "#\000\000\001"
deviceType: SSLD
hasSchedule: false
randomDevice: 13246
}
OSLP RegisterDeviceResponse sent from platform to 'device-01':
registerDeviceResponse {
status: OK
currentTime: "20160106135210"
randomDevice: 13246
randomPlatform: 44765
locationInfo {
timeOffset: 60
latitude: 50889228
longitude: 5974140
}
}
Request to fetch the current configuration of a device.
Response communicates if the request was executed. If 'status = OK' then the optional fields will be partly populated. Note that DaliConfiguration is only present for devices with 'lightType = DALI', which are of device type PSLD. Note that RelayConfiguration is only present for devices with 'lightType = RELAY | ONE_TO_TEN_VOLT | ONE_TO_TEN_VOLT_REVERSE', which are of device type SSLD.
message GetConfigurationRequest {
optional bool present = 1 [default = true];
}
message GetConfigurationResponse {
required Status status = 1;
optional LightType lightType = 2;
optional DaliConfiguration daliConfiguration = 3; // Contains specific configuration for DALI controllers.
optional RelayConfiguration relayConfiguration = 4; // Contains specific configuration for Relay.
optional uint32 shortTermHistoryIntervalMinutes = 5;
optional LinkType preferredLinkType = 6;
optional MeterType meterType = 7;
optional uint32 longTermHistoryInterval = 8;
optional LongTermIntervalType longTermHistoryIntervalType = 9;
optional uint32 timeSyncFrequency = 10 [default = 86400]; // Time synch frequency (seconds).
optional bytes deviceFixIpValue = 11; // [(nanopb).max_count = 4]; // The fixed IP address of this device.
optional bytes netMask = 12; // [(nanopb).max_count = 4]; // Network mask for fixed IP address.
optional bytes gateWay = 13; // [(nanopb).max_count = 4]; // Gateway address for fixed IP address.
optional bool isDhcpEnabled = 14 [default = true]; // Is DHCP enabled for this device?
optional bool isTlsEnabled = 15; // Defines if TLS is enabled.
optional uint32 oslpBindPortNumber = 16; // The port used for TLS connections.
optional string commonNameString = 17 [default = 'TLS Test']; //[default = 'TLS Test',(nanopb).max_count = 25]; // The common name (CN) used when isTlsEnabled equals true.
optional uint32 communicationTimeout = 18 [default = 20]; // Communication Timeouts (seconds) (wait for answer, socket establish, or server response = comm watchdog for local mode).
optional uint32 communicationNumberOfRetries = 19 [default = 3]; // Communication number of retries.
optional uint32 communicationPauseTimeBetweenConnectionTrials = 20 [default = 60]; // Time between communication attempts.
optional bytes ospgIpAddress = 21; // [(nanopb).max_count = 4]; // The IP address of the platform.
optional uint32 osgpPortNumber = 22; // The port number of the platform.
optional bool isTestButtonEnabled = 23 [default = true]; // Is the test button enabled for this device?
optional bool isAutomaticSummerTimingEnabled = 24 [default = true]; // Is the automatic summer timing enabled for this device?
optional sint32 astroGateSunRiseOffset = 25 [default = 0]; // The calculated sunrise time modified by this value. Time is moved earlier (if offset is negative) or later (if offset is positive). In seconds.
optional sint32 astroGateSunSetOffset = 26 [default = 0]; // The calculated sunset time modified by this value. Time is moved earlier (if offset is negative) or later (if offset is positive). In seconds.
repeated uint32 switchingDelay = 27; // [(nanopb).max_count = 4]; // Switching delay (seconds), array of 4 values. Default 0, 0, 0, 0.
repeated RelayMatrix relayLinking = 28; // Relay linking is a software linking, to may link each relay with each other relay. It is a matrix. Example, if relay 1 is linked with relay 3, if relay 1 will be switched (by OSGP or local by internal scheduler), the relay 3 will switch automatically (on or off, as it set) without new command.
optional bool relayRefreshing = 29 [default = true]; // Is relayRefreshing enabled for this device? Set minutely the nominal relay state and status according to active schedule after power outage and missed switching or anti manipulation.
optional string summerTimeDetails = 30 [default = '0360100']; //[default = '0360100',(nanopb).max_count = 7]; // The time point for DST for Europe is not identical in every country. It should be added as parameters the weekday, month and time point for DST/summer and winter.
optional string winterTimeDetails = 31 [default = '1060200']; //[default = '1060200',(nanopb).max_count = 7]; // The time point for DST for Europe is not identical in every country. It should be added as parameters the weekday, month and time point for DST/summer and winter.
}
enum Status {
OK = 0;
FAILURE = 1; // general failure
REJECTED = 2; // request received in wrong state
}
enum LightType {
LT_NOT_SET = 0;
RELAY = 1;
ONE_TO_TEN_VOLT = 2;
ONE_TO_TEN_VOLT_REVERSE = 3;
DALI = 4;
}
message DaliConfiguration {
optional bytes numberOfLights = 1; // [(nanopb).max_size = 1]; // number of lights connected to DALI controller
repeated IndexAddressMap addressMap = 2; // [(nanopb).max_count = 4];
}
message RelayConfiguration {
repeated IndexAddressMap addressMap = 1; // [(nanopb).max_count = 6];
}
message IndexAddressMap {
required bytes index = 1; // [(nanopb).max_size = 1]; // external index, for example 1
required bytes address = 2; // [(nanopb).max_size = 1]; // internal address, for example 2
required RelayType relayType = 3;
}
enum RelayType {
RT_NOT_SET = 0;
LIGHT = 1;
TARIFF = 2;
}
enum LinkType {
LINK_NOT_SET = 0;
GPRS = 1;
CDMA = 2;
ETHERNET = 3;
}
enum MeterType {
MT_NOT_SET = 0;
P1 = 1;
PULSE = 2;
AUX = 3;
}
enum LongTermIntervalType {
LT_INT_NOT_SET = 0;
DAYS = 1;
MONTHS = 2;
}
message RelayMatrix {
required bytes masterRelayIndex = 1; // [(nanopb).max_count = 1];
required bool masterRelayOn = 2; // [(nanopb).max_count = 1];
optional bytes indicesOfControlledRelaysOn = 3; // [(nanopb).max_count = 4]; // IndexNumber of output Relay to switch ON if Master Relay state changes as determined by masterRelayOn.
optional bytes indicesOfControlledRelaysOff = 4; // [(nanopb).max_count = 4]; // IndexNumber of output Relay to switch OFF if Master Relay sate changes as determined by MasterRelayOff.
}
Soap requests and responses sent to and from platform:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:con="http://www.opensmartgridplatform.org/schemas/configurationmanagement/2014/10">
<soapenv:Header>
<com:OrganisationIdentification>LianderNetManagement</com:OrganisationIdentification>
<com:UserName>Kevin</com:UserName>
<com:ApplicationName>SoapUI</com:ApplicationName>
</soapenv:Header>
<soapenv:Body>
<con:GetConfigurationRequest>
<con:DeviceIdentification>device-01</con:DeviceIdentification>
</con:GetConfigurationRequest>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:GetConfigurationAsyncResponse xmlns:ns2="http://www.opensmartgridplatform.org/schemas/configurationmanagement/2014/10" xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/2014/10">
<ns2:AsyncResponse>
<ns3:CorrelationUid>LianderNetManagement|||device-01|||20161007142028655</ns3:CorrelationUid>
<ns3:DeviceId>device-01</ns3:DeviceId>
</ns2:AsyncResponse>
</ns2:GetConfigurationAsyncResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:con="http://www.opensmartgridplatform.org/schemas/configurationmanagement/2014/10">
<soapenv:Header>
<com:OrganisationIdentification>LianderNetManagement</com:OrganisationIdentification>
<com:UserName>Kevin</com:UserName>
<com:ApplicationName>SoapUI</com:ApplicationName>
</soapenv:Header>
<soapenv:Body>
<con:GetConfigurationAsyncRequest>
<con:AsyncRequest>
<com:CorrelationUid>LianderNetManagement|||device-01|||20161007142028655</com:CorrelationUid>
<com:DeviceId>device-01</com:DeviceId>
</con:AsyncRequest>
</con:GetConfigurationAsyncRequest>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:GetConfigurationResponse xmlns:ns2="http://www.opensmartgridplatform.org/schemas/configurationmanagement/2014/10" xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/2014/10">
<ns2:Result>OK</ns2:Result>
<ns2:Configuration>
<ns2:LightType>RELAY</ns2:LightType>
<ns2:RelayConfiguration>
<ns2:RelayMap>
<ns2:Index>1</ns2:Index>
<ns2:Address>1</ns2:Address>
<ns2:RelayType>TARIFF</ns2:RelayType>
</ns2:RelayMap>
<ns2:RelayMap>
<ns2:Index>2</ns2:Index>
<ns2:Address>2</ns2:Address>
<ns2:RelayType>LIGHT</ns2:RelayType>
</ns2:RelayMap>
<ns2:RelayMap>
<ns2:Index>3</ns2:Index>
<ns2:Address>3</ns2:Address>
<ns2:RelayType>LIGHT</ns2:RelayType>
</ns2:RelayMap>
<ns2:RelayMap>
<ns2:Index>4</ns2:Index>
<ns2:Address>4</ns2:Address>
<ns2:RelayType>LIGHT</ns2:RelayType>
</ns2:RelayMap>
</ns2:RelayConfiguration>
<ns2:PreferredLinkType>ETHERNET</ns2:PreferredLinkType>
<ns2:TimeSyncFrequency>86400</ns2:TimeSyncFrequency>
<ns2:DeviceFixedIp>
<ns2:IpAddress>192.168.0.100</ns2:IpAddress>
<ns2:NetMask>255.255.255.0</ns2:NetMask>
<ns2:GateWay>192.168.0.1</ns2:GateWay>
</ns2:DeviceFixedIp>
<ns2:DhcpEnabled>false</ns2:DhcpEnabled>
<ns2:TlsEnabled>true</ns2:TlsEnabled>
<ns2:TlsPortNumber>1234</ns2:TlsPortNumber>
<ns2:CommonNameString>TLS Test</ns2:CommonNameString>
<ns2:CommunicationTimeout>30</ns2:CommunicationTimeout>
<ns2:CommunicationNumberOfRetries>5</ns2:CommunicationNumberOfRetries>
<ns2:CommunicationPauseTimeBetweenConnectionTrials>120</ns2:CommunicationPauseTimeBetweenConnectionTrials>
<ns2:OsgpIpAddress>168.63.97.65</ns2:OsgpIpAddress>
<ns2:OsgpPortNumber>12122</ns2:OsgpPortNumber>
<ns2:TestButtonEnabled>false</ns2:TestButtonEnabled>
<ns2:AutomaticSummerTimingEnabled>false</ns2:AutomaticSummerTimingEnabled>
<ns2:AstroGateSunRiseOffset>-15</ns2:AstroGateSunRiseOffset>
<ns2:AstroGateSunSetOffset>15</ns2:AstroGateSunSetOffset>
<ns2:SwitchingDelays>1</ns2:SwitchingDelays>
<ns2:SwitchingDelays>2</ns2:SwitchingDelays>
<ns2:SwitchingDelays>3</ns2:SwitchingDelays>
<ns2:SwitchingDelays>4</ns2:SwitchingDelays>
<ns2:RelayLinking>
<ns2:MasterRelayIndex>2</ns2:MasterRelayIndex>
<ns2:MasterRelayOn>false</ns2:MasterRelayOn>
<ns2:IndicesOfControlledRelaysOn>3</ns2:IndicesOfControlledRelaysOn>
<ns2:IndicesOfControlledRelaysOn>4</ns2:IndicesOfControlledRelaysOn>
<ns2:IndicesOfControlledRelaysOff>3</ns2:IndicesOfControlledRelaysOff>
<ns2:IndicesOfControlledRelaysOff>4</ns2:IndicesOfControlledRelaysOff>
</ns2:RelayLinking>
<ns2:RelayRefreshing>false</ns2:RelayRefreshing>
<ns2:SummerTimeDetails>2016-03-27T01:00:00.000+01:00</ns2:SummerTimeDetails>
<ns2:WinterTimeDetails>2016-10-30T02:00:00.000+02:00</ns2:WinterTimeDetails>
</ns2:Configuration>
</ns2:GetConfigurationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
OSLP GetConfigurationRequest message sent to 'device-01':
getConfigurationRequest {
}
OSLP GetConfigurationResponse message sent to platform:
getConfigurationResponse {
status: OK
lightType: RELAY
relayConfiguration {
addressMap {
index: "\001"
address: "\001"
relayType: TARIFF
}
addressMap {
index: "\002"
address: "\002"
relayType: LIGHT
}
addressMap {
index: "\003"
address: "\003"
relayType: LIGHT
}
addressMap {
index: "\004"
address: "\004"
relayType: LIGHT
}
}
shortTermHistoryIntervalMinutes: 15
preferredLinkType: ETHERNET
meterType: MT_NOT_SET
longTermHistoryInterval: 1
longTermHistoryIntervalType: LT_INT_NOT_SET
timeSyncFrequency: 86400
deviceFixIpValue: "\300\250\000d"
netMask: "\377\377\377\000"
gateWay: "\300\250\000\001"
isDhcpEnabled: false
isTlsEnabled: true
oslpBindPortNumber: 1234
commonNameString: "TLS Test"
communicationTimeout: 30
communicationNumberOfRetries: 5
communicationPauseTimeBetweenConnectionTrials: 120
ospgIpAddress: "\250?aA"
osgpPortNumber: 12122
isTestButtonEnabled: false
isAutomaticSummerTimingEnabled: false
astroGateSunRiseOffset: -15
astroGateSunSetOffset: 15
switchingDelay: 1
switchingDelay: 2
switchingDelay: 3
switchingDelay: 4
relayLinking {
masterRelayIndex: "\002"
masterRelayOn: false
indicesOfControlledRelaysOn: "\003\004"
indicesOfControlledRelaysOff: "\003\004"
}
relayRefreshing: false
summerTimeDetails: "0360100"
winterTimeDetails: "1060200"
}
Request which contains the EventNotification mask.
Response communicates status.
message SetEventNotificationsRequest {
required uint32 NotificationMask = 1; // Bitmask for max 32 events, using NotificationBit for bit positions.
}
message SetEventNotificationsResponse {
required Status status = 1;
}
enum Status {
OK = 0;
FAILURE = 1; // general failure
REJECTED = 2; // request received in wrong state
}
Soap requests and responses sent to and from platform:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:dev="http://www.opensmartgridplatform.org/schemas/devicemanagement/2014/10">
<soapenv:Header>
<com:OrganisationIdentification>LianderNetManagement</com:OrganisationIdentification>
<com:UserName>liander gebruiker</com:UserName>
<com:ApplicationName>WEB_NET_MANAGEMENT</com:ApplicationName>
</soapenv:Header>
<soapenv:Body>
<dev:SetEventNotificationsRequest>
<!--type: Identification-->
<dev:DeviceIdentification>device-01</dev:DeviceIdentification>
<dev:EventNotifications>DIAG_EVENTS</dev:EventNotifications>
<dev:EventNotifications>HARDWARE_FAILURE</dev:EventNotifications>
<dev:EventNotifications>LIGHT_EVENTS</dev:EventNotifications>
<dev:EventNotifications>TARIFF_EVENTS</dev:EventNotifications>
<dev:EventNotifications>MONITOR_EVENTS</dev:EventNotifications>
<dev:EventNotifications>FIRMWARE_EVENTS</dev:EventNotifications>
<dev:EventNotifications>COMM_EVENTS</dev:EventNotifications>
<dev:EventNotifications>SECURITY_EVENTS</dev:EventNotifications>
</dev:SetEventNotificationsRequest>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:SetEventNotificationsAsyncResponse xmlns:ns2="http://www.opensmartgridplatform.org/schemas/devicemanagement/2014/10" xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/2014/10">
<ns2:AsyncResponse>
<ns3:CorrelationUid>LianderNetManagement|||device-01|||20160104145052565</ns3:CorrelationUid>
<ns3:DeviceId>device-01</ns3:DeviceId>
</ns2:AsyncResponse>
</ns2:SetEventNotificationsAsyncResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:dev="http://www.opensmartgridplatform.org/schemas/devicemanagement/2014/10">
<soapenv:Header>
<com:OrganisationIdentification>LianderNetManagement</com:OrganisationIdentification>
<com:UserName>liander gebruiker</com:UserName>
<com:ApplicationName>WEB_NET_MANAGEMENT</com:ApplicationName>
</soapenv:Header>
<soapenv:Body>
<dev:SetEventNotificationsAsyncRequest>
<dev:AsyncRequest>
<!--type: CorrelationUid-->
<com:CorrelationUid>LianderNetManagement|||device-01|||20160104145052565</com:CorrelationUid>
<!--type: Identification-->
<com:DeviceId>device-01</com:DeviceId>
</dev:AsyncRequest>
</dev:SetEventNotificationsAsyncRequest>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:SetEventNotificationsResponse xmlns:ns2="http://www.opensmartgridplatform.org/schemas/devicemanagement/2014/10" xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/2014/10">
<ns2:Result>OK</ns2:Result>
</ns2:SetEventNotificationsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
OSLP SetEventNotificationsRequest sent to 'device-01' to set EventNotifications:
setEventNotificationsRequest {
NotificationMask: 255
}
OSLP SetEventNotificationsResponse sent to platform:
setEventNotificationsResponse {
status: OK
}
// import "nanopb.proto";
package oslp;
option java_package = "org.opensmartgridplatform.oslp";
message Message {
optional RegisterDeviceRequest registerDeviceRequest = 1;
optional RegisterDeviceResponse registerDeviceResponse = 2;
optional StartSelfTestRequest startSelfTestRequest = 3;
optional StartSelfTestResponse startSelfTestResponse = 4;
optional StopSelfTestRequest stopSelfTestRequest = 5;
optional StopSelfTestResponse stopSelfTestResponse = 6;
optional UpdateFirmwareRequest updateFirmwareRequest = 7;
optional UpdateFirmwareResponse updateFirmwareResponse = 8;
optional SetLightRequest setLightRequest = 9;
optional SetLightResponse setLightResponse = 10;
optional GetStatusRequest getStatusRequest = 11;
optional GetStatusResponse getStatusResponse = 12;
optional ResumeScheduleRequest resumeScheduleRequest = 13;
optional ResumeScheduleResponse resumeScheduleResponse = 14;
optional SetEventNotificationsRequest setEventNotificationsRequest = 15;
optional SetEventNotificationsResponse setEventNotificationsResponse = 16;
optional EventNotificationRequest eventNotificationRequest = 17;
optional EventNotificationResponse eventNotificationResponse = 18;
optional GetFirmwareVersionRequest getFirmwareVersionRequest = 19;
optional GetFirmwareVersionResponse getFirmwareVersionResponse = 20;
optional SetScheduleRequest setScheduleRequest = 21;
optional SetScheduleResponse setScheduleResponse = 22;
optional SetConfigurationRequest setConfigurationRequest = 25;
optional SetConfigurationResponse setConfigurationResponse = 26;
optional GetPowerUsageHistoryRequest getPowerUsageHistoryRequest = 27;
optional GetPowerUsageHistoryResponse getPowerUsageHistoryResponse = 28;
optional GetActualPowerUsageRequest getActualPowerUsageRequest = 29;
optional GetActualPowerUsageResponse getActualPowerUsageResponse = 30;
optional SetRebootRequest setRebootRequest = 31;
optional SetRebootResponse setRebootResponse = 32;
optional SetTransitionRequest setTransitionRequest = 33;
optional SetTransitionResponse setTransitionResponse = 34;
optional GetConfigurationRequest getConfigurationRequest = 35;
optional GetConfigurationResponse getConfigurationResponse = 36;
optional ConfirmRegisterDeviceRequest confirmRegisterDeviceRequest = 37;
optional ConfirmRegisterDeviceResponse confirmRegisterDeviceResponse = 38;
optional UpdateDeviceSslCertificationRequest updateDeviceSslCertificationRequest = 39;
optional UpdateDeviceSslCertificationResponse updateDeviceSslCertificationResponse = 40;
optional SetDeviceVerificationKeyRequest setDeviceVerificationKeyRequest = 41;
optional SetDeviceVerificationKeyResponse setDeviceVerificationKeyResponse = 42;
optional SwitchFirmwareRequest switchFirmwareRequest = 43;
optional SwitchFirmwareResponse switchFirmwareResponse = 44;
optional SwitchConfigurationRequest switchConfigurationRequest = 45;
optional SwitchConfigurationResponse switchConfigurationResponse = 46;
}
// ========= Device Installation
message RegisterDeviceRequest {
required string deviceIdentification = 1; // [(nanopb).max_size = 41];
required bytes ipAddress = 2; // [(nanopb).max_size = 4];
required DeviceType deviceType = 3;
required bool hasSchedule = 4;
required uint32 randomDevice = 5; // 16 bits
}
message RegisterDeviceResponse {
required Status status = 1;
required string currentTime = 2; // [(nanopb).max_size = 15];// - Format YYYYMMDDhhmmss UTC.
required uint32 randomDevice = 3;
required uint32 randomPlatform = 4;
optional LocationInfo locationInfo = 5; // Location information of device.
}
message StartSelfTestRequest {
optional bool present = 1 [default = true];
}
message StartSelfTestResponse {
required Status status = 1;
}
message StopSelfTestRequest {
optional bool present = 1 [default = true];
}
message StopSelfTestResponse {
required Status status = 1;
required bytes selfTestResult = 2; // [(nanopb).max_size = 1];
}
// ========= Firmware Management
message GetFirmwareVersionRequest {
optional bool present = 1 [default = true];
}
message GetFirmwareVersionResponse {
required string firmwareVersion = 1; // [(nanopb).max_size = 7]; // RXX
}
message UpdateFirmwareRequest {
required string firmwareDomain = 1; // [(nanopb).max_size = 100]; // Server-name without protocol like this example: localhost.
required string firmwareUrl = 2; // [(nanopb).max_size = 255]; // Relative URL like this example: /firmware/PSLD/RXX.
}
message UpdateFirmwareResponse {
required Status status = 1;
}
message SwitchFirmwareRequest {
required string newFirmwareVersion = 1; // [(nanopb).max_size = 6]; // The version of the firmware which should be installed.
}
message SwitchFirmwareResponse {
required Status status = 1; // FIRMWARE_EVENTS_ACTIVATING Event will be sent, after the firmware change has completed.
}
// ========= Ad-Hoc & Status
message SetLightRequest {
repeated LightValue values = 1; // [(nanopb).max_count = 6];
}
message SetLightResponse {
required Status status = 1;
}
message GetStatusRequest {
optional bool present = 1 [default = true];
}
message GetStatusResponse {
required Status status = 1;
repeated LightValue value = 2; // [(nanopb).max_count = 6];
required LinkType preferredLinktype = 3;
required LinkType actualLinktype = 4;
required LightType lightType = 5;
required uint32 eventNotificationMask = 6; // Bitmask for max 32 events, using NotificationBit for bit positions.
optional uint32 numberOfOutputs = 7; // Hardware - The number of outputs of this device.
optional uint32 dcOutputVoltageMaximum = 8; // Hardware - DC output voltage MAXimum (in mV).
optional uint32 dcOutputVoltageCurrent = 9; // Hardware - DC output current voltage (in mV).
optional uint32 maximumOutputPowerOnDcOutput = 10; // Hardware - Maximum output power on DC output (mW).
optional bytes serialNumber = 11; // [(nanopb).max_size = 18]; // Hardware - Serial number of this device.
optional bytes macAddress = 12; // [(nanopb).max_size = 6]; // Hardware - MAC-address of this device.
optional string hardwareId = 13; // [(nanopb).min_size = 10, (nanopd).max_size = 25] ; // Hardware - The hardware ID of this device.
optional uint32 internalFlashMemSize = 14; // Hardware - The internal flash memory size.
optional uint32 externalFlashMemSize = 15; // Hardware - The external flash memory size.
optional uint32 lastInternalTestResultCode = 16; // Hardware - The last internal test result code.
optional uint32 startupCounter = 17; // Hardware - The startup counter.
optional string bootLoaderVersion = 18; // Software - The boot loader version.
optional string firmwareVersion = 19; // Software - The firmware version.
optional bytes currentConfigurationBackUsed = 20; // [(nanopb).max_size = 6]; // Software - The current configuration bank in use.
optional string name = 21; // Device - The name of this device.
optional string currentTime = 22; // Device - Not UTC, the time used in timing operations (adjusted "offset" + summer timing). YYYYMMDDhhmmss format.
optional string currentIp = 23; // Device - The current IP address of this device.
}
message ResumeScheduleRequest {
optional bytes index = 1; // [(nanopb).max_size = 1]; // Index number of connected light (DALI), none means all connected lights.
required bool immediate = 2; // [default = true]; // Resume at next schedule item or direct.
}
message ResumeScheduleResponse {
required Status status = 1;
}
message SetRebootRequest {
optional bool present = 1 [default = true];
}
message SetRebootResponse {
required Status status = 1;
}
message SetTransitionRequest {
required TransitionType transitionType = 1; // Night-Day or Day-Night transition.
optional string time = 2; // [(nanopb).max_size = 7]; // - Format hhmmss UTC.
}
message SetTransitionResponse {
required Status status = 1;
}
message SetEventNotificationsRequest {
required uint32 NotificationMask = 1; // Bitmask for max 32 events, using NotificationBit for bit positions.
}
message SetEventNotificationsResponse {
required Status status = 1;
}
message EventNotificationRequest {
repeated EventNotification notifications = 1; // [(nanopb).max_count = 6];
}
message EventNotificationResponse {
required Status status = 1;
}
// ========= Scheduling
message SetScheduleRequest {
repeated Schedule schedules = 1; // [(nanopb).max_count = 50];
optional PageInfo pageInfo = 2;
required RelayType scheduleType = 3; // RT_NOT_SET is NOT supported!
}
message SetScheduleResponse {
required Status status = 1;
}
// ========= Configuration
message SetConfigurationRequest {
optional LightType lightType = 1;
optional DaliConfiguration daliConfiguration = 2; // Contains specific configuration for DALI controllers.
optional RelayConfiguration relayConfiguration = 3; // Contains specific configuration for Relay.
optional uint32 shortTermHistoryIntervalMinutes = 4; // Deprecated, no longer supported by the platform.
optional LinkType preferredLinkType = 5;
optional MeterType meterType = 6; // Deprecated, no longer supported by the platform.
optional uint32 longTermHistoryInterval = 7; // Deprecated, no longer supported by the platform.
optional LongTermIntervalType longTermHistoryIntervalType = 8; // Deprecated, no longer supported by the platform.
optional uint32 timeSyncFrequency = 9 [default = 86400]; // Time synch frequency (seconds).
optional bytes deviceFixIpValue = 10; // [(nanopb).max_count = 4]; // The fixed IP address of this device.
optional bytes netMask = 11; // [(nanopb).max_count = 4]; // Network mask for fixed IP address.
optional bytes gateWay = 12; // [(nanopb).max_count = 4]; // Gateway address for fixed IP address.
optional bool isDhcpEnabled = 13 [default = true]; // Is DHCP enabled for this device?
// optional bool isTlsEnabled = 14; // Defines if TLS is enabled.
// optional uint32 oslpBindPortNumber = 15; // The port used for TLS connections.
// optional string commonNameString = 16 [default = 'TLS Test']; //[default = 'TLS Test',(nanopb).max_count = 25]; // The common name (CN) used when isTlsEnabled equals true.
optional uint32 communicationTimeout = 14 [default = 20]; // Communication Timeouts (seconds) (wait for answer, socket establish, or server response = comm watchdog for local mode).
optional uint32 communicationNumberOfRetries = 15 [default = 3]; // Communication number of retries.
optional uint32 communicationPauseTimeBetweenConnectionTrials = 16 [default = 60]; // Time between communication attempts.
optional bytes ospgIpAddress = 17; // [(nanopb).max_count = 4]; // The IP address of the platform.
optional uint32 osgpPortNumber = 18; // The port number of the platform.
optional bool isTestButtonEnabled = 19 [default = true]; // Is the test button enabled for this device?
optional bool isAutomaticSummerTimingEnabled = 20 [default = true]; // Is the automatic summer timing enabled for this device?
optional sint32 astroGateSunRiseOffset = 21 [default = 0]; // The calculated sunrise time modified by this value. Time is moved earlier (if offset is negative) or later (if offset is positive). In seconds.
optional sint32 astroGateSunSetOffset = 22 [default = 0]; // The calculated sunset time modified by this value. Time is moved earlier (if offset is negative) or later (if offset is positive). In seconds.
repeated uint32 switchingDelay = 23; // [(nanopb).max_count = 4]; // Switching delay (seconds), array of 4 values. Default 0, 0, 0, 0.
repeated RelayMatrix relayLinking = 24; // Relay linking is a software linking, to may link each relay with each other relay. It is a matrix. Example, if relay 1 is linked with relay 3, if relay 1 will be switched (by OSGP or local by internal scheduler), the relay 3 will switch automatically (on or off, as it set) without new command.
optional bool relayRefreshing = 25 [default = true]; // Is relayRefreshing enabled for this device? Set minutely the nominal relay state and status according to active schedule after power outage and missed switching or anti manipulation.
optional string summerTimeDetails = 26 [default = '0360100']; //[default = '0360100',(nanopb).max_count = 7]; // The time point for DST for Europe is not identical in every country. It should be added as parameters the weekday, month and time point for DST/summer and winter.
optional string winterTimeDetails = 27 [default = '1060200']; //[default = '1060200',(nanopb).max_count = 7]; // The time point for DST for Europe is not identical in every country. It should be added as parameters the weekday, month and time point for DST/summer and winter.
}
// summerTimeDetails string, winterTimeDetails:
//MMWHHmi
//
//where: (note, north hemisphere summer begins at the end of march)
//MM: month
//W: day of the week (0- Monday, 6- Sunday)
//HH: hour of the changing time
//mi: minutes of the changing time
message SetConfigurationResponse {
required Status status = 1;
}
message GetConfigurationRequest {
optional bool present = 1 [default = true];
}
message GetConfigurationResponse {
required Status status = 1;
optional LightType lightType = 2;
optional DaliConfiguration daliConfiguration = 3; // Contains specific configuration for DALI controllers.
optional RelayConfiguration relayConfiguration = 4; // Contains specific configuration for Relay.
optional uint32 shortTermHistoryIntervalMinutes = 5; // Deprecated, no longer supported by the platform.
optional LinkType preferredLinkType = 6;
optional MeterType meterType = 7; // Deprecated, no longer supported by the platform.
optional uint32 longTermHistoryInterval = 8; // Deprecated, no longer supported by the platform.
optional LongTermIntervalType longTermHistoryIntervalType = 9; // Deprecated, no longer supported by the platform.
optional uint32 timeSyncFrequency = 10 [default = 86400]; // Time synch frequency (seconds).
optional bytes deviceFixIpValue = 11; // [(nanopb).max_count = 4]; // The fixed IP address of this device.
optional bytes netMask = 12; // [(nanopb).max_count = 4]; // Network mask for fixed IP address.
optional bytes gateWay = 13; // [(nanopb).max_count = 4]; // Gateway address for fixed IP address.
optional bool isDhcpEnabled = 14 [default = true]; // Is DHCP enabled for this device?
// optional bool isTlsEnabled = 15; // Defines if TLS is enabled.
// optional uint32 oslpBindPortNumber = 16; // The port used for TLS connections.
// optional string commonNameString = 17 [default = 'TLS Test']; //[default = 'TLS Test',(nanopb).max_count = 25]; // The common name (CN) used when isTlsEnabled equals true.
optional uint32 communicationTimeout = 15 [default = 20]; // Communication Timeouts (seconds) (wait for answer, socket establish, or server response = comm watchdog for local mode).
optional uint32 communicationNumberOfRetries = 16 [default = 3]; // Communication number of retries.
optional uint32 communicationPauseTimeBetweenConnectionTrials = 17 [default = 60]; // Time between communication attempts.
optional bytes ospgIpAddress = 18; // [(nanopb).max_count = 4]; // The IP address of the platform.
optional uint32 osgpPortNumber = 19; // The port number of the platform.
optional bool isTestButtonEnabled = 20 [default = true]; // Is the test button enabled for this device?
optional bool isAutomaticSummerTimingEnabled = 21 [default = true]; // Is the automatic summer timing enabled for this device?
optional sint32 astroGateSunRiseOffset = 22 [default = 0]; // The calculated sunrise time modified by this value. Time is moved earlier (if offset is negative) or later (if offset is positive). In seconds.
optional sint32 astroGateSunSetOffset = 23 [default = 0]; // The calculated sunset time modified by this value. Time is moved earlier (if offset is negative) or later (if offset is positive). In seconds.
repeated uint32 switchingDelay = 24; // [(nanopb).max_count = 4]; // Switching delay (seconds), array of 4 values. Default 0, 0, 0, 0.
repeated RelayMatrix relayLinking = 25; // Relay linking is a software linking, to may link each relay with each other relay. It is a matrix. Example, if relay 1 is linked with relay 3, if relay 1 will be switched (by OSGP or local by internal scheduler), the relay 3 will switch automatically (on or off, as it set) without new command.
optional bool relayRefreshing = 26 [default = true]; // Is relayRefreshing enabled for this device? Set minutely the nominal relay state and status according to active schedule after power outage and missed switching or anti manipulation.
optional string summerTimeDetails = 27 [default = '0360100']; //[default = '0360100',(nanopb).max_count = 7]; // The time point for DST for Europe is not identical in every country. It should be added as parameters the weekday, month and time point for DST/summer and winter.
optional string winterTimeDetails = 28 [default = '1060200']; //[default = '1060200',(nanopb).max_count = 7]; // The time point for DST for Europe is not identical in every country. It should be added as parameters the weekday, month and time point for DST/summer and winter.
}
message SwitchConfigurationRequest {
required bytes newConfigurationSet = 1; // [(nanopb).max_count = 1]; // The index of the configuration set (0,1).
}
message SwitchConfigurationResponse {
required Status status = 1; // FIRMWARE_EVENTS_CONFIGURATION_CHANGED Event will be sent, after the Configuration change.
}
message ConfirmRegisterDeviceRequest {
required uint32 randomDevice = 1;
required uint32 randomPlatform = 2;
}
message ConfirmRegisterDeviceResponse {
required Status status = 1;
required uint32 randomDevice = 2;
required uint32 randomPlatform = 3;
required uint32 sequenceWindow = 4;
}
// ========= Monitoring
// Deprecated, no longer supported by the platform.
message GetPowerUsageHistoryRequest {
required TimePeriod timePeriod = 1;
optional uint32 page = 2;
required HistoryTermType termType = 3;
}
// Deprecated, no longer supported by the platform.
message GetPowerUsageHistoryResponse {
required Status status = 1;
repeated PowerUsageData powerUsageData = 2; // [(nanopb).max_count = 20];
optional PageInfo pageInfo = 3;
}
// Deprecated, no longer supported by the platform.
message GetActualPowerUsageRequest {
optional bool present = 1 [default = true];
}
// Deprecated, no longer supported by the platform.
message GetActualPowerUsageResponse {
required Status status = 1;
required PowerUsageData powerUsageData = 2;
}
// ========= Certificate Management
message UpdateDeviceSslCertificationRequest {
required string certificateDomain = 1; // [(nanopb).max_size = 100]; // The domain name of the certificate Server.
required string certificateUrl = 2; // [(nanopb).max_size = 255]; // The relative path of the certificate.
}
message UpdateDeviceSslCertificationResponse {
required Status status = 1;
}
// ========= Key Management
message SetDeviceVerificationKeyRequest {
required bytes certificateChunk = 1; // [(nanopb).max_size = 138]; // Verification key / public key of the platform to check the validity of an incoming message.
}