Grid eXchange Fabric Documentation

  Fix This Page

SetConfiguration

Description

Request to push configuration settings to a device.

Response communicates status.

Message definitions

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;
    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 = 17 [default = 20];                            // Communication Timeouts (seconds) (wait for answer, socket establish, or server response = comm watchdog for local mode).
    optional uint32 communicationNumberOfRetries = 18 [default = 3];                     // Communication number of retries.
    optional uint32 communicationPauseTimeBetweenConnectionTrials = 19 [default = 60];   // Time between communication attempts.
    optional bytes ospgIpAddress = 20; // [(nanopb).max_count = 4];                      // The IP address of the platform.
    optional uint32 osgpPortNumber = 21;                                                 // The port number of the platform.
    optional bool isTestButtonEnabled = 22 [default = true];                             // Is the test button enabled for this device?
    optional bool isAutomaticSummerTimingEnabled = 23 [default = true];                  // Is the automatic summer timing enabled for this device?
    optional sint32 astroGateSunRiseOffset = 24 [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 = 25 [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 = 26; // [(nanopb).max_count = 4];                    // Switching delay (seconds), array of 4 values. Default 0, 0, 0, 0.
    repeated RelayMatrix relayLinking = 27;                                              // 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 = 28 [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 = 29 [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 = 30 [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;
}

Datatypes

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.
}

enum Status {
    OK = 0;
    FAILURE = 1; // general failure
    REJECTED = 2; // request received in wrong state
}

Example

Soap requests and responses sent to and from platform:


   
      LianderNetManagement
      Kevin
      SoapUI
   
   
      
         
         device-01
         
         
            
            
            RELAY
            
            
               
               
                  
                  1
                  
                  1
                  
                  TARIFF
               
               
                  
                  2
                  
                  2
                  
                  LIGHT
               
               
                  
                  3
                  
                  3
                  
                  LIGHT
               
               
                  
                  4
                  
                  4
                  
                  LIGHT
               
            
            
            
            ETHERNET

            864000
            
               192.168.0.110
               255.255.255.0
               192.168.0.1
            
            false
            false
            1234
            TLS Test

            15
            2
            120
            192.168.100.42
            12122
            false
            false
            -15
            15

            
            100
            200
            300
            400

            
            
                1
                true
                
                1
                2
                3
                4
                
                1
                2
                3
                4
            
            
                2
                true
                
                3
                
                3
            
            true
            2016-03-27T01:00:00.000+01:00
            2016-10-30T02:00:00.000+02:00

         
         
         
         

      
   



   
   
      
         
            LianderNetManagement|||device-01|||20161007141853727
            device-01
         
      
   



   
      LianderNetManagement
      Kevin
      SoapUI
   
   
      
         
            LianderNetManagement|||device-01|||20161007141521031
            device-01
         
      
   



   
   
      
         OK
      
   

OSLP SetConfigurationRequest sent to 'device-01':

setConfigurationRequest {
  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: PULSE
  longTermHistoryInterval: 1
  longTermHistoryIntervalType: DAYS
  timeSyncFrequency: 864000
  deviceFixIpValue: "\300\250\000n"
  netMask: "\377\377\377\000"
  gateWay: "\300\250\000\001"
  isDhcpEnabled: false
  isTlsEnabled: false
  oslpBindPortNumber: 1234
  commonNameString: "TLS Test"
  communicationTimeout: 15
  communicationNumberOfRetries: 2
  communicationPauseTimeBetweenConnectionTrials: 120
  ospgIpAddress: "\300\250d*"
  osgpPortNumber: 12122
  isTestButtonEnabled: false
  isAutomaticSummerTimingEnabled: false
  astroGateSunRiseOffset: -15
  astroGateSunSetOffset: 15
  switchingDelay: 100
  switchingDelay: 200
  switchingDelay: 300
  switchingDelay: 400
  relayLinking {
    masterRelayIndex: "\001"
    masterRelayOn: true
    indicesOfControlledRelaysOn: "\001\002\003\004"
    indicesOfControlledRelaysOff: "\001\002\003\004"
  }
  relayLinking {
    masterRelayIndex: "\002"
    masterRelayOn: true
    indicesOfControlledRelaysOn: "\003"
    indicesOfControlledRelaysOff: "\003"
  }
  relayRefreshing: true
  summerTimeDetails: "0360100"
  winterTimeDetails: "1060200"
}

OSLP SetConfigurationResponse sent to platform:

setConfigurationResponse {
  status: OK
}