arrow-left

Only this pageAll pages
gitbookPowered by GitBook
triangle-exclamation
Couldn't generate the PDF for 203 pages, generation stopped at 100.
Extend with 50 more pages.
1 of 100

GXF

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

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

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

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

Architecture Principles

This chapter gives an overview of the principles used defining and implementing the architecture. The following principles were applied:

  • Layering

  • Domain driven design

  • Dependency inversion principle

  • Behavior driven development

hashtag
Layering

The use of layers improves the separation of responsibilities. Each application contains the following layers:

  • Presentation layer: responsible for providing information to users (persons and/or systems) and the handling of user requests

  • Application layer: responsible for executing system tasks including authorisation control

  • Domain layer: responsible for the representation of the problem domain.

Image, Layers:

  1. Audit logger

  2. Web Services

  3. Functions

hashtag
Domain driven design (DDD)

Domain-driven design focuses on the problem domain. DDD's starting point is creating an optimal model for a specific problem domain by having a common language and constructive collaboration between technical and domain experts.

DDD uses the following building blocks:

  • Entity: An object not identified by its attributes but by its own identity.

  • Value Object: an object with attributes but has no own identity.

  • A collection of objects surrounding a specific root entity (or aggregate root). To ensure consistency objects in the aggregate can only be addressed through the aggregate root.

hashtag
Dependency inversion principle

The dependency inversion principle promotes an independent connection by inverting dependency relations. This ensures that the domain model can be very 'clean' without knowledge of the underlying infrastructure (POJO classes). The Spring framework is used to implement the Dependency Inversion principle.

hashtag
Behavior driven development (BDD)

Behavior driven development is a way of programming that first describes behavior in user stories and then implements this in code. The user stories contain scenarios with acceptation criteria that can be automated. This creates a complete test suite for the whole system.

For the application of BDD the following frameworks are used:

  • Cucumber and Gherkin, automated acceptance testing, based on scenarios from stories.

Infrastructure layer: responsible for technical matters supporting other layers. For instance persistence, messaging, etc

Queue
  • Workflow engine

  • Protocol framework

  • Protocol implementations

  • Workflow engine

  • Queue

  • Communication

  • Service: Contains instructions not related to a specific object.

  • Repository: Serves as a collection for fetching and saving objects. Creates an abstraction for actual persistent implementations.

  • Factory: Contains methods to create domain objects.

  • Introduction

    Grid eXchange Fabric

    hashtag
    Introduction to Grid eXchange Fabric (GXF)

    Grid eXchange Fabric was formerly known as the Open Smart Grid Platform (OSGP). GXF is an open, generic, scalable and independent 'Internet of Things' platform, which enables various connected smart objects in the public space to be easily controlled and monitored. Our platform allows the use of any (web)application and with any IP communication infrastructure.

    Our goal is to stimulate the development of smart and sustainable solutions. Smart devices and smart apps play a central role in the development of smart grids and smart societies. The open smart grid platform software enables you to connect to thousands of devices, control them, and monitor their performance. This is done in an open and secure way, so you can use it for your own applications and devices, thereby reducing the time to market and decreasing development costs.

    The names Open Smart Grid Platform and Grid eXchange Fabric will both be found in this document and in the code. In the future we will replace all references to the Open Smart Grid Platform and OSGP by Grid eXchange Fabric and GXF. During this transition period please read Grid eXchange Fabric if you see Open Smart Grid Platform.

    Using the platform

    The Grid eXchange Fabric is used in the following way:

    • A user or operator uses one or more (web) applications to monitor and/or control devices

    • The applications connect to the open smart grid platform via several web services which are divided into functional domains, i.e. Public Lighting, Smart Metering, Power Quality, etc. Third party developers can use the web services for the development or integration of new applications

    • The platform handles all these application requests in a secure way and uses various functions and services to do so (e.g. authorization, authentication, device management, logging)

    More technical and user information about Grid eXchange Fabric can be found in this document. More generic/product information about Grid eXchange Fabric can be found on the .

    hashtag
    Example use case for Grid eXchange Fabric

    Use cases of Grid eXchange Fabric are only limited by your imagination. Here are some examples:

    • Ad-hoc and scheduled Switching of Public Lighting

    • Electrical Transportation

    • Smart Metering

    hashtag
    Getting started

    For the 'translation' and communication of user/operator commands to the various smart devices, the platform uses multiple (open) protocols

  • The platform supports various IP based data telecommunication technologies and protocols to communicate with the devices

  • Traffic Control (LED/matrix signs, traffic lights)
  • Flexible load management ( solar energy and wind energy)

  • Power Quality monitoring

  • Grid eXchange Fabric websitearrow-up-right
    arrow-up-right
    Visit the userguide section to try Grid eXchange Fabric on your local machine
    The Architecture section provides information on platform architecture
    Check out the domain section if you want to know about the the existing domains
    Check out the protocol section to find out more on the existing supported protocols
    Read the open source section how to contribute!

    General platform architecture

    This chapter contains the general architecture and properties of the Open Smart Grid Platform. Domain and protocol specific information can be found in the domain and protocol chapters. This chapter is written for (potential) users, architects and developers.

    Platform properties

    The Open Smart Grid Platform is designed for message based communication.

    • Acts as a connecting link between (web)applications and smart devices

    • The open Source approach prevents vendor lock-in

    • State of the art security

    • Fully scalable, dynamically scaling up and down as more devices and applications are added.

    • Freedom of choice in the desired IP communication infrastructure , e.g. CDMA and GPRS.

    • Stimulates open innovation by using open standards and open source technology

    • Multiple devices and communication protocols are supported

    • Independent of (cloud) hosting infrastructure

    • By de-linking the chain and the use of open standards and the open source license, anyone can build his or her applications on top of the open smart grid platform.

    • The open smart grid platform is optimized to provide reliable and efficient delivery of command and control information for e.g. , direct modules, , gateways and other applications.

    • The open smart grid platform simplifies the implementation of smart devices resulting in a shorter time-to-market by having built-in device management features

    • The platform supports various IP data communication infrastructures to communicate with the devices (internet, lan, GPRS, CDMA, UMTS, etc.).

    • The open smart grid platform also supports authentication and encryption for all data exchanges to protect the integrity and privacy of data as required in e.g. the smart grid.

    • The open smart grid platform supports multiple protocols

    • Easy application integration

    • Supports active-active setup over multiple data centers

    • Adding servers can be done in runtime

    Please note: the Open Smart Grid Platform is not built for streaming data such as video, audio or a stream of high frequency measurement data.

    hashtag
    Unique features of the Open Smart Grid Platform

    The Open Smart Grid Platform is unique due to its multi-dimensional, generic and open design. Because of a true separation of layers and the use of open standards, other suppliers and/or third parties are able to develop and market innovative solutions.

    1. The platform is multi-dimensional. This means that several customer use cases (with separate business models) are able to use the various device functions. One single application could use the same function of different devices.

    2. The generic design ensures that the platform can be used in a flexible way for several functions and applications (e.g. public lighting services and smart meter services).

    3. The platform is aimed at the 'common parts' of the technology chain; suppliers or vendors (of both applications and devices) have no competitive advantage in delivering these kind of services.

  • The platform layers are truly separated by open standards and the platform is made available as open source software.

  • The platform does not store any application data (the platform is thus stateless ). No messages/commands will ever get lost.

    This enables third party vendors and developers to deliver innovative applications which are competitive in both rich functionalities and the generated data.

  • smart metersarrow-up-right
    load controlarrow-up-right
    solar panelsarrow-up-right

    Architecture functional layers

    hashtag
    Functional view

    Image, functional layers overview

    hashtag
    Starting architecture

    The Functional view shows an overview of the most important functions of the system. The two images below show the starting architecture and functional reference architecture respectively.

    Image, functional starting architecture

    1. Web applications

    2. Open Smart Grid Platform

    3. Web services

    hashtag
    Functional Reference

    This model partitions the system in seven functional clusters (vertically) which are shown on the system layers (horizontally). The circled numbers refer to image 1.

    Image, functional reference architecture

    Vertical clusters:

    • Device installation

    • Device management

    • Firmware management

    Horizontal System layers:

    • Web applications

    • HTTPS/SOAP communication

    • Platform

    Basic functions
  • Database

  • Communication infrastructure (CDMA/GPRS/Ethernet)

  • IP infrastructure

  • Open Street Light Protocol (OSLP)

  • Public Street Lighting Device (PSLD) or Sub Station Lighting Device (SSLD)

  • Configuration management
  • Schedule management

  • Ad-hoc control and status

  • Monitoring

  • Open protocols
  • Smart devices

  • Architecture introduction

    hashtag
    Basic Architecture

    The basic architecture

    alt

    Basic Overview

    hashtag
    Layered architecture

    The Open Smart Grid Platform environment consists of five layers:

    1. Web services layer

    2. Domain logic layer

    3. Open Smart Grid Platform Core layer

    hashtag
    Web services layer

    In this layer the web services are exposed to the outside world. Applications can connect to the web services to implement the required functionality of the open smart grid platform. The web services are divided into functional domains, i.e. Public Lighting, Smart Metering, Power Quality, etc. Additional functional domains can be created.

    hashtag
    Domain logic layer

    Every functional domain has a separate set of web services and a corresponding domain logic block. In the domain logic block the business logic of that functional domain can be found. This is where a functional command will be translated into a generic intermediate format. For example, in the case of public lighting the command "Turn light on" will be translated into a command like "set switch(1) in closed position". In this layer it could also be decided that one functional command results in multiple commands to a device. The domain logic is closely related to the web services layers and can be added as well.

    hashtag
    Open Smart Grid Platform core layer

    In the core of the Open Smart Grid Platform the following generic functions are found:

    • Device management

    • Time synchronization

    • Firmware management

    hashtag
    Protocol layer

    The different protocol adapters are found in this layer. Here the generic intermediate format of a command for a specific device will be translated into the protocol message the device understands. This message will be sent to the device. A retry mechanism has been implemented to prevent communication failure in the case that the receiving end is temporarily unavailable. The listeners for messages initiated by a device are implemented here. Examples are the DLMS/COSEM protocol adapter for smart meters.

    hashtag
    Devices

    Any device in the public space with an Internet connection may be connected to the platform. The platform is independent of the device used, therefore this part of the set-up is not part of the platform.

    Security

    hashtag
    Security

    The following security measures can be used in a hosted environment:

    hashtag
    Cloud security

    • DDOS protection

    • IPSEC VPN connections

    • IP whitelisting

    Most cloud environments support these features.

    hashtag
    Operating System

    • Hardened operating systems (according to Center of Internet Security)

    hashtag
    Platform security

    • Communication over TLS

    • Firewalls between all servers and layers

    • Certificates from a recognized Certificate Authority (CA)

    For every major release there will be a mandated security test initiated by Alliander.

    In cooperation with the European Network of Cyber Security (ENCS) state of the art security measures were implemented.

    • Security per device

    • Security per application

    • Security Certificates per Organisation and per device

    Security measures: 1. Firewall in defined zone 2. Operating System Hardening 3. DDOS protection 4. Replay attack prevention 5. Private encryption key per device 6. Certificates from a Certificate Authority 7. Encryption via Elliptic Curve DSA 8. IPSEC VPN for CDMA and GPRS 9. Unique device identification 10. Unique CDMA modem number 11. Role based authorizations on functions and devices

    hashtag
    Encryption

    An analysis of safety aspects has led to the decision that the safety of the whole system will be realized by proven technology based on asymmetrical coding (also known as public-key encryption).

    hashtag
    Authentication of web applications

    Two-way SSL will be used between web applications and the Open Smart Grid Platform to verify the identities for both client and server. User organisations are responsible for the administration of the identity of and access to their web applications. The web applications feature a login page. After successful login the user is linked to an organisation. Passwords will be stored with encryption. The organisation ID will be sent in each message to the Open Smart Grid Platform and will be verified by the SSL certificate.

    hashtag
    Algorithms

    Only public encryption Algorithms will be used. Due to performance limitations (of the devices) and recommendations from The European Network for Cyber Security (ENCS) Elliptic Curve DSA with 256-bit-keys was selected. This improves the security and efficiency over the 1024 bit RSA algorithm. Messages can be smaller and less processor capacity is needed. The key length of Elliptic Curve DSA is similar to the 3072 bit key length of RSA.

    Note: Even though the open smart grid platform uses ECDSA to secure the OSLP, other encryptions may be used as well. The RSA Algorithm is still supported if preferred. This is a flexible configuration option.

    hashtag
    Private APN

    A private APN is used for linking to mobile data communication infrastructures.

    hashtag
    Logging

    • Every action to and from devices is logged in the audit trail

    • Messages from unknown devices will be denied (and logged)

    Logical Authorisation Model

    hashtag
    Authentication of open smart grid platform

    The Open Smart Grid Platform contains an extensive authorization model, which enables a device owner to give certain rights on certain devices to other organizations. Every organization will only see devices they have rights to.

    This model displays the most important entities of the open smart grid platform system and their mutual relationships.

    Image of Logical Authorisation Data Model

    The logic of the model above:

    At the top of the image is the entity "authorisation". This represents the permissions of an organization on a certain device. In general an organisation will have a lot of permissions, at least one for each device it needs to manage.

    The functions an organisation can execute on a device are determined by the function group the authorisation refers to. Function groups are collections of functions and are predefined in the software. The following function groups have been predefined.

    • Owner-group (this contains all functions)

    • Ad hoc-group (Functions for ad hoc switching of lighting)

    • Management-group (Platform functions)

    This structure provides maximum flexibility when assigning rights to devices. Devices always belong to an Owner. An owner is an organisation, but not every organisation is an owner. A device can have more than one owner. The entity "Event", at the bottom of the image, is the execution of a function by an organisation on a device.

    Details like device-type, device-status, etc. have been omitted from this model.

    One security requirement is that each event must be traced back to a 'natural' person, also known as an audit trail. Although the open smart grid platform does not register individual users we can meet this requirement by registering a data-item with each event. This enables the user organisation to investigate which events belongs to which 'natural' person. This data-item can for example be an user-ID provided by the user organisation which doesn't have to be unique in the open smart grid platform.

    Table describing the entities in the logical data-model

    An organization can get rights to one or more function groups, and thus all functions in that function group will be available to this organization.

    To ensure that devices can only receive instructions from a 'genuine' open smart grid platform it must be possible to authenticate the open smart grid platform. This is implemented through a standard technology based on asymmetric encryption (if supported by the Device). The open smart grid platform will receive a unique key to enable the devices to tell if the messages come from a 'genuine' open smart grid platform. Both OSLP and DLMS device types use this kind of encryption. To prevent replay-attacks each message will get an index number (this is standard practice as well).

    hashtag
    Authentication of devices

    To ensure that the open smart grid platform can distinguish between 'genuine' devices and 'illegal' devices, all devices are supplied with a manufacturer key. Each device has a unique key. Because of the asymmetrical encryption the platform contains the public part of each key. In this way devices can be identified by their unique key and their unique hardware ID. The device-ID will be encrypted in each message sent from the device to the platform.

    All communication between the open smart grid platform and the devices will be signed with these keys to ensure (1) the source is legitimate and (2) to ensure the integrity of the message. It is not necessary to encrypt the whole message because confidentiality is not important. This results in a less computationally intensive process.

    When a key is stolen (by hacking a device) this will not affect the integrity of the other devices. Each device has an unique key after all and only the hacked device has to be excluded from communication in the platform.

    The security is independent from the carrier (GPRS, CDMA, Ethernet, etc.). The open smart grid platform supports symmetric and asymmetric encryption (depends on device and protocol).

    For OSLP devices, the firmware will be used to distribute keys to devices. In this way we can use the existing secure firmware update mechanism for updating keys and certificates. DLMS devices use a mechanism to switch keys that is not dependent on firmware updates.

    Additional security may be provided by using TLS communication.

    hashtag
    Authorisation of organisations

    Authorisation for use of the platform functionalities is handled by function groups. Function groups are defined for both platform functionality and device functionality. Each function group has one or more functions. Access to device functions can be set per device. The tables below show an overview of all function-groups and device-functions and platform-groups and platform-functions respectively.

    Redundancy

    This chapter describes the possibilities of a redundant set up of the Open Smart Grid Platform. The Platform is designed to run in a High Available (or HA) environment, and to prevent data loss due to unexpected failures. Each component of the Platform is designed to be stateless. Components communicate with each other using message queues, which are processed in an asynchronous way.

    hashtag
    Active-active

    In an active-active setup, multiple instances of each component (eg. Web Services, Core, Protocol Adapter) process the data at the same time. Traffic is equally distributed across the instances. In case of a defect in one instance the traffic is automatically processed by the remaining instance(s). The Open Smart Grid Platform is designed to run in such a set up, and thus preventing down time in case of a failing server. Each component of the Platform can run in an independent, redundant and scalable way.

    hashtag
    Database

    The Open Smart Grid Platform uses a PostgreSQL database. PostgreSQL supports multiple database servers. For example, a slave and master node, where the slave node continuously replicates the master node. In case the master node fails, the slave mode is triggered and will stop replicating from the master node, execute a recovery and will become the master node.

    hashtag
    ActiveMQ

    The components of the Platform communicate with each other through a Message Queue. The Open Smart Grid Platform uses Apache Active Message Queue, which makes asynchronous communication possible between components. The components can register to the queues as consumers. In case a consumer (e.g. a server running a component of the platform) is down, the message will still be consumed by the remaining consumer(s). The Message Brokers can be used as a MasterSlave. In case the Master message broker is down, you get immediate fail-over to the slave without loss of messages.

    Platform components description

    hashtag
    Application Layering

    The use of layers improves the separation of responsibilities. Each application contains the following layers:

    • Presentation layer: responsible for providing information to users (persons and/or systems) and the handling of user requests

    • Application layer: responsible for executing system tasks including authorization control

    • Domain layer: responsible for the representation of the problem domain.

    • Infrastructure layer: responsible for technical matters supporting other layers. For instance persistence, messaging, etc

    Layers:

    hashtag
    Authentication and authorization

    The web server is configured with a SSL certificate to encrypt the incoming and outgoing communication. The SOAP Web service (Spring Framework web service) uses a Java Keystore and a certificate for each organization. Only organizations that are known within the platform are authorized to use the web service.

    hashtag
    Application integration layer

    For the several functional domains separate SOAP Web services are offered. This separation offers authorization per functional domain. Each of the web service components send a queue message to the corresponding domain component.

    WSDL A separate WSDL is implemented for each functional cluster. All SOAP operations have a request object parameter and return a response object. For Synchronized Web Services the result is immediately included in the response. For asynchronous web services the response contains a correlation ID. This Correlation ID is to be used by the requester to receive the actual result from the platform. The following diagram is an example of such an asynchronous request.

    Furthermore each SOAP message has a header which contains the user's organisation ID. This table displays an overview of the WSDL's including operations and fields in the request and response objects.

    SOAP vs. REST

    SOAP is chosen in the open smart grid platform web services over REST for the following reasons:

    • REST is resources/data oriented (put, get, delete) while the open smart grid platform is function/method oriented

    • SOAP has the advantage of having a contract (WSDL)

    • SOAP has extensive security features that are being used in the open smart grid platform to meet the high security demands/requirements requested by e.g. the energy utilities

    The benefits of REST (e.g. speed / less overhead) does not outweigh the benefits of SOAP. More general information on this topic can be found .

    hashtag
    Domain logic layer

    For each functional domain business logic is implemented using a separate domain component. Common functionality like authorization should be abstracted to a shared component. Domain components receive queue messages from web service components and send queue messages to the open smart grid platform core component.

    More information on the specific domains can be found in the

    hashtag
    Open Smart Grid Platform Core Services

    The open smart grid platform core component receives queue messages from domain components. These messages from domain components are forwarded to a protocol adapter project. The open smart grid platform core component also offers logic for a protocol adapter project to send the response of a smart device back to a domain project. The Core component routes messages from domain adapter components to protocol adapter components and vice versa. The core layer also contains a workflow engine.

    The internal database model in the core layer:

    ERD's made with Valetina Studio

    Overview of platform data model:

    Data model explanation:

    The platform will store as little data as possible. Generic (and domain specific) devices attributes are stored in core DB.

    hashtag
    Protocol Layer

    The open smart grid platform supports multiple protocols.

    • OSLP (Open Street Light Protocol)

    • DLMS/COSEM

    • IEC61850

    The protocols can use one of the security layers:

    • TLS (Transport Layer Security encryption)

    • SSL (Secure Sockets Layer encryption)

    Other protocols can be easily added to the platform. If possible, we prefer protocols based on open standards. A comprehensive list of protocols that are currently supported can be found in the .

    Protocol specific device attributes are stored in the protocol adapter DB

    hashtag
    Queues

    Open smart grid platform components connect to each other through message queues.

    • Transactions on messages to and from the queues

    • Messages are persisted on the queues

    • Queues are clustered for reliability and speed

    hashtag
    Smart devices

    The open smart grid platform can connect to any device that supports one of the supported protocols. Smart devices can receive messages from or send messages to protocol adapter components. In case of SSLD's this is done using TCP/IP over mobile internet connections (e.g. GPRS, CDMA, etc.). The communication is encrypted using public key cryptography.

    TimeBehavior

    Time behavior is mainly important in the Flexovl application when a lot of devices have to be addressed in a short period of time over a wireless network. Both latency and limited bandwidth have to be taken into consideration while demanding the coordinated on and off switching of the lighting, since we want to avoid the Christmas tree effect.

    • Time synchronization: devices periodically register with the platform and receive a time.

    • Protocol: because of the limited bandwidth an efficient protocol "protobuf" was selected.

    Points of interest:

    • Light metering messages

    • When the SSLD's are disabled the PSLDs cannot be addressed

    Because of these points of interest we use message queueing combined with a retry mechanism of delayed delivery.

    The platform and devices use UTC time. The OSLP protocol between platform and devices uses UTC time as well.

    Internationalization and localization

    The platform and devices use UTC time. The OSLP protocol between platform and devices uses UTC time as well.

    Protocol layer
  • Device layer

  • Workflow engine
  • Device installation services

  • Scheduler

  • Device status monitoring

  • Routing of device commands to appropriate device protocol

  • Audit trail on all actions throughout the platform
  • Role based authorizations on specific functions of devices

  • Access control

  • Unique device identification

  • All communication is encrypted
    Functional Layers Overview
    Private APN
    Installation-group (Functions to install devices)
  • Firmware-group (Functions for updating firmware)

  • Schedule-group (Functions to create lighting schedules)

  • Tariff scheme-group (Functions to create tariff groups)

  • Configuration-group (Functions to configure devices)

  • Monitoring-group (Functions to monitor devices)

  • A party playing a role in the management and control of the devices, for example municipalities.

    owner

    An organization role. Each device has an owner.

    event

    An event reported by the device (which is not the action of a natural person) for example an error or security problem.

    FIRMWARE

    SCHEDULING

    TARIFF_SCHEDULING

    CONFIGURATION

    MONITORING

    GET_DEVICE_AUTHORISATION

    X

    X

    X

    X

    X

    X

    X

    X

    X

    SET_DEVICE_AUTHORISATION

    X

    START_SELF_TEST

    X

    X

    STOP_SELF_TEST

    X

    X

    SET_LIGHT

    X

    X

    GET_STATUS

    X

    X

    RESUME_SCHEDULE

    X

    X

    SET_REBOOT

    X

    X

    SET_TRANSITION

    X

    X

    SET_EVENT_NOTIFICATIONS

    X

    X

    GET_EVENT_NOTIFICATIONS

    X

    X

    REMOVE_DEVICE

    X

    X

    UPDATE_FIRMWARE

    X

    X

    GET_FIRMWARE_VERSION

    X

    X

    SET_SCHEDULE

    X

    X

    SET_TARIFF_SCHEDULE

    X

    X

    SET_CONFIGURATION

    X

    x

    GET_CONFIGURATION

    X

    X

    GET_ACTUAL_POWER_USAGE

    X

    X

    GET_POWER_USAGE_HISTORY

    X

    X

    GET_MESSAGES

    X

    FIND_DEVICES

    X

    SET_OWNER

    X

    Entity

    Description

    authorization

    Authorization – Permissions of an organisation to execute a certain function (member of a role) on a certain device

    device

    Electronics present in a "container" (for example a lamp post), connecting to the open smart grid platform and (in case of a lamp post) controls the lights. One device has one owner.

    audit trail

    The actions of an organization on a device. A combination of [time, organization, function and device].

    function

    An end-to-end operation. For example "set schedule". A function belongs to multiple function groups.

    function group

    Usually this will be larger groups than the "function clusters" in this document. All functions available to end users could be in a single group for example.

    Groups

    Functions

    OWNER

    INSTALLATION

    AD_HOC

    Groups

    Functions

    ADMIN

    USER

    CREATE_ORGANISATION

    X

    GET_ORGANISATIONS

    X

    X

    GET_DEVICE_NO_OWNER

    organization

    MANAGEMENT

    X

    Energy companies are generally not progressive in terms of technology. SOAP is acceptable for energy companies and REST is sometimes seen as new and insecure.

    Audit record for tracking webservice activity.

    By using queues, the open smart grid platform can be stateless

    Table

    Description

    devices

    Devices table

    device_authorisation

    Authorisation table, function group column concerns the device functions (AD_HOC, INSTALLATION, etc)

    organization

    Organization table, function group column concerns the platform functions (ADMIN of USER)

    event

    Events table

    oslp_log_item

    Table for logging of OSLP messages.

    onlinearrow-up-right
    domain chapter
    protocols chapter
    Layers
    A-Sync Web Service Request
    Additional tables core
    Data Model
    Queues

    webservice monitor log item

    Redundancy

    Scalability

    The Open Smart Grid Platform is designed and built for scalability and reliability

    • Messages will never get lost, In the worst case scenario, a message will be sent to the dead letter queue.

    • Any layer of the platform can be independently scaled up- and down

    • Adding servers can be done runtime

    • It can run in an active-active setup over multiple servers and data centers. In our cloud hosted setup even over sets of data centers in different countries.

    Message flow examples

    This are some examples how a message flows in the Open Smart Grid Platform.

    hashtag
    Message Flow: Request/Acknowledge/Poll

    Request/Acknowledge/Poll

    Step

    Description

    hashtag
    Message Flow: Request/Acknowledge/Notify

    *In case the response is not timely retrieved by the client app, OSGP will resend the notification with correlation id to the client app. The amount of retries is configurable.

    Technical Overview

    This chapter gives a more technical overview. It describes each layer of the platform by giving an overview of its packages and the code it contains. Furthermore it describes how a message proceeds through the platform. If you are planning on adding your own Domain Adapter or Protocol Adapter, it will be useful to read this chapter to get a feeling of how the Platform has been built.

    hashtag
    A Request through the Platform

    The picture below depicts an example of a request (OSLP SetLight request) proceeding through the platform to a device.

    • A web request enters the platform at its EndPoint, which in turns calls the RequestService. The RequestService checks if the organisation in the request is authorized, creates the request message and sends it to the MessageSender which in turn puts it on the queue of the Domain Adapter.

    • In the Domain Adapter, the incoming message is processed in the MessageProcessor, which in turn calls the Request Service. Here the message is converted to a DTO object. The CoreRequestMessageSender puts the message on the Core Queue.

    • The MessageListener in Core receives the message. The DeviceRequestMessageService contains generic functionality such as Authorization, Validation, etc. Once these procedures are completed, the message is routed to the appropriate protocol adapter.

    • In the Protocol Adapter the message is received by the MessageListener. It is processed through the MessageProcessor and OslpDeviceService. The request eventually ends up in the OslpChannelHandler, where the actual Protocol Request to the device is made.

    For a detailed description of each layer, please take a look at a more detailed description of each layer in this chapter.

    hashtag
    Configuration files

    The Platform uses property files for certain settings (such as JMS settings, Persistence settings, etc.). These files are stored in property files which can be found in the Config repository on Github. These files are sym linked to /etc/osp/, where the Platform (through reference in context.xml) looks for the property files.

    Performance

    This chapter describes the results of a performance test, to give potential users an indication of the system requirements for the platform.

    The Platform was tested with the following AWS setup:

    Systems:

    • Specifications Component Server: 2 CPU's, 8 GB RAM

    Core Layer

    The Core layer of the Open Source Grid Platform is responsible for Validation, Translation, Authorisation and Routing of request messages. It also contains all the Domain Objects.

    The core layer consists of two components:

    • osgp-domain-core: Shared Domain objects, services, repositories, etc. These classes are used through the entire platform.

    • osgp-core: Logic for routing domain requests, scheduling, retrying, etc.

    Web Services Layer

    The Web Services layer contains the web services that are used to communicate with the Platform. The Open Source Smart Grid Platform uses the Simple Object Access Protocol or SOAP to expose its interfaces. The Web Services Adapter receives requests and sends those to the Domain Adapter. An incoming request is converted to a Domain Object, and put on the MessageQueue of the Domain layer. The Web Services layer also has a queue for incoming responses from the Domain adapter.

    Each domain of the Platform has its own web services:

    hashtag
    Generic

    Specifications Database Server: 1 CPU, 2 GB RAM

    Setup:

    • Front-end: 2x Component Server

    • Middle-end: 2x Component Server

    • Back-end: 2x Component Server

    • ActiveMQ Front-Middle: 1x Component Server

    • ActiveMQ Middle-Back: 1x Component Server

    • Databases: 1x DB Server

    For the test to succeed, two requirements were to be met:

    1. Switch 10.000 simulated OSLP devices under 5 minutes.

    2. Switch 40.000 simulated OSLP devices under 5 minutes.

    The results showed that both tests succeeded.

    hashtag
    General Package structure: osgp-domain-core

    • entities: Defines the entities used for persistence.

    • exceptions: Domain specific exceptions reside here.

    • repositories: Repositories that contain logic for persisting entities.

    • services: Domain services that reference a repository.

    • specifications: Interfaces that define specifications for Devices and Events.

    • validations: Validators and constraints.

    • valueobjects: Definitions of the Domain Objects.

    hashtag
    General Package structure: osgp-core

    hashtag
    application

    • config: Contains the configuration files for the Component. Uses the property files in /etc/osp/.

      -- ApplicationContext

      -- OsgpCoreInitializer

      -- DomainMessagingConfig

      -- PersistenceConfig

      -- ProtocolMessagingConfig

      -- SchedulingConfig

    • services: Services that process device requests/ responses. Checks for authorization, and if the request is supported by the platform, it will be routed to the appropriate protocol adapter.

    • tasks: Contains task scheduler logic.

    hashtag
    domain.model

    These packages contain interfaces for the Services.

    • domain: Interfaces for the Domain services.

    • protocol: Interfaces for the Protocol services.

    hashtag
    infra.jms

    • domain: Contains Messages, MessageListeners and MessageProcessors for Domain related messaging.

    • protocol: Contains Messages, MessageListeners and MessageProcessors for Protocol related messaging.

    Core - osgp-adapter-ws-core: Contains the Core (common) web services.

  • Admin - osgp-adapter-ws-admin: Contains the Admin web services.

  • Shared - osgp-adapter-ws-shared: Contains shared endpoints, such as header authorization

  • Database - osgp-adapter-ws-db: Contains repositories for persistence.

  • hashtag
    Domain

    • Public Lighting - osgp-adapter-ws-publiclighting: Contains the Public Lighting web services.

    • Smart Metering - osgp-adapter-ws-smartmetering: Contains the Smart Metering web services.

    • Tariff Swithcing - osgp-adapter-ws-tariffswitching: Contains the Tariff Switching web services.

    • Microgrids - osgp-adapter-ws-microgrids: Contains the Micro Grids web services.

    • Distribution Automation - osgp-adapter-ws-distributionautomation: Contains the Distribution Automation web services.

    For a description of the WSDL's see the Domain Chapter.

    hashtag
    General Package structure

    A description of the general package structure of a web service component.

    hashtag
    application

    • config: Contains the configuration files for the Component. Uses the property files in /etc/osp/.

      -- ApplicationContext

      -- AdapterInitializer

      -- MessagingConfig

      -- PersistenceConfig

      -- WebServiceConfig

    • exceptionhandling: Exceptions are defined here.

    • mapping: Custom Orika converters.

    • services: Contains services used by the domain, such as AdHocManagement. These are called by the end points and convert the request to a Domain Object and put the request on the domain message queue using the JMS classes.

    hashtag
    endpoints

    • EndPoints for the web services: contain a reference to a service that proceeds with handling the request.

    hashtag
    infra

    • jms: contains the JMS classes such as:

      -- MessageSender(s)

      -- MessageType

      -- ResponseMessageFinder

    hashtag
    webapp

    The WSDL and schema definitions can be found under main/webapp/WEB_INF/wsdl.

    Non-functional overview

    The non-functional view is an overview of the most significant non-functional demands.

    The identified non-functional demands are:

    • Time Behavior

    • Extensibility

    • Internationalisation and localisation

    • Security

    • Scalability

    WS adapter retrieves (and deletes) response from DB

    14

    WS adapter sends soap response to the client app

    1

    WS adapter receives client soap request with organization certificate and organization id in soap header

    2

    WS adapter authenticates organization, checks authorizations and sends request message to domain adapter (via queue)

    3

    WS adapter returns soap acknowledgement with correlation id

    4

    Domain adapter sends request message to core (via queue)

    5

    Core determines protocol for device and sends request message to protocol adapter (via queue)

    6

    Protocol adapter translates domain request message, sends request to device and receives response from device

    7

    Protocol adapter sends response message to core (via queue)

    8

    Core forwards response message to domain adapter (via queue)

    9

    Domain adapter forwards response message to response queue

    10

    Client app polls for response using correlation id (with organization certificate and organization id in soap header)

    11

    WS adapter retrieves response message from response queue

    12

    WS adapter sends soap response to client app

    Step

    Description

    1-8

    Same as request/acknowledge/poll message flow

    9

    Domain adapter forwards response message to WS adapter

    10

    WS adapter stores response in DB

    11

    WS adapter sends soap notification with correlation id to the client app*

    12

    Client app sends soap request with correlation id to retrieve the response

    Request/Acknowledge/Notify

    13

    Scalability

    Throttling

    Throttling is used to limit the flow into communication channels that need it. The GXF platform has throttling support for CDMAarrow-up-right and SMSarrow-up-right/texting.

    hashtag
    CDMA throttling

    The CDMA network uses base transceiver stationsarrow-up-right (BTS) with cells for each BTS.

    Throttling occurrs on the number of concurrent connections per BTS/cell. GXF offers a throttling service that hands out permits per BTS/cell while maintaining the configurable limit.

    An application will typically use this service like this:

    hashtag
    SMS/texting throttling

    SMS can be used to wake up certain types of devices. Throttling in this context means limiting the number of messages per second to a configurable rate.

    Domain Layer

    The Domain Adapters are responsible for receiving requests from the Web Services layer, and delivering them to the Core layer. The Domain Layer mainly contains MessageProcessors and Services for request handling.

    The Core/Admin components contains the shared functionality, while the Domain components contain additional domain specific functionality.

    At the moment the Platform uses the following Domain Adapters:

    Generic

    • Core - osgp-adapter-domain-core: Contains Core (common) functionality; AdHocManagement, FirmwareManagement, etc.

    General User's Guide

    Sys Admins who are tasked with keeping the Open Source Grid Platform running on a environment, can find some information in this chapter.

    hashtag
    Get Started

    To get started with Open Source Grid Platform, please read our . The Introduction offers an excellent overview of the Platform and its features.

    A next step could be to have a look at the WSDL's to understand which functions are present per functional domain. Depending on the functional domain one is interested in, one could also have a look at the Protocol Adapter and device simulator for the domain.

    Installation Guide

    To get started quickly, a has been created and a guide for .

    The goal of the installation manual is to control a simulated OSLP device through the Platform. Below, is a summary of all steps involved. See the next chapters for a detailed guide with screenshots. Please follow the steps carefully.

    A summary of the steps involved:

    • Creating a virtual machine using Vagrant and Virtual Box

  • Admin - osgp-adapter-domain-admin: Contains Admin functionality, e.g. DeviceManagement.

  • Domain

    • Public Lighting - osgp-adapter-domain-publiclighting: Contains functionality for the Public Lighting Domain.

    • Smart Metering - osgp-adapter-domain-smartmetering: Contains functionality for the Smart Metering Domain.

    • Tariff Switching - osgp-adapter-domain-tariffswitching: Contains functionality for the Tariff Switching Domain.

    • Microgrids - osgp-adapter-domain-microgrids: Contains functionality for the Micro Grids domain.

    • Distribution Automation - osgp-adapter-domain-distributionautomation: Contains functionality for the Distribution Automation domain.

    hashtag
    General Package structure

    hashtag
    application

    • config: Contains the configuration files for the Component. Uses the property files in /etc/osp/.

      -- ApplicationContext

      -- DomainAdapterInitializer

      -- MessagingConfig

      -- PersistenceConfig

    • mapping: Custom Orika converters for mapping to/from DomainObjects/DTO Objects.

    • services: Contains most of the domain logic, related to the specific services of the adapter. The service classes converts DTO objects to Domain objects (or vice versa), and put the request on the Core queue through the JMS classes.

    hashtag
    infra

    • jms.core: Inbound/outbound messages from/to the Core layer.

      This package contains Messages, MessageListeners, MessageSenders and MessageProcessors for sending requests to the Core Queue, or receiving and processing responses from Core.

    • jms.ws: Inbound/outbound messages from/to the web services layer.

      This package contains Messages, MessageListeners, MessageSenders and MessageProcessors for sending requests to the Web Services Queue, or receiving and processing responses from the web services layer.

    hashtag
    Installation

    If a full installation is desired, have a look at our Installation Guide. This can be used to setup a development environment which can be used to start the Platform and run it. Installation on one or several servers can be derived from the steps within the Installation Script.

    Introduction

    Run the puppet script (part of the Vagrant installation), or complete the steps manually (Manual installation)

  • Importing Maven Projects into Eclipse

  • Creating an Apache Tomcat9 Server

  • Setting Up Apache Tomcat9 Server Context

  • Deploying all open smart grid platform components to an Apache Tomcat9 Server

  • Starting Apache ActiveMQ

  • Starting Apache Tomcat9 Server

  • Creating the 'test-org' organization in the Database

  • Setting up SoapUI

  • First SOAP Requests to add a device to the open smart grid platform

  • Opening Device Simulator to add a device

  • Registering a device

  • Using 'SetLight' SOAP Request to switch the light on

  • Vagrant Installation Guide
    Manual Installation
    Sequence diagram CDMA throttling

    Protocol Layer

    The Protocol Adapters are responsible for the actual communication to and from a device. They usually operate in a certain domain, and might use common/ generic functions from the platform.

    The Open Smart Grid Platform currently has the following protocol adapters:

    • Protocol-Adapter-DLMS: Smart Metering

    • Protocol-Adapter-IEC61850: Public Lighting, Micro Grids and Distribution Automation

    • Protocol-Adapter-OSLP: Public Lighting and Micro Grids

    hashtag
    General package structure

    hashtag
    application

    • config: Contains the configuration files for the Component. Uses the property files in /etc/osp/.

      -- ApplicationContext

      -- MessagingConfig

      -- OsgpProtocolAdapterOslpInitializer

      -- OslpConfig

      -- OslpPersistenceConfig

    hashtag
    device

    Contains the Protocol Adapter Objects used for the Protocol Adapter.

    • requests: Objects representing the requests that are supported by this adapter.

    • responses: Objects representing the responses that are supported by this adapter.

    hashtag
    domain

    • entities: Entities used for persistence.

    • repositories: Repositories used for persistence.

    hashtag
    exceptions

    Contains the exceptions that might be thrown while communication with a device, e.g. ValidationException, MessageRejectedException, etc.

    hashtag
    infra

    This package contains all the code for communication through JMS (Platform) and Networking (Device).

    • messaging: Contains the JMS Messages, MessageListeners, MessageSenders and MessageProcessors.

    • networking: Contains the classes that are responsible for connecting to a device using a certain protocol.

    hashtag
    services

    Services used to check the request status.

    mapping: Custom Orika converters.

  • services: Contains the (functional) services that control communication from (and to) the device. Also persists requests and responses, and deals with security. Actual communication is done through the classes in the infra package.

  • Use cases

    The open smart grid platform use-cases are strongly related to the open smart grid platform domains. Up-to-date information on use-cases can be found on the Grid eXchange Fabric websitearrow-up-right.

    Installation

    To install the platform you can use one of the following procedures.

    1. The Vagrant Installation. This procedure creates and installs a complete image with the Open Smart Grid Platform pre-installed, including all the tools such as Maven, Eclipse, SoapUI, etc.

    2. The Manual Installation. Follow this guide if you want to install the Open Smart Grid Platform yourself.

    GitHub configuration

    hashtag
    Basic configuration

    In order to use git correctly you need to execute the following commands in a terminal if you haven't done so already:

    hashtag
    Contributors License Agreement (CLA)

    GXF is covered by . You have to sign/agree to it in order to commit changes. Most likely you will have to sign the individual agreement, unless you work for a licensed company.

    Your pull request will detect if you haven't signed it yet and instructions are given on how to continue.

    hashtag
    Developer Certificate of Origin (DCO)

    GXF uses GitHub's application, so you need to sign-off your commits.

    Your pull request will detect if you haven't signed-off your commits and instructions are given on how to continue.

    hashtag
    Command line

    Just add -s to git commit ....

    Note this is the lower case -s (short for --signoff).

    With git merge ... you can add --signoff as the shorter -s is used to set the merge strategy.

    hashtag
    Eclipse

    In some versions of Eclipse you can click the button to "Add Signed-off-by" in the Git Staging view:

    hashtag
    IntelliJ

    In the commit toolwindow, click the settings icon and check the 'Sign-off commit' checkbox:

    Technology Stack

    hashtag
    Platform

    • Apache ActiveMQarrow-up-right: Open source messaging server, used to relay messages between components of the open smart grid platform. ActiveMQ is an open source message broker written in Java and a full Java Message Service (JMS) client. It provides "Enterprise Features" which in this case means fostering the communication from more than one client or server.

    • : Web server, used as front for Apache Tomcat.

    • : Provides a "pure Java" servlet container for Java code to run in.

    • : PostgreSQL administration and management tools.

    • : A language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more.

    • : Agile database migration framework for Java

    • : JDBC connection pool

    • : Object/Relational mapping

    • : Network application framework for protocol servers & clients

    • : Library implementing the IEC61850 and DLMS/COSEM communication standard

    • : Java bean mapping

    • : Application development framework. Several Spring libraries are used, including Spring Data, Spring Security and Spring WS.

    • : Application for Automatically delivering, operating and securing your infrastructure

    hashtag
    Development

    • : Package manager for Javascript packages. Web applications consist of various components; frameworks, libraries, assets, utilities, and rainbows. Bower manages all these things for you.

    • : IDE for developing software.

    • : FTP application.

    hashtag
    Testing &QA

    • : Application designed to load test functional behaviour and measure performance.

    • : automated acceptance testing framework.

    • : DSL for acceptence testing framework.

    The following table presents an overview of the components and the most important technical choices per component.

    Manual Setup

    hashtag
    Manual Installation

    This chapter describes the steps for a manual installation (eg. not using the vagrant script and puppet scripts). This chapter is for developers who would like to have more control over the installation procedure.

    With the increased control come increased risks of things not working with the versions or configuration of the software involved with the OSGP environment. If you run into issues, you may find clues in the puppet scripts about versions and modifications to the configuration of installed software.

    hashtag
    Note

    • Skip this chapter if you followed the Vagrant installation! You can continue with next chapter:

    hashtag
    Operating System

    The Open Smart Grid Platform runs on a Linux environment. It is recommended to set up a machine running Ubuntu.

    hashtag
    Software and tools

    The Open Smart Grid platform needs the following software and tools installed/downloaded:

    • Java 8 openjdk-8

    • PostgreSQL and pgAdmin 3

    • Git

    hashtag
    Settings

    hashtag
    User

    It is recommended to create a 'dev' user, because some scripts contain hard coded references to this 'dev' user. It is possible to skip this step, but then some of the scripts will have to be adjusted manually.

    hashtag
    Tomcat

    • Place the PostgreSQL JDBC driver jar in the Tomcat lib directory.

    • Change permissions of Tomcat Config files to 644 in the Tomcat conf directory.

    hashtag
    Apache HTTPD

    • Enable mod_ssl by running the following command:

    • Enable proxy_ajp by running the following command:

    hashtag
    Java

    • Make sure the JAVA_HOME var is set, and points to openjdk-8.

    hashtag
    Cloning Sources

    Clone the following repo's, it is recommended to create a Sources/OSGP directory in /home/dev/ since some scripts contain hard coded references to those folders.

    Make sure you are on the development branch (default).

    hashtag
    Creating directories and symlinks

    Create the following directories:

    • /var/log/osp/logs

    • /etc/osp/

    Make the dev user (or equivalent) the owner of the log directory with rwx permission. Give the other users read and execute permission.

    Execute the script /home/dev/Sources/OSGP/Config/scripts/create-symlinks.sh

    Note This script uses hard coded references to /home/dev/Sources/OSGP/*, if you used a different user, please edit the script before executing it.

    The script will make symlinks to certificates, to Apache HTTP server configuration and copy configuration settings as samples to locations where these properties may be overridden.

    hashtag
    Initiating the Database

    To create the database run the following command (Change /home/dev/ in case of no dev user)

    And create a backup of the pg_hba.conf file (modify if your version of PostgreSQL is different)

    Finally, reload the postgresql service:

    hashtag
    Set up the Open Smart Grid Platform

    Continue with setting up the Open Smart Grid Platform by following the

    Vagrant

    hashtag
    Installation

    This document describes the automatic installation procedure for your Open Smart Grid Platform development environment.

    hashtag
    Manual installation

    If you would like to follow the manual installation procedure, please proceed to the .

    hashtag
    Overview

    Creating a Virtual Machine using Virtual Box and Vagrant

    To improve the usability of the Installation process, a Vagrant file and some puppet scripts are used to automatically set-up an virtual Open Smart Grid Platform development environment. The following steps will describe how to install VirtualBox, Vagrant and kick off the procedure by running the vagrant up command.

    hashtag
    System Requirements

    The following system requirements are recommended:

    • Core i5/i7 ~2.5GHz Dual Core, Quad Core recommended

    • At least 16 GB RAM, 32 GB RAM recommended

    • At least 20 GB free space, 50 GB free space recommended

    The installation procedure has been tested on Windows 10.

    hashtag
    Install Vagrant and VirtualBox

    Start by downloading VirtualBox by going to And follow the installation steps.

    note: If you already have VirtualBox, make sure it is at least version 6.1.38

    note: Check whether Virtualbox stores the images on a drive with enough free space. (Open Oracle VM VirtualBox Manager -> Preferences -> General -> Default Machine Folder).

    Now download and install Vagrant. Vagrant is available at the following URL:

    note: If you already have Vagrant, make sure it is at least version 2.3.0 Complete the installation and restart your PC.

    note: If you did a fresh install of Vagrant and already had a command prompt open, make sure you close this command prompt and open it again.

    hashtag
    Tip

    • Remember to enable Virtualization in your system BIOS.

    • Also disable Hyper-V in Windows (can be found in Windows Features)

    hashtag
    Download and run the Vagrant file

    First create a new directory (for example: D:\My Vagrant Images\OSGP Development\)

    Browse to and save the png image and Vagrantfile files in your newly created directory.

    hashtag
    Note

    • Make sure that the file is named like this: Vagrantfile without an extension!

    • If the file has an extension (for example .txt) you can rename the file using the following console command.

      MacOS/Linux:

      Windows:

    Now open a Command Prompt and navigate to the newly created directory where you just put the files. Make sure that you run the Command Prompt using administrator rights.

    note: When you open the Vagrantfile you see that default the image is configured to run in virtualbox with 2 cpu cores and 8192 MB of RAM. If you need to you can change this to more or less cpu cores and RAM, but it is recommended to use the provided settings.

    Run the following command: vagrant up

    note: In case of error bad uri Images/OSGP Development/hashicorp/itc/itc-ubuntu-mate-20.04-amd64 then use the following command;

    • vagrant destroy

    • vagrant box add itc/itc-ubuntu-mate-20.04-amd64

    Vagrant will now automatically download an Ubuntu image (+- 2.6 Gb), create a virtualbox image from it and run the installation puppet script when finished. This might take a while, depending on your internet speed. After some time (while the script is still running) you will notice that a window with an Ubuntu Virtual Machine pops-up. Don't log in yet, wait until the script in the Console is finished.

    hashtag
    Tip

    • If the script fails for some reason (eg. Errors in the console such as time outs during downloading), you can retry the procedure by running the following command vagrant destroy && vagrant up

    Now that the script has ran its course, it will automatically log in on the Ubuntu virtual machine as user dev.

    note: For some actions, like sudo, you will have to enter the password of user dev. The password for user dev is dev.

    hashtag
    Optimize your Open Smart Grid Platform Development virtualbox image.

    At this point you also can adjust the virtualbox settings like cpus and memory size. If you don't want to adjust this proceed to Chapter 2.1.2. Platform Setup.

    If you do want to update the virtualbox settings for this image, shut down the image first:

    Once the machine has been Shut Down, open VirtualBox and right click on the new virtual machine (called "OSGP Development") and select Settings. Go to System and increase the Base Memory of the system to at least 6144 MB (6 GB) (or the maximum recommended (in green) amount for your system).

    Now go to the Processor Tab and increase the amount of Processors to the maximum recommended (in green) amount.

    Close the Settings window and Start the Virtual Machine again. Once it is booted, you should be automatically logged in as the 'dev' user.

    hashtag
    Post actions

    In order to use git correctly you need to execute the following commands in a terminal:

    hashtag
    Recap

    You just created a virtual machine running Ubuntu with pre-installed tooling. Proceed with of the guide describing how to set-up the open smart grid platform.

    Platform Setup

    hashtag
    Setting Up the Open Smart Grid Platform Development environment

    This chapter describes all the steps needed to finalize the open smart grid platform development environment.

    hashtag
    Lombok

    The platform uses Lombok annotations to generate extra Java methods. Without Lombok the project is not imported correctly by Maven and will not run. If you used the Vagrant installation method it should already be installed. To check if Lombok is properly installed to go Help > About Eclipse IDE and scroll down. Here you will see: Lombok <version> "<version name>" is installed. https://projectlombok.org/. If not follow this to install Lombok.

    hashtag
    Importing Maven Projects into Eclipse

    Open Eclipse by clicking the shortcut on the Desktop and import the projects.

    Go to File -> Import -> Existing Maven Projects, browse to folder /home/dev/Sources/OSGP

    Import the projects from location /home/dev/Sources/OSGP/open-smart-grid-platform.

    hashtag
    Creating an Apache Tomcat Server

    In Eclipse go to Window -> Open Perspective -> Debug

    In the 'Debug' perspective, go to the 'Servers' view and add a new Apache Tomcat server, Tomcat is available in the folder /home/dev/Tools/tomcat (or in another location if you didn't set up a VM using Vagrant, the latest version usually works fine).

    Click on Next

    Click on Finish

    After adding the server, double click on the Tomcat server in the 'Servers' view and set the following configuration: under 'Timeouts' set 'Start' to 600 and 'Stop' to 30.

    Make sure that Tomcat is using the correct Java Runtime Environment:

    Click on 'Runtime Environment', 'Installed JREs' and click 'Add'. Choose 'next' with 'Standard VM' highlighted. Click 'Directory' and in the folder browser that is shown, use the key combination 'Ctrl + h' to show hidden files. Choose '.sdkman/candidates/java/current' and select 'Open' and 'Finish'. In the 'Installed JREs' screen, unselect the default JVM (which will be an Eclipse hotspot JVM) and select '/home/dev/.sdkman/candidates/java/current' then close the screen by clicking 'Apply and Close'. The last step is to choose the new JRE which was just added in the dropdown of the 'Runtime Environment' screen by selecting '17.0.5'. Click 'Finish' to apply.

    Click on 'Open launch configuration', click on the 'Arguments' tab and add the following at the end of the 'VM arguments': -Xms512m -Xmx2048m -Xss512k -XX:MaxMetaspaceSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dcom.sun.management.jmxremote=true

    hashtag
    Setting Up Apache Tomcat Server Context

    All modules contain their own context.xml. In the module specific context.xml are the environment variables defined where the global and module specific configuration files are located. Default they will point to a location in /etc/osp/.

    If you want to deviate from this, you might set up the context.xml in Tomcat to be able to redirect in one file to different locations. This is optional and not required. In order to use a custom context.xml, copy the entries in /home/dev/Sources/OSGP/Config/tomcat/context.xml.sample to the Tomcat context.xml in the eclipse Servers folder, to map configuration file names to file paths.

    hashtag
    Deploying all Open Smart Grid Platform components to Apache Tomcat Server

    Continue by adding the Maven Projects to the Tomcat server by right clicking on the Tomcat server and choosing 'Add and Remove'. Select all available resources, except for osgp-protocol-simulator-61850 (which is for advanced use and requires additional configuration), then click the 'Add' button. At this point, eclipse's auto-build should have built the projects, and the Tomcat server has been setup.

    hashtag
    Starting Apache ActiveMQ

    Continue with starting Apache ActiveMQ. If you installed an environment as described with Vagrant, you can double click the ActiveMQ shortcut on the desktop.

    Alternatively you can open a terminal and run the executable manually by using the following command: (the executable can be found in the folder /home/dev/Tools/activemq/bin)

    This starts ActiveMQ as a terminal process (this way, ActiveMQ doesn't detach from the terminal and starts running as a daemon).

    hashtag
    Starting Apache Tomcat Server

    With ActiveMQ running, the Tomcat server can be started. Go to Eclipse, go to the Servers tab in the Debug view, and right click on the Tomcat server and select 'Start'.

    note: In case of an error starting up for the very first time, try and start up only the module: 'osgp.core' first. This makes sure the database scripts are executed.

    hashtag
    Probe

    This is an optional program that shows the status of the Tomcat resources in real time. To install Probe you can follow this . Note that you need to add the Tomcat users in the guide's Security part in the tomcat-users.xml in your Eclipse environment. To download the war file go to: . You need to copy the war file to: /home/dev/<your Eclipse workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps.

    hashtag
    Starting pgAdmin III and Connect to PostgreSQL

    Open pgAdminIII and configure a connection: choose the 'Add a connection to a server.' and fill out the fields using

    • Host: localhost

    • Port: 5432

    • Username: osp_admin

    hashtag
    Creating the 'test-org' Organization (in database osgp-core)

    Run the script in /home/dev/Sources/OSGP/Config/sql/create-test-org.sql to insert 'test-org' organization into the organisation table of the osgp_core database.

    If asked for a password, enter 1234

    Go back to PgAdmin III, expand servers, select localhost -> databases -> osgp_core -> Schemas -> public -> Tables. Right click the organisation table and select to view data for the top 100 rows. Confirm that the test-org organisation has been added to the Database.

    Now that everything has been set up, continue to the next chapter to start testing the Platform by sending it some requests.

    git config --global user.name "your full name"
    git config --global user.email yourEmailAddress

    Gitarrow-up-right: Version control system.

  • NodeJSarrow-up-right: Tooling suite with various Javascript tools.

  • NPMarrow-up-right: Package manager for the NodeJS Javascript applications.

  • Puttyarrow-up-right: A free and open-source terminal emulator, serial console and network file transfer application.

  • Vimarrow-up-right: Source code editor.

  • Apache Mavenarrow-up-right: Software project management tool.

  • GIT & GitHubarrow-up-right: Source code management.

  • Sonarqubearrow-up-right: Quality management platform.

  • SoapUIarrow-up-right: Functional testing tool for testing web services.

  • JUnitarrow-up-right: Unit testing.

  • Mockitoarrow-up-right: A Mock framework for Unit testing.

  • Component

    Technology

    Open Smart Grid Platform

    Java, Spring Framework, Hibernate, Netty

    Demo application

    Java, Spring Framework, Spring MVC

    Web services

    SOAP, WSDL

    OSLP Protocol

    Google Protocol Buffers

    Component (not open source)

    Technology

    OSGP Management application

    Java, Spring Framework, Spring MVC

    Net-Management application

    Java, Spring Framework, JAX-RS, AngularJS

    Liander Installatie application

    Java, Spring Framework, JAX-RS, AngularJS

    Apache HTTP serverarrow-up-right
    Apache Tomcatarrow-up-right
    pgAdmin-IIIarrow-up-right
    Protobuf (Google Protocol Buffers)arrow-up-right
    Flywayarrow-up-right
    HikariCParrow-up-right
    Hibernatearrow-up-right
    Nettyarrow-up-right
    OpenMUCarrow-up-right
    Orikaarrow-up-right
    Springarrow-up-right
    Puppetarrow-up-right
    Bowerarrow-up-right
    Eclipsearrow-up-right
    FileZillaarrow-up-right
    Apache JMeterarrow-up-right
    Cucumberarrow-up-right
    Gherkinarrow-up-right

    Test the Platform

    There are two procedures for testing the Open Smart Grid Platform.

    1. SoapUI. Create and send Soap requests to the Platform to manage a (simulated) light.

    2. PublicLighting Demo App. Use the Demo App to send requests to the Platform to manage a (simulated) device.

    Configuration

    We have prepared a full set of configuration (properties files, certificates, key store, ...) which is available in our Config repositoryarrow-up-right. This configuration can be used to setup a trial environment.

    Users

    Soap Requests in GXF have fields for an User name and an Application name in the Header. These are only used for logging and auditing. There are no restrictions (e.g. Authorizations) with regard to these fields. However, it is recommended to use names for Logging and Auditing purposes.

    Maven

  • ActiveMQ

  • Tomcat

  • Apache HTTPD

  • SoapUi

  • Eclipse IDE for Java EE Developers

  • Google Protocol Buffers: protobuf-compiler, libprotoc7 and libprotobuf7

  • PostgreSQL JDBC driverarrow-up-right

  • Setup the Open Smart grid Platform
    Set up the Open Smart Grid Platform Guide
    a2enmod ssl
    a2enmod proxy_ajp
    git clone https://github.com/OSGP/Config.git /home/dev/Sources/OSGP/Config
    git clone https://github.com/OSGP/open-smart-grid-platform.git /home/dev/Sources/OSGP/open-smart-grid-platform
    git clone https://github.com/OSGP/Documentation.git /home/dev/Sources/OSGP/Documentation
    sudo -u postgres /usr/bin/psql -p 5432 -f /home/dev/Sources/OSGP/Config/sql/create-users-and-databases.sql
    cp -p /etc/postgresql/9.4/main/pg_hba.conf /etc/postgresql/9.4/main/pg_hba.backup
    service postgresql reload
    vagrant up

    note: In case of an error complaining about not being able to resolve a URL (for instance to github.com) then try using a different internet connection not behind a proxy.

    Manual Installation Chapter
    https://www.virtualbox.org/wiki/Downloadsarrow-up-right
    https://www.vagrantup.com/downloads.htmlarrow-up-right
    https://github.com/OSGP/Config/tree/development/vagrantarrow-up-right
    Platform Setup
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    Password: 1234
    guidearrow-up-right
    guidearrow-up-right
    https://github.com/psi-probe/psi-probe/releasesarrow-up-right
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    LFE's CLAarrow-up-right
    DCOarrow-up-right

    Add a device

    hashtag
    Platform uses single device calls.

    In order to add a device to the platform, call the add device method in the device installation web service (for a specific domain) for each device.

    hashtag
    Implementation may differ for different device types

    Each device type may require its own set of attributes, security settings, etc. Each device type may have its own registration mechanism.

    • To add a DLMS Device to the Platform, take a look at the documentation of the Soap call as defined in the .

    • To add an OSLP Device to the Platform, the Soap call defined in can be used, or the .

    Please take a look at the chapter in the installation manual for a detailed guide of how to add a OSLP device to the platform.

    hashtag
    Additional Device actions

    In the of the documentation more information of the Web Service calls can be found for Adding devices, setting configuration, authorizations, schedules, firmware updates, etc.

    Add a new organisation

    hashtag
    Adding an Organisation to the platform

    This chapter describes how to add a new Organisation to the platform. This includes creating a certificate for the new organisation.

    hashtag
    Creating an Organisation

    In SoapUi go to DeviceManagement under the Admin project. Click on request 1 under CreateOrganisation. Fill in the parameters like the example request below. Make sure to sign the request with the test-org.pfx and to use the test-org organisation in the request header.

    This request creates a new organisation called "my-org":

    hashtag
    Authorise the new Organisation for the device

    To use this new organisation to control the SSLD_000-00-01 device, the authorisations need to be updated. To do that the UpdateDeviceAuthorisations request will be used, it can be found under DeviceManagement in the admin project.

    Fill in the parameters like shown below. The functionGroup will be set to AdHoc to authorise the 'my-org' organisation for the AdHoc functions.

    Make sure to use the test-org as OrganisationIdentification in the request header, and to sign the request with the test-org.pfx.

    hashtag
    Creating a certificate for the new organisation

    Now that the 'my-org' organisation is authorised to use the SSLD_000-00-01 device, it is time to create a certificate for the my-org organisation. This certificate will be used to sign the requests.

    Open a terminal and navigate to /home/dev/Sources/OSGP/Config/certificates/

    A script has been created to create the certificates, execute it by running the following command in the terminal:

    You should receive similar output as shown in the screenshot below.

    Now that the certificate has been created, restart the tomcat server.

    hashtag
    Signing a request with the new certificate

    When the tomcat server is up and running again, go to SoapUi and add the new certificate to the public-lighting project: double-click on the project, go to the WS-Security Configurations tab and select the keystores tab. Click the '+' button and browse to the my-org.pfx certificate which can be found in /home/dev/Sources/OSGP/Config/certificates/osgp-ca/certs/

    Now double-click on 'Request 1' in SetLight in PublicLightingAdHocManagement in the public-lighting project. Set the SSL Keystore to 'my-org.pfx' in the request properties so the request gets signed with the new certificate. Change the request parameters as shown in the example below:

    Note the OrganisationIdentification is now set to 'my-org'. Send the new request, you should receive the following response:

    Check the device-simulator to see if the dimValue of the SSLD_000-00-01 changed to 50.

    You now have successfully created a new organisation, along with a certificate to sign the requests, and changed the device authorisations of the device to accept commands from the new organisation.

    Using the Demo App

    hashtag
    Testing the platform using the Web Demo

    This chapter will describe the steps needed to test the Open Smart Grid Platform using the Web Demo Application.

    If you followed the steps from the 'Platform Setup' then you can skip the following installation steps, because the Web Demo will already be available.

    hashtag
    Installing the Web Demo

    • Open Eclipse and import the following folder as Maven project /home/dev/Sources/OSGP/open-smart-grid-platform/public-lighting-demo-app/

    • Add the PublicLightingDemoApp components to the Tomcat Server.

    • (Re)Start the Tomcat Server.

    hashtag
    Creating a device

    To access the Demo App go to the following URL: https://localhost/web-demo-app/

    If you encounter an Untrusted Connection page, go to 'I Understand the Risks' -> Add Exception.. -> Confirm Security Exception

    Click the Add a Device button in the Menu bar, and enter SSLD_000-00-01 at the Device Identification field and press Submit.

    The following screen will appear, it shows that the device has been successfully added to the Platform.

    hashtag
    Opening Device Simulator to Add a Device

    In order to be able to use the SSLD-000-00-01 Device, the device needs to be simulated in the Device Simulator. To do this we have to create it. In the Firefox Browser, open the Device Simulator by going to the following URL:

    Click Add Device

    Fill out the fields like this:

    • Device Identification: SSLD_000-00-01

    • IP Address: 127.0.0.1

    • Device Type: SSLD

    Click Create Device

    You should return to the Devices screen and see the message "Device with identification SSLD_000-00-01 was created."

    hashtag
    Registering a Device

    Now click on the newly created device and click the 'Register Device' button. After a while the message "Device identification with identification SSLD_000-00-01 was registered at XXXXXXXX" appears.

    Then click the 'Confirm Registration' button. The message should read: "Device with identification SSLD_000-00-01 was confirmed to be registered."

    hashtag
    Using 'SetLight' Switch the Light On

    Now that the Device is known in the platform, and simulated in the Device-Simulator, the device can be used. Let's switch on the Light. Go to the Demo App and press the List button in the Menu. A list should appear, showing the device that has just been added using the Add Device button.

    Click on the Manage button to access the Device Details.

    Switch on the Light by setting the Light Value to 100 and by checking the 'LightOn' checkbox (as shown in the screenshot below)

    Hit submit to submit the request to the Platform. The following screen should appear:

    In the home screen of the OSLP device simulator, the lightbulb should light up for SSLD_000-00-01. This means that the request succeeded.

    This step also concludes the installation manual.

    Deployment

    hashtag
    Deployment options

    Hosting the open smart grid platform in the cloud is possible, as well as on premises.

    hashtag

    Throttling

    hashtag
    CDMA throttling

    The main config is enabling the throttling client in your application

    The throttling client needs to know where to find the throttling service and tell the service what threshold to use. This is configured using the following settings:

    Multiple clients can use the same configuration by using the same throttling.configuration.name. Throttling will be globally handled across those clients. Make sure all clients that use the same name also use the same

    Web Services

    All the features of the open smart grid platform are accessible by it's webservices, as defined in the WSDL files. To use these services to communicate with devices through the platform, please keep in mind the following things.

    • A Soap request will have to be generated from your Application.

    • In the WSDL and xsd files of the Platform the Requests and it's objects are defined.

    Open Source Community

    We invite everyone to participate in the development of the open smart grid platform. There are multiple ways to support the project.

    • submit issues about bugs or requested features

    • solve issues

    mv Vagrantfile.txt Vagrantfile
    move Vagrantfile.txt Vagrantfile
    git config --global user.name "your full name"
    git config --global user.email yourEmailAddress
    ./activemq console
    psql -U osp_admin -h localhost -d osgp_core -f /home/dev/Sources/OSGP/Config/sql/create-test-org.sql

    Fill in the parameters once you have an empty soap request for a certain function. The restrictions/requirements are defined in the WSDL files.

  • The request should have a header where an ApplicationName, UserName and OrganisationId are defined. At the moment User and App name are not used in the Platform (Except for audability and logging). The OrganisationId, however, must match a known organisation within the Platform. This organisation must have the right authortities to make a certain request.

  • Furthermore, the Request must be signed with a certificate from the Organization with the OrganisationId in the header.

  • The requests use the Secure HTTP protocol (https).

  • For Asynchronious requests, the Platform will respond with a correlationId after succesfully making the request. Use this correlationId in the matching Response-Request to obtain the response from the device.

  • To learn more about the open smart grid platform's webservices, please take a look at the Domain Documentation or for hands-on experience with the Platform's webservices follow the UserGuide.

    hashtag
    Rest

    It is not possible to communicate with the Platform directly using REST webservices. As mentioned above, the open smart grid platform uses SOAP (For reasons defined here). If you want to use REST for your front end, you can write an Integration Layer that serves as a Soap Client and exposes the Soap calls through Rest web services that you can access from your front end.

    hashtag
    Flows

    When using the SOAP Web service, there are 2 flows that can occur:

    • some calls are synchronous: a response is returned immediately;

    • other calls are a-synchronous: an initial response contains a correlation id, which can be used to obtain the actual response.

    develop new features
  • write or improve the documentation

  • This chapter contains all the non-technical and general technical knowledge for developers to start contributing.

    AddDevice
    SmartMeteringInstallation.wsdlarrow-up-right
    CoreDeviceInstallationarrow-up-right
    UpdateKey Requestarrow-up-right
    Testing the open smart grid platform
    Domain Chapter

    Start contributing

    This is a guide to start contributing to the open smart grid platform project:

    1. Make yourself comfortable with the open smart grid platform by e.g. installing it.

    2. Read the documentation to get an idea of how the software works (architecture chapter), how the community works (this chapter).

    3. Find an open issue to work on or fire an new issue.

    4. Assign yourself to the issue and start contributing.

    5. Start contributing by using the procedures mentioned in this chapter.

    throttling.configuration.max.concurrency
    . The last client to register a configuration will determine the max concurrency (overwriting previous registrations).

    The throttling service itself should be deployed only once, it is not suited for load balanced deployment.

    throttling.client.enabled=true
    throttling.configuration.name=CDMA
    throttling.configuration.max.concurrency=1000
    throttling.service.url=http://localhost:9090
    throttling.service.timeout=PT30S
    Protocol: OSLP_ELSTER
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    Active-active setup over multiple datacenters

    If you like to setup an active-active installation over multiple datacenters. Make sure that the open smart grid platform database runs redundant over both datacenters (master-slave configuration).

    hashtag
    Maintenance

    There's not much maintenance that needs to be performed. Archiving some old log files, checking up on available disk space and creating a backup of the databases. Looking into the queues to see if there are no messages in the dead letter queue.

    Typical platform setup including webapplications and devices
    alt text
    alt text

    Developers 101

    hashtag
    Developer tools, technical guidelines and continuous integration

    hashtag
    Tools Used

    The technology and tools used can be found in the section.

    hashtag
    Code Guidelines and Code Tests

    • To prevent formatting issues caused by using different IDEs, the formatting style for the code is based on with some extra additions based on the Eclipse based conventions that were already in use.

      Check the explanation of the as well as the instructions how to configure your idea to be able to format according to the conventions (available for and ).

    • Follow approach for branching

    hashtag
    Continuous Integration

    All changes pushed to GitHub are built by our build server. Pull requests to master branch or development branch are also built. SonarQube performs static code analysis to help improve the quality level of the code base.

    • : An open source continuous integration tool written in Java.

    • : SonarQube is an open platform to manage code quality.

    hashtag
    Technical Conventions and Rules for New Code

    This project is engineered, built and tested using Domain Driven Design and Behaviour Driven Tests.

    • Use the Frameworks, don't roll your own

    • Single class, single responsibility

    • Value objects are immutable

    hashtag
    Development Guide per Component

    hashtag
    Web Service Adapters

    The web service adapters use Spring Web Service, contract first. JAXB is used to generate Java classes from the XSD's. All SOAP operations are bound to an endpoint. The incoming SOAP requests are authenticated by organization identification (plus certificates). Organization authorizations are checked for the desired operation. If the request is OK, a JMS message is sent to a domain adapter component.

    hashtag
    Domain Adapters

    Domain adapters contain business logic and persistence. Domain adapters process and forward the JMS message to the Core component.

    hashtag
    Domain Components

    Domain components contain entities and value objects.

    hashtag
    Core

    The Core component routes messages from domain adapter components to protocol adapter components and vice versa. Furthermore, it offers read-only database access for protocol adapter components.

    hashtag
    Protocol Adapters

    Protocol Adapter components translate a message from domain adapter components into a protocol message for a smart device. Protocol Adapter components send the protocol message to a smart device using a network connection. The response from the smart device is translated into a domain response message which will be sent to the Core components (which will route it to the domain adapter which issued the request).

    hashtag
    OSLP

    For the OSLP implementation, two components are used. The first component is the protocol adapter for the protocol. It can translate message into the protocol message for SSLD's. Second there's the signing-server component. It is responsible for signing the protocol message using the private key of the platform. The components communicate using a key-pair. The signing-server can handle multiple protocol adapter instances by utilizing a reply-to queue per protocol adapter instance. Since the protocol adapter component needs to be reachable from a network, it is a requirement that the private key may not be used by the protocol adapter directly. The signing server component can be deployed in such a way that no network access is available to this component, as the only coupling needed are the queues / the message broker.

    hashtag
    Other Guides

    hashtag
    Installation Guide

    If a full installation is desired, have a look at our .

    hashtag
    Create New Domain Guide

    In order to add a new domain to OSGP, you can benefit from the information in the .

    Using SoapUi

    hashtag
    Testing the platform

    This chapter will describe the steps needed to test the Open Smart Grid Platform.

    hashtag
    Setting Up SoapUI

    Start SoapUI by double clicking the shortcut on the Desktop or run it manually by typing the following command in a terminal:

    Go to File -> Preferences -> SSL Settings, and browse for the KeyStore to /home/dev/Sources/OSGP/Config/certificates/osgp-ca/certs/test-org.pfx and fill out the password (the password is 1234)

    Go to WSDL Settings and check 'Generate Example Values in New Requests' and 'Generate Comments with Type Information in New Requests'

    hashtag
    Add the SoapUI projects to SoapUI

    There are several SoapUI project prepared, see /home/dev/Sources/OSGP/Config/soapui/. Import all SoapUI projects present in the folder mentioned above. Below, 2 projects are shown as examples.

    hashtag
    Adding the 'Admin' Soap project

    Import the 'admin' project by clicking File -> Import project. Browse to /home/dev/Sources/OSGP/Config/soapui/, select 'admin-soapui-project.xml' and click open.

    Alternatively you can create the 'admin' project yourself by following the steps below:

    • Create a new SOAP Project and call it 'admin'

    • Open the Project View by double-clicking on the 'admin' project. Go to 'WS-Security Configurations' and select the 'Keystores' Tab. Click on the '+' to add the test-org.pfx in /home/dev/Sources/OSGP/Config/certificates/osgp-ca/certs/

    hashtag
    Adding the 'Public Lighting' Soap project.

    Import the 'public-lighting' project by clicking File -> Import project. Browse to /home/dev/Sources/OSGP/Config/soapui/, select 'public-lighting-soapui-project.xml' and click open.

    Alternatively you can create the 'public-lighting' project yourself by following the steps below:

    • Create another new SOAP Project and call it 'public-lighting'

    • Open the Project View by double-clicking on the 'public-lighting' project. Go to 'WS-Security Configurations' and select the 'Keystores' Tab. Click on the '+' to add the test-org.pfx in /home/dev/Sources/OSGP/Config/certificates/osgp-ca/certs/

    hashtag
    First SOAP requests to add a device to the open smart grid platform

    Before sending the request, the test-org.pfx should be added as SSL Keystore: Go to the properties interface for the request (bottom left of the screen, after selecting 'Request 1' under UpdateKey in the 'admin' project'), and choose test-org.pfx from the drop-down box.

    hashtag
    Note

    • This has to be done for each request!

    An SSLD needs to be added to the platform, as well as a manufacturer and a public key for the SSLD. A couple of steps need to be performed to realize this.

    1 Add manufacturer 2 Add device model 3 Add SSLD 4 Setup a protocol for the SSLD to use 5 Set the public key for the SSLD (in case of OSLP)

    The AddManufacturer function adds a new manufacturer to OSGP. All devices are coupled to a manufacturer.

    The AddDeviceModel function adds a new device model to OSGP. All devices are coupled to a device model.

    The AddDevice function adds a new SSLD to OSGP. The device is coupled to a device model and a manufacturer.

    The function UpdateDeviceProtocol sets a protocol for a device.

    The UpdateKey function of the admin webservice sets a public key for a device. Double click 'Request 1' under UpdateKey in the 'admin' project. Add the following request:

    Click the 'play' button to submit the request to the endpoint. You should receive similar response as shown in the screenshot below:

    After the SSLD has been added, let's see if the function FindAllDevices shows the SSLD. Continue with the FindAllDevices request from the public-lighting project. Since this is not the same project, we have to change the endpoint; in this case in . Do not forget to set the SSL keystore in the Request Properties. Use the following parameters in the request:

    After the request has been submitted, the response should include the SSLD device with ID SSLD_000_00_01

    hashtag
    Opening Device Simulator to Add a Device

    In order to be able to use the SSLD-000-00-01 Device, the device needs to be simulated in the Device Simulator. To do this we have to create it. In the Firefox Browser, open the Device Simulator by going to the following URL:

    If you encounter an Untrusted Connection page, go to 'I Understand the Risks' -> Add Exception.. -> Confirm Security Exception

    Click Add Device

    Fill out the fields like this:

    • Device Identification: SSLD_000-00-01

    • IP Address: 127.0.0.1

    • Device Type: SSLD

    Click Create Device

    You should return to the Devices screen and see the message "Device with identification SSLD_000-00-01 was created."

    hashtag
    Registering a Device

    Now click on the newly created device and click the 'Register Device' button. After a while the message "Device identification with identification SSLD_000-00-01 was registered at XXXXXXXX" appears.

    Then click the 'Confirm Registration' button. The message should read: "Device with identification SSLD_000-00-01 was confirmed to be registered."

    hashtag
    Using 'SetLight' SOAP Request to Switch the Light On

    Now that the Device is known in the platform, and simulated in the Device-Simulator, the device can be used. Let's switch on the Light. Using SoapUI, click on Request 1 under SetLight at the public-lighting project. Set the following parameters in the request (And do not forget to set the Keystore in the request properties):

    Submit the request. Take note of the CorrelationUid in the response. You can use this Id in another request to ask the server for the status of this request.

    In the home screen of the OSLP device simulator, the lightbulb should light up for SSLD_000-00-01. This means that the request succeeded.

    The last request concerns the response from the previous SetLight request. In SoapUi open Request 1 under 'GetSetLightResponse' in the 'public-lighting' project. Set the following parameters in the request (And the keystore in the request properties). Make sure to replace the CorrelationUid with the value from the respons from the SetLight request.

    hashtag
    Note

    • Do not forget to set the CorrelationUid to value in the response you received from the setLight request.

    The server replied Ok, indicicating that the SetLight request has been processed succesfully.

    This step also concludes the installation manual.

    Code of Conduct

    Like the technical community as a whole, the open smart grid platform community is made up of a mixture of professionals and volunteers from all over the world, working on every aspect of the mission - including mentor-ship, teaching, and connecting people.

    Diversity is one of our huge strengths, but it can also lead to communication issues and unhappiness. To that end, we have a few ground rules that we ask people to adhere to. This code applies equally to founders, mentors and those seeking help and guidance.

    This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit in which it’s intended - a guide to make it easier to enrich all of us and the technical communities in which we participate.

    This code of conduct applies to all spaces managed by the GXF project (a LF energy project). This includes IRC, the mailing lists, the issue tracker, DSF events, and any other forums created by the project team which the community uses for communication. In addition, violations of this code outside these spaces may affect a person's ability to participate within them.

    https://localhost/web-device-simulator/devices
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/admin/devicemanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:CreateOrganisationRequest>
             <ns1:Organisation>
                <!--type: Identification-->
                <ns1:OrganisationIdentification>my-org</ns1:OrganisationIdentification>
                <!--type: string-->
                <ns1:Name>my-org</ns1:Name>
                <!--type: string-->
                <ns1:Prefix>MYO</ns1:Prefix>
                <!--type: PlatformFunctionGroup - enumeration: [ADMIN,USER]-->
                <ns1:FunctionGroup>ADMIN</ns1:FunctionGroup>
                <!--type: boolean-->
                <ns1:Enabled>true</ns1:Enabled>
                <!--1 or more repetitions:-->
                <!--type: PlatformDomain - enumeration: [COMMON,PUBLIC_LIGHTING,TARIFF_SWITCHING]-->
                <ns1:Domains>COMMON</ns1:Domains>
                <ns1:Domains>PUBLIC_LIGHTING</ns1:Domains>
             </ns1:Organisation>
          </ns1:CreateOrganisationRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/admin/devicemanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>AAPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:UpdateDeviceAuthorisationsRequest>
             <!--1 or more repetitions:-->
             <ns1:DeviceAuthorisations>
                <!--type: Identification-->
                <ns1:deviceIdentification>SSLD_000-00-01</ns1:deviceIdentification>
                <!--type: Identification-->
                <ns1:organisationIdentification>my-org</ns1:organisationIdentification>
                <!--type: DeviceFunctionGroup - enumeration: [OWNER,INSTALLATION,AD_HOC,MANAGEMENT,FIRMWARE,SCHEDULING,TARIFF_SCHEDULING,CONFIGURATION,MONITORING]-->
                <ns1:functionGroup>AD_HOC</ns1:functionGroup>
                <!--Optional:-->
                <!--type: boolean-->
             </ns1:DeviceAuthorisations>
          </ns1:UpdateDeviceAuthorisationsRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    ./create_client_cert.sh my-org 1234 1234
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/publiclighting/adhocmanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>my-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:SetLightRequest>
             <!--type: Identification-->
             <ns1:DeviceIdentification>SSLD_000-00-01</ns1:DeviceIdentification>
             <!--1 to 6 repetitions:-->
             <ns1:LightValue>
                <!--Optional:-->
                <!--anonymous type-->
                <ns1:Index>0</ns1:Index>
                <!--type: boolean-->
                <ns1:On>true</ns1:On>
                <!--Optional:-->
                <!--anonymous type-->
                <ns1:DimValue>50</ns1:DimValue>
             </ns1:LightValue>
          </ns1:SetLightRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <ns2:SetLightAsyncResponse xmlns:ns2="http://www.opensmartgridplatform.org/schemas/publiclighting/adhocmanagement/2014/10" xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/2014/10">
             <ns2:AsyncResponse>
                <ns3:CorrelationUid>my-org|||SSLD_000-00-01|||20160805150420802</ns3:CorrelationUid>
                <ns3:DeviceId>SSLD_000-00-01</ns3:DeviceId>
             </ns2:AsyncResponse>
          </ns2:SetLightAsyncResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    If you believe someone is violating the code of conduct, we ask that you report it by emailing the mailing list gxf@lists.lfenergy.org.

    hashtag
    Be friendly and patient.

    hashtag
    Be welcoming.

    We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.

    hashtag
    Be considerate.

    Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.

    hashtag
    Be respectful.

    Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the open smart grid platform community should be respectful when dealing with other members as well as with people outside the open smart grid platform community.

    hashtag
    Be careful in the words that you choose.

    We are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to:

    • Violent threats or language directed against another person.

    • Discriminatory jokes and language.

    • Posting sexually explicit or violent material.

    • Posting (or threatening to post) other people's personally identifying information ("doxing").

    • Personal insults, especially those using racist or sexist terms.

    • Unwelcome sexual attention.

    • Advocating for, or encouraging, any of the above behavior.

    • Repeated harassment of others. In general, if someone asks you to stop, then stop.

    hashtag
    When we disagree, try to understand why.

    Disagreements, both social and technical, happen when people get passionate about what they are doing. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of open smart grid platform comes from its varied community, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.

    This Code of Conduct is based on the Django Code of Conduct

    Write behaviour driven tests using Cucumber and Gherkinarrow-up-right, see the Integration-Testsarrow-up-right

  • In case you are not familiar with behaviour driven tests, include unit tests

  • Fix SonarQube issues

  • Issue pull request (preferable to development branch)

  • Map generated objects to value objects or entities
  • Transferring an object means using a DTO

  • Use base classes for common logic

  • Interfaces are good, but 'impl' is bad

  • Extend classes, don't expand classes

  • Migrate databases using Flyway

  • JMS for messaging

  • Extend the authorization logic if needed, don't bypass it

  • Log errors/exceptions

  • Add meaningful comments to the code

  • Follow the code guidelines

  • Technology stack
    Google Java Formatarrow-up-right
    general ideasarrow-up-right
    Eclipsearrow-up-right
    IntelliJarrow-up-right
    GitFlowarrow-up-right
    Jenkins buildserverarrow-up-right
    SonarQubearrow-up-right
    Installation Guide
    Create New Domain Guide

    Foundation

    Grid eXchange Fabric (GXF) is a project of LF Energyarrow-up-right. LF Energy is part of the Linux foundationarrow-up-right.

    Fill out the password (1234) and click Ok and close the Project View window.
  • Right click the 'admin' project and choose 'Add WSDL'. Enter the following URL in the WSDL Location field:

  • Make sure the box 'Create sample requests for all operations' is checked, and click OK.

  • Fill out the password (1234) and click Ok and close the Project View window.
  • Right click the 'public-lighting' project and choose 'Add WSDL'. Enter the following URL in the WSDL Location field:

  • Make sure the box 'Create sample requests for all operations' is checked, and click OK.

  • Protocol: OSLP ELSTER
    https://localhost:443/osgp-adapter-ws-publiclighting/publiclighting/adHocManagementService/arrow-up-right
    alt text
    alt text
    alt text

    Contributing to documentation

    hashtag
    Documentation Publication

    This documentation is available in multiple formats.

    Web

    PDF

    • Click on Export as PDF on right side of gitbook

    hashtag
    Contributing to documentation

    The documentation is build using GitBook software from Markdown files in the .

    We encourage you to participate in improving the documentation. From corrected typos to new sections, every commit is appreciated. You can access the source files by clicking the "Fix this page"-button in the GitBook or by selecting the relevant Markdown-file in the documentation. You can commit your changes by sending a pull request.

    1. Fork the repo, do work in a feature branch.

    2. Issue a pull request.

    3. Make sure the automated test suite succeeds. They will show-up in the pull request.

    Some information on GitBook and using Markdown can be found , more elaborate information on GitHub-flavored Markdown is found . If you like to upload illustration, you can use git or

    If you are completely new to this and you need help to get started, file an issue in the documentation repository.

    hashtag
    Chapters in the documentation

    It may be obvious to you already from the index, however, here is an overview on what documentation goes in which chapter.

    • Chapter 1 consist of an open smart grid platform introduction and architecture for potential users, architects and developers. The open smart grid platform website is used for basic product information.

    • Chapter 2 contains the general userguide for open smart grid platform users

    • Chapter 3 contains community related topics

    hashtag
    Versioning within the documentation

    We have chosen to work with GitBook since it allows us to make different versions of documentation for each release. This is done by branching the files in the documentation repository. The master branch is used for releases only. The development branch is our main and current branch. If you like to improve the documentation, start a feature branch with your changes and send a pull request to the development branch.

    hashtag
    Guidelines for new documentation

    • The master branch is only used by major open smart grid platform releases

    • Don't commit directly to the development branch, please do a pull request.

    • We use the American spelling

    hashtag
    Documentation inspiration

    Inspiration on how to write good documentation can be found here: .

    FAQ

    • How to start everything up? Make sure that PostgreSQL is running. Make sure that Apache HTTPD web server and Apache ActiveMQ are running. Then start Apache Tomcat application server as described in the installation manual.

    • Where are the log files? The Apache Tomcat application server logs can be found in /var/log/tomcat. The Apache HTTPD web server logs can be found in /var/log/httpd. The PostgreSQL log files can be found in /var/lib/pgsql/9.3/data/pg_log. The platform log files can be found in /var/log/osp/logs/.

    • Help: SELinux is preventing < something >? Make sure to set SELinux to 'permissive' mode. Then try again and it should work as SELinux will no longer enforce the current policy. Later, one can use the SELinux tools to create a proper policy that allows everything that was prevented before.

    • How to add or update a component? Make sure to place the properties file(s) for the component in /etc/osp. Add the locations of the properties file(s) to Apache Tomcat context.xml file. Add the war file to /usr/share/tomcat/webapps. Restart Apache Tomcat.

    • How to configure a component? Most (if not all) components of the open smart grid platform are de-coupled using queues. Configure the broker URL in the properties file and take notice of the queues that a component uses/needs. Make sure to double check the connectionstring for PostgreSQL.

    • How to configure URL's for a component? In this case the Apache HTTPD vhost needs to be updated. The vhost config file can be found in /etc/httpd/conf.d. We use redirects from HTTP to HTTPS and AJP proxy to send the requests to Apache Tomcat.

    • How to check up on Apache ActiveMQ? Apache ActiveMQ offers a web interface (the default port is 8161, default credentials: admin/admin). Using the web interface one can check the queues and especially the dead letter queue (DLQ).

    • How do I obtain a public key for a device? Public Keys are usually manufacterer supplied for Smart Metering. For the Open Source part you can use the OSLP device simulator. In Sources/OSGP/Config/certificates/oslp/ you can find instructions for generating a OSLP device public key, and a folder with 5 pre-generated keys for test devices.

    • My code gives a lot of errors in Eclipse after importing Try the following things: run mvn clean install in the open-smart-grid-platform directory. Right-click on a project in Eclipse and select 'Maven -> Update project..', select all projects and update.

    • The Vagrant script fails If you are receiving errors while downloading the ubuntu iso, sources, etc. or if the puppet script does not start; try running the Vagrant script again by typing vagrant destroy && vagrant up in the directory with the vagrant file.

    • I want to update my code from Github If you want to update your code, just run git pull in the repository you want to update. You can also create a fresh Virtual Machine using the vagrant installation, this procedure makes sure you have the most recent code.

    • Is a user required to consume platform services? No, an organization is required.

    _If your question is not in this list, please create an [issue on Github in the documentation repository ]

    Contributing to the code

    Thank you for contributing to the Open Smart Grid Platform. Please keep the following in mind before submitting code.

    hashtag
    Guidelines

    Before code is merged it needs to comply with a number of guidelines: 1. Code should be as complete as possible (preferably no placeholders, TODO's or FIXME's) 2. Right formatting; code should follow the Coding Conventions (see 3.1.2) 3. Fixed/added unit tests where applicable 4. Javadocs added where applicable 5. Accepting pull-requests with SonarQube reports "Blocker" and "Critical" are not allowed 6. Comply with International open standards where possible (e.g. IEC standards)

    hashtag
    Contributor License Agreement

    We ask each of our contributors to sign our contributor license agreement (CLA). This has advantages for both parties, it gives you the assurance that your contribution will remain available under the Apache 2.0 license. Meanwhile, you give your code in license to us, so we can add your code to the open smart grid platform. And we know your contribution is entirely your work, so we don't get in trouble with legal issues. Please read the CLA text carefully.

    hashtag
    Submitting code

    To submit changes to the open smart grid platform branches: 1. Create a fork of the open smart grid platform repo you will be working in 2. Make and commit your changes to your fork 3. Create a pull request to merge the changes into the right branch (see 4.1.4 for the branching strategy) If the changes fix a bug, mention the issue number in the commit message or pull request message (example: fixes 101, solved 87). If no ticket exists, create one beforehand. Afterwards, please update the relevant documentation in this GitBook.

    hashtag
    Open Source Branching Strategy

    The open smart grid platform's main branch is master. All major releases are tagged in this branch. Development is done in the development and feature branches. We use the GitFlow branching strategy. Find more information on this strategy here:

    The GitFlow workflow is someone complicated, but it has the advantage that it gives a clear overview of all previous releases and current development and thus helps to collaborate more efficiently. Please follow this strategy in your commits.

    hashtag
    Pull requests: review process

    Anyone can send in a pull request. Assign a maintainer or other developer with knowledge on this topic to accept/evaluate your pull request. You can view the SonarCube test results at () and the Jenkins continuous integration results at ()

    If your code is a useful contribution and meets our quality standards (see section 3.1), it will be added to the open smart grid platform! Developers are in charge of judging this. Don't forget to update the documentation as well.

    Communication and Contact

    If you want to get in touch to discuss non-technical subjects, send us an email to the LF energy GXF mailing list gxf@lists.lfenergy.org or open an issue on Githubarrow-up-right.

    hashtag
    New Features

    1. If there is a need (or wish!) for a new feature, add it as issue to Githubarrow-up-right. Please provide a full description about the background of the problem.

    2. A developer can take on the issue and start working on it on voluntary base. If you need this feature and you have the money to pay for it, you can hire a developer and have the developer work on it. If open smart grid platform core components are involved, please discuss your change first with one of the developers/maintainers.

    3. The developer makes a description on how he wants to fix the problem. Other developers can discuss the solution as well. If everybody agrees on the solution direction, the developer codes the solution and submits it (by sending in a pull request). The developer should also document the feature in the

    4. The maintainer can check the code (or assign this to someone else) and merge it with upstream releases.

    hashtag
    Bug tracking

    1. Find out as much as possible about the bug before reporting it. Please check on GitHub/Jira whether the bug has already been reported. Also, look for logs, error messages etc. Please include as much information as possible background on the bug and submit the bug on Github or Jira.

    2. The maintainer makes sure that somebody will look at the bug, check for duplicates and thank the contributor for sending in the bug. If the bug turns out to be a duplicate, the issue will be closed.

    3. A developer will try to reproduce the bug and will look for the root cause. The developer adds his findings to the issue. If the developer cannot reproduce the bug, the developer will contact the user for more information or/and login into the user's system (when possible for the user/developer). If it's impossible to re-produce the bug, the issue will be closed.

    hashtag
    Questions

    If you have a question, please create an Github issue in the .

    hashtag
    Report security issues

    Due to the sensible nature of security issues e.g. zero days, we prefer a responsible disclosure. Security issues can be reported to .

    Use cases

    Up-to-date information on use-cases can be found on the .

    hashtag
    Reference implementation in The Netherlands: Flexible system for operating public lighting (FlexOVL)

    FlexOVL, a new and flexible switching system of public lighting delivers more control for municipalities and is the first solution which is powered by the Open Smart Grid Platform.

    Technical drivers for Alliander

    Domains

    Chapter 4 Domain This chapter describes the separate domain in the open smart grid platform.

    hashtag
    Web Service Adapters

    The web service adapters use Spring Web Service, contract first. JAXB is used to generate Java classes from the XSD's. All SOAP operations are bound to an endpoint. The incoming SOAP requests are authenticated by organization identification (plus certificates). Organization authorizations are checked for the desired operation. If the request is OK, a JMS message is sent to a domain adapter component.

    Governance

    With the open smart grid platform we intend to have the right balance between a benevolent Dictator and a Formal Meritocracy in order to have a balanced decision-making process and to prevent unwanted dictators and everlasting discussions. The basic principle is that decisions are based on consensus. If this decision making process takes too long or a decision is required, the community council has the authority to make a decision.

    The governance and rules should be respected.

    hashtag
    Community council / Technical Steering Committee

    /home/dev/Sources/OSGP/open-smart-grid-platform/osgp/shared/osgp-ws-admin/src/main/resources/AdminDeviceManagement.wsdl
    /home/dev/Sources/OSGP/open-smart-grid-platform/osgp/shared/osgp-ws-publiclighting/src/main/resources/PublicLightingAdHocManagement.wsdl
    /home/dev/Tools/SoapUI/bin/soapui.sh
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/common/firmwaremanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:AddManufacturerRequest>
             <ns1:Manufacturer>
                <!--type: int-->
                <ns1:Id>3</ns1:Id>
                <!--anonymous type-->
                <ns1:Code>MAN</ns1:Code>
                <!--anonymous type-->
                <ns1:Name>Manufacturer01</ns1:Name>
                <!--type: boolean-->
                <ns1:UsePrefix>false</ns1:UsePrefix>
             </ns1:Manufacturer>
          </ns1:AddManufacturerRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/common/firmwaremanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:AddDeviceModelRequest>
             <ns1:DeviceModel>
                <ns1:Manufacturer>MAN</ns1:Manufacturer>
                <!--Optional:-->
                <ns1:ModelCode>MOD01</ns1:ModelCode>
                <!--Optional:-->
                <ns1:Description>Device model MOD01.</ns1:Description>
             </ns1:DeviceModel>
          </ns1:AddDeviceModelRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/deviceinstallation/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:AddDeviceRequest>
             <ns1:Device>
                <ns1:DeviceIdentification>SSLD_000-00-01</ns1:DeviceIdentification>
                <!--Optional:-->
                <ns1:Owner>test-org</ns1:Owner>
                <!--Optional:-->
                <ns1:Activated>false</ns1:Activated>
                <!--Optional:-->
                <ns1:HasSchedule>false</ns1:HasSchedule>
                <!--Optional:-->
                <ns1:PublicKeyPresent>false</ns1:PublicKeyPresent>
                <ns1:DeviceModel>
                   <!--anonymous type-->
                   <ns1:Manufacturer>MAN</ns1:Manufacturer>
                   <!--Optional:-->
                   <!--anonymous type-->
                   <ns1:ModelCode>MOD01</ns1:ModelCode>
                   <!--Optional:-->
                   <!--anonymous type-->
                   <ns1:Description>Test device.</ns1:Description>
                </ns1:DeviceModel>
             </ns1:Device>
          </ns1:AddDeviceRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/admin/devicemanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:UpdateDeviceProtocolRequest>
             <ns1:DeviceIdentification>SSLD_000-00-01</ns1:DeviceIdentification>
             <ns1:ProtocolInfo>
                <ns1:Id>4</ns1:Id>
                <ns1:Protocol>OSLP ELSTER</ns1:Protocol>
                <ns1:ProtocolVersion>1.0</ns1:ProtocolVersion>
             </ns1:ProtocolInfo>
          </ns1:UpdateDeviceProtocolRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/admin/devicemanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:UpdateKeyRequest>
             <!--type: Identification-->
             <ns1:DeviceIdentification>SSLD_000-00-01</ns1:DeviceIdentification>
             <!--type: string-->
             <ns1:PublicKey>MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFhUImXFJdqmputquVAc2CPdnn9Ju00M3m/Ice7wABNN+oAYKQbw/OceqvZmFF1+r4nO/vCm/f1JO5nEorE2jNQ==</ns1:PublicKey>
             <!--type: long-->
             <ns1:ProtocolInfoId>1</ns1:ProtocolInfoId>
          </ns1:UpdateKeyRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/publiclighting/adhocmanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:FindAllDevicesRequest>
             <!--type: int-->
             <ns1:Page>0</ns1:Page>
          </ns1:FindAllDevicesRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    https://localhost/web-device-simulator/devices
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/publiclighting/adhocmanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:SetLightRequest>
             <!--type: Identification-->
             <ns1:DeviceIdentification>SSLD_000-00-01</ns1:DeviceIdentification>
             <!--1 to 6 repetitions:-->
             <ns1:LightValue>
                <!--Optional:-->
                <!--anonymous type-->
                <ns1:Index>0</ns1:Index>
                <!--type: boolean-->
                <ns1:On>true</ns1:On>
                <!--Optional:-->
                <!--anonymous type-->
                <ns1:DimValue>100</ns1:DimValue>
             </ns1:LightValue>
          </ns1:SetLightRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns1="http://www.opensmartgridplatform.org/schemas/publiclighting/adhocmanagement/2014/10">
       <soapenv:Header>
          <ns:ApplicationName>APPLICATION_NAME</ns:ApplicationName>
          <ns:UserName>USER_NAME</ns:UserName>
          <ns:OrganisationIdentification>test-org</ns:OrganisationIdentification>
       </soapenv:Header>
       <soapenv:Body>
          <ns1:SetLightAsyncRequest>
             <ns1:AsyncRequest>
                <!--type: CorrelationUid-->
                <ns:CorrelationUid>test-org|||SSLD_000-00-01|||20160721083641940</ns:CorrelationUid>
                <!--type: Identification-->
                <ns:DeviceId>SSLD_000-00-01</ns:DeviceId>
             </ns1:AsyncRequest>
          </ns1:SetLightAsyncRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    hashtag
    Domain Adapters

    Domain adapters contain business logic and persistence. Domain adapters process and forward the JMS message to the Core component.

    hashtag
    Domain Components

    Domain components contain entities and value objects.

    Sign the CLA using EasyCLAarrow-up-right.
  • Assign a maintainer or other developer on this topic to accept/evaluate your pull request. The current maintainer can be found in the governance paragraph.

  • Chapter 4 contains information related to the open smart grid platform domains

  • Chapter 5 contains information related to the protocols and simulators

  • Chapter 6 shows the support options

  • Chapter 7 code and documentation license

  • Please follow the used chapter and section numbering and apply it in your commits as well
  • Currently we do not use image numbering, since it is too much of a hassle to keep it up-to-date. If you have a smart idea to do this, let us know!

  • Give your (sub) document a relevant name or section with number

  • Update SUMMARY.md if needed

  • Development branch publicationarrow-up-right
    Development branch publicationarrow-up-right
    documentation repositoryarrow-up-right
    herearrow-up-right
    herearrow-up-right
    Githubarrow-up-right
    http://docs.writethedocs.org/arrow-up-right
    documentation repositoryarrow-up-right
    GitFlowarrow-up-right
    http://ci.opensmartgridplatform.org/sonarqube/arrow-up-right
    http://ci.opensmartgridplatform.orgarrow-up-right
  • Otherwise, the developer will write a patch and tests the fix.

  • Once the patch is accepted (see Code review/test process), it will be shipped with the next release.

  • The maintainer than closes the issue.

  • GitBookarrow-up-right
    documentation repositoryarrow-up-right
    gxf+owner@lists.lfenergy.orgenvelope
    • Replacing Ripple Control

    • Decrease future investments

    • Decrease outages

    Customer drivers (Municipalities)

    • Be more in control, by controlling switching times themselves

    • Resolve power failures faster, through up-to-date information

    • Reduction in costs, through energy saving and more efficient maintenance and management

    • No vendor lock-in, not dependent on one supplier

    Implementation/roll-out

    • Small scale roll-out started January 2015

    • 200 Sub Stations will be fitted with an SSLD to control public lighting and tariff switching

    • 15 municipalities in the Liander grid operator area will be participating

    • Goal is to allow municipalities to use the application, give feedback and to see if the services offered to municipalities are adequate

    • Large scale roll-out will start around 2016

    • The entire Liander grid operator area will use SSLD's to control all public lighting and tariff switching

    • About 25.000 Sub Stations (middenspanningsruimtes)

    • About 800.000 street lights will be switched by the SSLD's mounted in the 25.000 Sub Stations

    FlexOVL web application (not open source available)

    Municipalities are free to choose their own (web)application (using the web services of the Open Smart Grid Platform), or they could use the default web application developed by Alliander.

    FlexOVL Web Application

    Functionality of the default web application as used by grid operator Liander (example)

    • Create switching schedules and assign those schedules to one or more SSLD's

    • Create groups of SSLD's in order to be able to assign schedules to many SSLD's at once

    • On demand switching of public lighting

    • Review current status of an SSLD in order to review public lighting and tariff switching states

    • Abilities to monitor power consumption of public lighting (available if the SSLD is fitted with an Electricity Meter)

    • Monthly report offering insight into switch moments and power consumption

    Grid eXchange Fabric websitearrow-up-right
    The community council consists of 5 members and has the authority to make decisions on all community related subjects.

    The community council is responsible for:

    • General ambitions, objectives and goals

    • Principles and understandings

    • Governance and consultation bodies

    • Guidelines and procedures and tool selection

    • Contribution (process) of individual members

    • Architectural and (development) infrastructure choices

    • Raise subjects/issues that are important for the direction/development of the community

    When the community grows, members of the community council can be elected. If the situation demands or requires it, the community council has the ability to establish sub councils for a specific subject, area of domain.

    The community council consist of the following members:

    • Robert Tusveldarrow-up-right - Lead Architect - Chairman

    • Maarten Mulderenvelope - Product owner GXF & LF Energy TAC member for GXF

    • Paul Houtmanarrow-up-right - Lead Architect

    • - Maintainer

    • - OSPO team member & LF Energy TAC member for Alliander

    If you would like to join the community council, please contact us! Mention @OSGP/communitycouncil in an github issue. The (online) community council meetings will happen when needed.

    hashtag
    Maintainers

    Maintainers are responsible for maintaining parts of the code-base. Maintainers have the following responsibilities

    • Coordinate development activity

    • Make sure code/documentation reviews are being done

    • Coordinate pull-requests

    • Coordinate bug follow-ups

    • Coordinate questions

    In case of long discussions or arguments, maintainers or other can request a community council decision.

    Current maintainers:

    • GXF Platform and smart lighting domain: Kevin Smeetsarrow-up-right

    • GXF Platform and Smart metering domain: Stefan Ermensarrow-up-right

    • GXF Architecture & documentation: Robert Tusveldarrow-up-right

    hashtag
    Contributors

    Contributors include anyone in the technical community that contributes code, documentation, or other technical artifacts to the project.

    Anyone can become a contributor. There is no expectation of commitment to the project, no specific skill requirements and no selection process. To become a contributor, a community member simply has to perform one or more actions that are beneficial to the project.

    Grid eXchange Fabric complies with the LF Energy governancearrow-up-right

    Admin

    hashtag
    The open smart grid platform core and admin functions for device management.

    hashtag
    Scope

    This core and admin domain contains all generic web services that can be used in other domains. Most generic services relate to device management including powerful device authorization management

    hashtag
    Common webservices

    hashtag
    Admin webservices

    Distribution automation

    The Open Smart Grid Platform can also be used in the monitoring of a variety of components in substations; RTUs, switches, transformers, etc. Often, an RTU or Remote Terminal Unit is used as a central information hub in a substation. The RTU is connected to one or more sensors or devices that can measure any kind of information. Usually, the focus is on measuring power quality values, temperature and other 'health' variables, but any kind of measurable data can be read through OSGP.

    hashtag
    Scope

    The goal of this domain is to control and monitor substations; the current focus is on health status information and power quality data, but this may be extended in the future.

    hashtag
    Features

    Currently, the following features are available within the Open Smart Grid Platform using the IEC 61850 protocol;

    hashtag
    Get PQ Values

    Get PQ Values retrieves the actual, current PQ values from a device. Examples of PQ values are Current, Voltage, Reactive Power, Active Power, etc. These examples merely serve as an indication of what is possible; OSGP does not impose any restriction on the number or content of variables that can be read. The outline of what should be measured is configured on the device and in the application that reads the data.

    hashtag
    Get Health Status

    Retrieves the current health status of a device. This is useful in a monitoring application.

    hashtag
    Get Device Model

    Retrieves the device model or metadata of a device. This includes the variables that can be measured, the information structure of the device, etc.

    hashtag
    Notifications

    When either report data or the result for a request is available, a notification is sent to a client, after which the client will be able to obtain the data or result by sending an 'async' message. A notification message always contains the correlation ID of the original request; the client can retrieve the result using this correlation ID.

    hashtag
    Messages

    • GetPQValues is a request to retrieve PQ values from a device.

    • GetPQValuesAsync is a request to retrieve the result of the GetPQValues request or to retrieve report data pushed by the device.

    • GetHealthStatus is a request to retrieve the health status of a device.

    hashtag
    WSDLs

    Light Schedules

    Schedules for light switching can be set using Set Schedule requestsarrow-up-right from the Public Lighting Schedule Management web servicearrow-up-right. For brevity the XML element and type names in the descriptions below will not include the namespace (which will typically be "http://www.opensmartgridplatform.org/schemas/publiclighting/schedulemanagement/2014/10").

    A switching schedule is defined by a number of declarations of switching moments (also known as schedule entries). The SetScheduleRequest defines the schedule, where Schedules of type Schedule define the entries. A complete schedule for a device as set with the Set Schedule request can have 1 up to 50 entries. Each schedule entry defines a moment on a day when certain relays on a device are switched on or off. Whether or not a switch action defined in a schedule entry is executed may not only depend on the entry itself. Other switch moments from the schedule that are close in time compared to an entry may cause switching to be skipped.

    A more detailed description of the components defining a schedule entry is in the sections below:

      • explicitly configured

    hashtag
    Week Day

    The value of WeekDay is used to indicate on which days the schedule entry may trigger switch actions.

    hashtag
    Time

    Each schedule entry can cause switching at a single time during the day. There are a number of ways in which this time can be specified, starting with ActionTime.

    For ActionTime values SUNRISE or SUNSET the value of TriggerType specifies what the actual switching time should be.

    hashtag
    Fixed Time

    For ActionTime ABSOLUTETIME a fixed time can be set for the switching moment as Time. The Time value needs to be formatted in a way the can handle. For the currently listed implementations, you should be fine when you use a format from:

    • hh:mm;

    • hh:mm:ss;

    • hh:mm:ss.SSS

    With hh from 00 to 23, mm from 00 to 59, ss from 00 to 59 and SSS from 000 to 999. Some protocols may accept more precise time formats than they support. The IEC61850 implementation for instance, will silently apply only the hours and minutes from any of the formats listed above.

    hashtag
    Astronomical Time

    For ActionTime SUNRISE or SUNSET with TriggerType ASTRONOMICAL the astronomical sunrise or sunset time (as calculated by the switching device, based on its longitude and latitude) will be used to determine the switching moment.

    hashtag
    Astronomical Offsets

    If an astronomical offset is configured, it has to be added to the calculated astronomical time to determine the time to be used as the switching moment. For positive offset values, the astronomical time for the switching moment will be the configured amount of minutes after the calculated astronomical sunrise or sunset time, while for negative values the astronomical time used will be the number of minutes before the calculated astronomical sunrise or sunset time.

    ####Astronomical Sunrise Offset

    The astronomical sunrise offset is applied with entries with ActionTime SUNRISE and TriggerType ASTRONOMICAL. The following picture is an example of switching off at 07:30; the calculated astronomical sunrise (say at 07:15 for the day shown) plus 15 minutes (configured as AstronomicalSunriseOffset 15).

    ####Astronomical Sunset Offset

    The astronomical sunset offset is similar to the , except that it is applied with entries with ActionTime SUNSET and TriggerType ASTRONOMICAL.

    hashtag
    Astronomical Time With Sensor

    For ActionTime SUNRISE or SUNSET with TriggerType LIGHT_TRIGGER the calculated astronomical sunrise or sunset time will be used as a reference time with a trigger window to determine the switching moment. The astronomical time itself is calculated in the same way as with (without light sensor input). Switching happens within a configured around the astronomical time, at a moment that is influenced by a signal from a light sensor.

    hashtag
    Trigger Window

    The TriggerWindow with its minutesBefore and minutesAfter defines a window of time around an astronomical sunrise or sunset time with sensor. Switching will occur at the start of the window when light sensor input is received before the window. Switching will occur at the end of the window when light sensor input is not received before the end of the window. Switching will occur at the time light sensor input is received, when this input is received within the window.

    Light sensor input in the conditions above means the sensor trigger for light when the schedule entry is switching off, and the sensor trigger for dark when switching on.

    hashtag
    Astronomical Time With Sensor Signal Within The Trigger Window

    The following picture is an example where the light sensor reports dark within the trigger window for a schedule entry for astronomical time with sensor signal. Switching on occurs at the time the sensor input is received. Note that for this example this could have been at any time between 19:45 and 20:30 (15 minutes before to 30 minutes after the astronomical sunset, calculated to occur at 20:00 on the day shown).

    hashtag
    Astronomical Time With Sensor Signal Before The Trigger Window Opens

    The following picture is an example where the device has received a light sensor report before the trigger window opens for a schedule entry for astronomical time with sensor signal. Switching off occurs at the start of the trigger window.

    hashtag
    Astronomical Time Without Sensor Signal Before The Trigger Window Closes

    The following picture is an example where the device has not received a light sensor report before the trigger window closes for a schedule entry for astronomical time with sensor signal. Switching on occurs at the end of the trigger window.

    hashtag
    Minimal Burning Time

    For certain types of lighting it may be undesirable to switch the lights on only for a short period of time, after which they are switched off again. In such a case the action of switching the lights on will be suppressed if minimumLightsOn is set with a positive number of seconds, and the action switching the lights off again is expected within this time period.

    The minimal burning time is always regarded with respect to an actual time for a switching moment that switches a relay on in comparison with the expected time of the next switching moment where the same relay will be switched off again. Switching on will be skipped if switching off is expected to occur within a number of minutes set as minimumLightsOn with the schedule entry that switches the relay on.

    hashtag
    Minimal Burning Time With Astronomical Offset

    This example shows the minimal burning time preventing the to be switched on at a fixed time because switching off at the calculated time of astronomical sunrise (with offset) would happen before passing of the minimum number of minutes the lights should be kept on.

    hashtag
    Minimal Burning Time With Light Sensor Trigger Window

    This example shows the minimal burning time preventing the to be switched on at a fixed time because switching off at the start of the trigger window around the calculated time of astronomical sunrise would happen before passing of the minimum number of minutes the lights should be kept on.

    hashtag
    Light Value

    Each schedule entry may include 1 to 6 LightValue elements. These light values determine the relay to switch, whether the relay should be switched on or off, and whether the lights with a relay should be dimmed (and by how much).

    • Index: 0 for all light switching relays in the device, or 1 to 6 for numbered relays (the

      index should indicate an existing relay that is used for light switching).

    • On

    hashtag
    Common Light Scheduling Patterns

    Here are some examples of patterns that are common with light schedules. The patterns are formed by combinations of schedule entries that switch on or off lights controlled by a certain relay on the switching device.

    hashtag
    All Night Lights

    All night lights is a name for lights that are turned on around sunset and keep burning all night until they are switched off again around sunrise. The all night lights are switched by a pair of schedule entries:

    • one entry switching on at with

      or .

    • another entry switching off again based on with

      or .

    hashtag
    Morning Lights

    Morning lights is a name used for lights that are switched on a short period in the morning hours of a day to illuminate a period before or around the morning twilight. The morning lights are switched by a pair of schedule entries:

    • one entry switching on at a ;

    • another entry switching off again based on with

      or .

    hashtag
    Fixed Time And Sunrise Interaction

    Depending on the location of the device the time of sunrise may vary quite a bit throughout the year. Because of this it is possible that what for some period would be a very reasonable schedule, is a questionable schedule (possibly to be considered ) in another season.

    During the summer in the Netherlands for example sunrise can be as early as approximately 05:15, while during the winter the sun may rise even a little later than 08:45. For this example we will assume configuration for the morning lights to switch on at fixed time of say 06:00. This is a time after the earliest sunrise in the year, but well before the latest sunrise in the year. To complete the morning lights configuration, a second switching moment is configured to switch the lights off at sunrise. With this set up the lights will be switched off after having been on for almost three hours at some time in the winter (for instance from 06:00 to 08:45). During summer at some days the lights will not be switched off in the morning at all because they were turned on (at 06:00) after sunrise (switching off at any time before 06:00, for instance at 05:30).

    Whether the lights stay on all day in the summer or not is something to be looked into. A switching device may have logic to deal with this situation figuring out the switch off belongs with the later switching moment to turn the lights on, and decide not to switch on. If not, some validation may be needed to enforce such schedules not to be configured.

    hashtag
    Evening Lights

    Evening lights is a name used for lights that are switched on a short period in the evening hours of a day to illuminate a period after or around dusk. This is similar to the , but in the evening instead of the morning, and the fixed time moment comes (normally) after the switch action around sunset.

    The evening lights are switched by a pair of schedule entries:

    • one entry switching on at with

      or .

    • another entry switching off again based on ;

    hashtag
    Fixed Time And Sunset Interaction

    Depending on the location of the device the time of sunset may vary quite a bit throughout the year. Because of this it is possible that what for some period would be a very reasonable schedule, is a questionable schedule (possibly to be considered ) in another season. See the for a graphical example.

    hashtag
    Evening/Morning Lights

    A combination of and can be configured for a relay if the lights may be turned off for a period in the late night and early morning, as opposed to the that keep on burning all through the night.

    hashtag
    Validity

    The GXF Public Lighting Schedule Management web service does not do much validation, other than checking authorizations for the device identified by the DeviceIdentification from the SetScheduleRequest and whether the request conforms to its XML schema definitions.

    If for certain applications more constraints are desirable, it is left up to those applications to make sure the requests made to the platform conform to those additional constraints. Examples of such constraints, that are not enforced by GXF, could be:

    • no duplicated schedule entries;

    • no schedule entries canceling the switch actions of other entries within some time window;

    • schedule entries may be required for all days of the week;

    hashtag
    Protocol Implementations For Light Schedules

    Microgrids

    The Open Smart Grid Platform act as an central component to monitor and control microgrids.

    hashtag
    Scope

    The goal of this domain is to control and monitor microgrids.

    Tariff switching

    This covers the services for tariff switching domain using the open smart grid platform.

    hashtag
    Scope

    This domain allows tariff switching. It allows a relay to switch when a tariff changes. This domain could be used to replace ripple control tariff signals.

    bypass retry

    By adding an element BypassRetry in namespace with a value true or false, you can bypass retry when request to the device fail.

    Smart lighting

    hashtag
    This domain covers the use of the open smart grid platform for smart lighting.

    hashtag
    Scope

    hashtag
    Features

    Currently, the following features are available within the Open Smart Grid Platform:

    hashtag
    Get Data

    Get data is used to retrieve measurement and profile data from the device

    hashtag
    Set Data

    Set data is used to set setpoints and profiles on the device

    hashtag
    Notifications

    When either report data or the result for a request is available, a notification is sent to a client, after which the client will be able to obtain the data or result by sending an 'async' message.

    hashtag
    Reporting

    When a device is connected it will periodically push measurement reports (and send trigger-based status reports) to OSGP. OSGP will inform the client via a notification, after which the data can be retrieved in a way similar to GetData (using the GetDataAsync message). In order to determine whether all report data are received, the response of a GetDataAsync message will (in case of a report) contain report metadata consisting of a report id, sequence number and time of entry.(XSD is already updated with report metadata, returning the report metadata from OSGP is not yet implemented)

    hashtag
    Messages

    • GetData is a request to retrieve measurement and profile data from a device.

    • GetDataAsync is a request to retrieve the result of the GetData request or to retrieve report data pushed by the device.

    • SetData is a request to set setpoints and profiles on a device.

    • SetDataAsync is a request to retrieve the result of the SetData request.

    hashtag
    WSDLs

    • WSDL's and schema'sarrow-up-right

    hashtag
    Cucumber test

    Functionality like GetData can now be tested, with the Cucumber framework, using the protocol-simulator-iec61850. This simulator can be started from the Cucumber tests, and is configured with its own properties file.

    hashtag
    Multiple Server names

    By default the RTU device is configured with the servername: WAGO61850Server. This name also appears in the icd file, that is used by the RTU device. The name of this icd file, is configured in a properties file. Multiple server names are now supported, with the introduction of the new column: server_name in the iec61850_device table. If this value is null, the default servername (WAGO61850Server) is used, otherwise the servername from the database is used (eg 'WAGO123'). In that case another corresponding icd file, in which this servername is used, must be configured!

    Kevin Smeetsarrow-up-right
    Jonas van den Bogaardarrow-up-right

    GetHealthStatusAsync is a request to retrieve the result of a GetHealthStatus request.

  • GetDeviceModel is a request to retrieve the device model from a device

  • GetDeviceModelAsync is a request to retrieve the result of a GetDeviceModel request.

  • WSDL's and schema'sarrow-up-right
    http://www.opensmartgridplatform.org/schemas/common/2014/10arrow-up-right

    Web Services

    This chapter describes all the web services in the smart metering domain.

    Devices

    StartDeviceTest

    DeviceIdentification

    -

    StopDeviceTest

    DeviceIdentification

    -

    UpdateDevice

    DeviceIdentification

    -

    GetStatus

    DeviceIdentification

    Status

    AdminDeviceManagement.wsdl / CoreDeviceManagement.wsdl

    ChangeOrganisation

    Organisation

    -

    CreateOrganisation

    Organisation

    -

    FindAllOrganisations

    -

    Organisations

    FindDeviceAuthorisations

    DeviceIdentification

    DeviceAuthorisations

    FindDevices

    PageSize, Page

    Devices, Page

    FindEvents

    DeviceIdentification, From, Until, PageSize, Page

    Events, Page

    FindMessageLogs

    DeviceIdentification, Page

    MessageLogPage

    RemoveDevice

    DeviceIdentification

    -

    RemoveOrganisation

    Organisation

    SetEventNotifications

    DeviceIdentification, EventNotifications

    -

    SetOwner

    DeviceIdentification, OrganisationIdentification

    -

    UpdateDeviceAuthorisations

    DeviceAuthorisations

    -

    ActivateOrganisation

    Organisation

    -

    SetDeviceLifecycleStatus

    DeviceIdentification, DeviceLifecycleStatus

    -

    CoreFirmwareManagement.wsdl

    GetFirmwareVersion

    DeviceIdentification

    FirmwareVersion

    UpdateFirmware

    DeviceIdentification, FirmwareIdentification

    -

    CoreConfigurationManagement.wsdl

    GetConfiguration

    DeviceIdentification

    Configuration

    SetConfiguration

    DeviceIdentification, Configuration

    -

    CoreAdHocManagement.wsdl

    SetReboot

    DeviceIdentification

    -

    Operation

    Request

    Response

    CoreDeviceInstallation.wsdl

    AddDevice

    DeviceIdentification

    -

    FindDevicesWhichHaveNoOwner

    -

    Devices

    FindRecentDevices

    Core WSDL'sarrow-up-right
    Core XSD schema'sarrow-up-right
    Admin WSDL'sarrow-up-right
    Admin XSD schema'sarrow-up-right

    -

    time of sunrise or sunset

  • time of sunrise or sunset combined with sensor input

  • light value

  • Sundays

    WEEKDAY

    weekdays (Monday to Friday)

    WEEKEND

    weekend days (Saturday or Sunday)

    ABSOLUTEDAY

    the day specified in startDay

    ALL

    any day

    :
    true
    if this entry is for switching on the relay(s) identified by
    Index
    ;
    false
    for

    switching off.

  • DimValue: optional percentage set as number 1 to 100 indicating a dim value; will be ignored

    when the protocol or switching device does not support dimming.

  • switching on and off might be required to happen each day in equal number of times and alternately;
  • checking expected actions around daylight saving change;

  • checking expected switching actions for days with the longest or shortest number of hours of daylight;

  • light value indexes map to existing light relays on the device the schedule is set on;

  • constraints from applying the provided input with specific devices or protocols.

  • WeekDay

    May trigger a switch action on

    MONDAY

    Mondays

    TUESDAY

    Tuesdays

    WEDNESDAY

    Wednesdays

    THURSDAY

    Thursdays

    FRIDAY

    Fridays

    SATURDAY

    Saturdays

    ActionTime

    Description

    ABSOLUTETIME

    a fixed time is set for the switching moment in Time

    SUNRISE

    switching at sunrise at the location of the device

    SUNSET

    switching at sunset at the location of the device

    TriggerType

    Description

    LIGHT_TRIGGER

    astronomical time with sensor input determines the actual switching time

    ASTRONOMICAL

    the calculated astronomical time for sunrise or sunset is the switching time

    week day
    time
    fixed time
    protocol implementations
    astronomical sunrise offset
    astronomical time
    trigger window
    morning lights
    morning lights
    astronomical sunset time
    optional offset
    light sensor trigger
    astronomical sunrise time
    optional offset
    light sensor trigger
    fixed time
    astronomical sunrise time
    optional offset
    light sensor trigger
    invalid
    morning lights
    astronomical sunset time
    optional offset
    light sensor trigger
    fixed time
    invalid
    explanation around sunrise
    morning lights
    evening lights
    all night lights
    IEC61850
    OSLP v0.6.1
    Switching off at astronomical sunrise with 15 minutes offset
    Switching on when sensor reports dark within the trigger window
    Switching off when sensor input is received before the trigger window opens
    Switching on when no sensor input is received before the trigger window closes
    Astronomical switching off within minimum lights on of fixed time switching on
    Trigger window switching off within minimum lights on of fixed time switching on
    All Night Lights based on astronomical offset
    Morning Lights throughout the year
    Evening/Morning Lights based on light triggers

    SUNDAY

    hashtag
    Webservices

    Operation

    Request

    Response

    TariffSwitchingAdHocManagement.wsdl

    GetDevices

    GetStatus

    DeviceIdentification

    Status

    TariffSwitchingScheduleManagement.wsdl

    • Tariff switching WSDL'sarrow-up-right

    • Tariff switching XSD schema'sarrow-up-right

    hashtag
    TARIFF (normal) vs. TARIFF_REVERSED

    When configuring a device via the platform to switch relays according to a tariff schedule, the device can be instructed to switch the tariff relay normally ("TARIFF") or reversed ("TARIFF_REVERSED").

    The devices themselves are unaware of the difference between TARIFF and TARIFF_REVERSED. When sending a setScheduleRequest message for a tariff schedule to the platform, the tariff switching domain adapter checks if the device relay(s) are configured with TARIFF_REVERSED. If so, the tariff switching domain adapter will invert the relay value for all tariff schedule entries before the tariff schedule is sent to the device.

    When two devices have the same schedule, while one device is using TARIFF and the other TARIFF_REVERSED, the state of their tariff relays will always be the opposite of each other.

    hashtag
    Communicated/Stored values

    The values as shown in the table below will be returned, when getting the status from a device or from the platform.

    Type

    State

    Relay powered

    Returned by Device

    Returned by Platform

    TARIFF

    LOW

    yes

    on = true

    High = false

    HIGH

    no

    on = false

    The goal of this domain is to control, monitor and manage (street) lights at scale. It allows streetlight owners to control/manage the (street) lights in an more intelligent way compared to ripple control technology.

    hashtag
    Features

    This domain consist of Switching schedules, groups, light sensors, manual switching and monitoring of a typical public lighting use-case.

    hashtag
    PublicLighting webservices

    Operation

    Request

    Response

    PublicLightingAdHocManagement.wsdl

    SetTransition

    DeviceIdentification, TransitionType, Time

    -

    FindAllDevices

    Page

    DevicePage

    GetStatus

    • PublicLighting WSDL'sarrow-up-right

    • PublicLighting XSD schema'sarrow-up-right

    SmartMetering

    This chapter describes the SmartMetering domain including the web services. Currently the web services of the beta version are described, since the web services have not yet officially been released. Information on the DLMS device simulator can be found in the DLMS protocol section

    hashtag
    Scope

    The goal of this domain is to read and manage millions of smart meters. This includes smart meter installation, firmware updates, smart meter removal, read smart meter values, time synchronisation, etc. Everything that is needed to professionally manage millions of smart meters is or can be included in this domain.

    hashtag
    Features

    Currently, the following Smart Metering features are available within the open smart grid platform:

    • Add smart meter to the platform, so the device is known and additional actions can be performed for the device

    • Process shipment file, which adds several smart meters to the platform along with all needed information

    • Synchronize time between smart meters and head-end system, in case the smart meter adjusts its time, some events will be logged

    hashtag
    Generic functionality

    • operations can be given the flag 'bypass retry'. Which means that an operation will not be retried in case of an error.

    • operations can be given a priority from 0 to 9, default is 4. Higher values causes messages to be processed faster.

    • operations can be scheduled for a certain time.

    hashtag
    Messages

    hashtag
    SmartMeteringAdHoc

    • is an operation to synchronize the date and time on a device. The date and time are retrieved from the server and sent to the device.

    • is an operation which returns the response from the operation.

    • is an operation to obtain all the attributes of the whole tree of objects from an E-meter.

    hashtag
    SmartMeteringConfiguration

    • is an operation to set a dayId profile and its tariffs for a specific date on a device.

    • is an operation which returns the response from the operation.

    • is an operation to set ConfigurationObject settings on a device to specify behaviour and connection options.

    hashtag
    SmartMeteringInstallation

    • is an operation to add a device to the OSGP database.

    • is an operation which returns the response from the operation.

    • is an operation to couple a M-Bus device to a gateway.

    hashtag
    SmartMeteringManagement

    • is an operation to clear the M-Bus status on all channels, so G-meters are ready to raise new alarms.

    • is an operation to retrieve events logging from a device.

    • is an operation which returns the response from the operation.

    hashtag
    SmartMeteringMonitoring

    • is an operation to retrieve the actual meter reads from an E-meter.

    • is an operation which returns the response from the operation.

    • is an operation to retrieve the actual meter reads from a G-meter.

    hashtag
    DeviceManagement

    • is an operation to set the device lifecycle status of a device.

    • is an operation which returns the response from the operation.

    hashtag
    SmartMeteringNotification

    • is an operation to let Webapps know there is a result ready to retrieve from the platform.

    hashtag
    SmartMeteringBundle

    • is a special operation in which one or more single operation(s) to a specific device can be bundled.

    • is an operation which gets the response from the operation.

    All operations sent to this device make use of one communication channel, which may improve performance considerably.

    hashtag
    WSDL's

    GetGetAssociationLnObjectsResponse

    hashtag
    Description

    GetGetAssociationLnObjectsResponse returns the result values from getting the Association LN object. The response contains the DeviceIdentification and CorrelationUid which is received from the GetAssociationLnObjects request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    GetAssociationLnObjects

    hashtag
    Description

    GetAssociationLnObjects is a request to get the Association LN object tree from an E-meter. The request is sent with the DeviceIdentification number from the desired device.

    All requests have similar response behaviour which is described in ResponseMessages.

    GetGetAssociationLnObjectsResponse returns the result values from getting the Association LN object. The response contains the DeviceIdentification and CorrelationUid which is received from the GetAssociationLnObjects request.

    hashtag
    References

    XSD:

    WSDL:

    AdHocManagement

    Describes the actions as defined in

    scheduling

    By adding an element ScheduleTime in namespace with a xsd:dateTime value can schedule a message.

    priority

    By adding an element MessagePriority in namespace with a value from 0 - 9 you can give a message a lower or higher priority.

    SetSchedule

    DeviceIdentification, Schedules, Page

    -

    High = true

    TARIFF_REVERSED

    LOW

    no

    on = false

    High = false

    HIGH

    yes

    on = true

    High = true

    DeviceIdentification

    LightValues, PreferredLinkType, ActualLinkType, LightType, EventNotifications

    ResumeSchedule

    DeviceIdentification, Index, IsImmediate

    -

    SetLight

    DeviceIdentification, LightValue

    -

    PublicLightingScheduleManagement.wsdl

    SetSchedule

    DeviceIdentification, Schedules, Page

    -

    Retrieve events from the smart meter, several event logs are available

  • Retrieve periodic meter reads from the smart meter

  • bundling operations can be combined in a Bundle.

    GetRetrieveAllAttributeValuesResponsearrow-up-right is an operation which returns the response from the RetrieveAllAttributeValuesarrow-up-right operation.

  • GetSpecificAttributeValuearrow-up-right is an operation to obtain a specific attribute value from an ObisCode from an E-meter.

  • GetSpecificAttributeValueResponsearrow-up-right is an operation which returns the response from the GetSpecificAttributeValuearrow-up-right operation.

  • GetAssociationLnObjects is an operation to get the associated ln objects.

  • GetGetAssociationLnObjectsResponse is an operation which gets the response from the GetAssociationLnObjects operation.

  • ScanMbusChannels is an operation to get the M-Bus Short ID attribute values for all four channels from an E-meter.

  • ScanMbusChannelsResponse is an operation which returns the response from the ScanMbusChannels operation.

  • GetSetConfigurationObjectResponse is an operation which returns the response from the SetConfigurationObject operation.

  • GetConfigurationObject is an operation to retrieve a ConfigurationObject from a device.

  • GetConfigurationObjectResponse is an operation which returns the response, a ConfigurationObject, from the GetConfigurationObject operation.

  • SetPushSetupAlarm is an operation that pushes received alarm messages to OSGP.

  • GetSetPushSetupAlarmResponse is an operation which returns the response from the SetPushSetupAlarm operation.

  • SetPushSetupSms is an operation to set an endpoint in a device which tells the device where to connect to when it is waked up.

  • GetSetPushSetupSmsResponse is an operation which returns the response from the SetPushSetupSms operation.

  • SetAlarmNotifications is an operation to set the types of alarm notifications that must be notified from the device when they occur.

  • GetSetAlarmNotificationsResponse is an operation which returns the response from the SetAlarmNotifications operation.

  • SetKeyOnGMeter is an operation to transfer and set a G-meter key on a device.

  • GetSetKeyOnGMeterResponse is an operation which returns the response from the SetKeyOnGMeterRequest operation.

  • SetMbusUserKeyByChannel is an operation to set the M-Bus encryption key on an M-Bus device by using the E-meter device identification and channel from the G-meter.

  • SetMbusUserKeyByChannelResponsearrow-up-right is an operation which returns the response from the SetMbusUserKeyByChannel operation.

  • GetMbusEncryptionKeyStatus is an operation to retrieve the encryption key status for a M-Bus device.

  • GetGetMbusEncryptionKeyStatusResponse is an operation which returns the response from the GetMbusEncryptionKeyStatus operation.

  • GetMbusEncryptionKeyStatusByChannel is an operation to get the M-Bus encryption key status from an M-Bus device by using the E-meter device identification and channel from the G-meter.

  • GetMbusEncryptionKeyStatusByChannelResponsearrow-up-right is an operation which returns the response from the GetMbusEncryptionKeyStatusByChannel operation.

  • SetActivityCalendar is an operation to set several parameters on an E-meter such as tariffs per day in a week profile.

  • GetSetActivityCalendarResponse is an operation which returns the response from the SetActivityCalendar operation.

  • GetAdministrativeStatus is an operation to retrieve the current AdministrativeStatus setting.

  • GetGetAdministrativeStatusResponse is an operation which returns the response from the GetAdministrativeStatus operation.

  • SetAdministrativeStatus is an operation to set the AdministrativeStatus.

  • GetSetAdministrativeStatusResponse is an operation which returns the response from the SetAdministrativeStatus operation.

  • GetFirmwareVersion is an operation to retrieve the firmware version(s).

  • GetGetFirmwareVersionResponse is an operation which returns the response from the GetFirmwareVersionoperation.

  • ReplaceKeys is an operation to change the keys on a E-meter.

  • GetReplaceKeysResponse is an operation which returns the response from the ReplaceKeys operation.

  • UpdateFirmware is an operation to update the firmware module(s) on a device.

  • GetUpdateFirmwareResponse is an operation which returns the response from the UpdateFirmware operation.

  • GenerateAndReplaceKeysarrow-up-right is an operation to generate and set the encryption and authentication key on a device.

  • GenerateAndReplaceKeysResponsearrow-up-right is an operation which returns the response from the GenerateAndReplaceKeysarrow-up-right operation.

  • SetClockConfigurationarrow-up-right is an operation to set the clock configuration on a device.

  • GetSetClockConfigurationResponsearrow-up-right is an operation which returns the response from the SetClockConfigurationarrow-up-right operation.

  • ConfigureDefinableLoadProfile is an operation to configure the load profile on a device.

  • GetConfigureDefinableLoadProfileResponse is an operation which returns the response from the ConfigureDefinableLoadProfile operation.

  • GetCoupleMbusDeviceResponse is an operation which returns the response from the CoupleMbusDevice operation.

  • CoupleMbusDeviceByChannelarrow-up-right is an operation to couple a M-Bus device to a gateway.

  • GetCoupleMbusDeviceByChannelResponsearrow-up-right is an operation which returns the response from the CoupleMbusDeviceByChannelarrow-up-right operation.

  • DeCoupleMbusDevice is an operation to decouple an M-Bus device from a gateway.

  • GetDeCoupleMbusDeviceResponse is an operation which returns the response from the DeCoupleMbusDevice operation.

  • GetDevices is an operation to retrieve the last known relay statuses for a group of devices.

  • EnableDebugging is an operation to enable debug logging for a device.

  • GetEnableDebuggingResponsearrow-up-right is an operation which returns the response from the EnableDebugging operation.

  • DisableDebugging is an operation to disable debug logging for a device.

  • GetDisableDebuggingResponsearrow-up-right is an operation which returns the response from the DisableDebugging operation.

  • FindMessageLogs is an operation to read the debug logging from a device.

  • GetFindMessageLogsResponsearrow-up-right is an operation which returns the response from the FindMessageLogs operation.

  • SetDeviceCommunicationSettingsarrow-up-right is an operation to set the OSGP device communication settings for a specific device.

  • SetDeviceCommunicationSettingsResponsearrow-up-right is an operation which returns the response from the SetDeviceCommunicationSettingsarrow-up-right operation.

  • SetDeviceLifecycleStatusarrow-up-right is an operation to set the lifecycle status from a device.

  • SetDeviceLifecycleStatusResponsearrow-up-right is an operation which returns the response from the SetDeviceLifecycleStatusarrow-up-right operation.

  • SetDeviceLifecycleStatusByChannel is an operation to set the lifecycle status from a device.

  • SetDeviceLifecycleStatusByChannelResponse is an operation which returns the response from the SetDeviceLifecycleStatusByChannel operation.

  • GetActualMeterReadsGasResponse is an operation which returns the response from the ActualMeterReadsGasarrow-up-right operation.

  • GetPeriodicMeterReads is an operation to retrieve the periodic meter reads from an E-meter.

  • GetPeriodicMeterReadsResponse is an operation which returns the response from the PeriodicMeterReads operation.

  • GetPeriodicMeterReadsGas is an operation to retrieve the periodic meter reads from a G-meter.

  • GetPeriodicMeterReadsGasResponse is an operation which returns the response from the PeriodicMeterReadsGas operation.

  • GetProfileGenericData is an operation to retrieve any Profile Generic data from an E-meter.

  • GetProfileGenericDataResponse is an operation which returns the response from the ProfileGenericData operation.

  • ReadAlarmRegister is an operation to read the alarm register from a device.

  • GetReadAlarmRegisterResponse is an operation which returns the response from the ReadAlarmRegister operation.

  • RetrievePushNotificationAlarm is an operation to push retrieved alarm notifications to OSGP.

  • ClearAlarmRegisterarrow-up-right is an operation to clear the Alarm register flags for pushed event notifications.

  • ClearAlarmRegisterResponsearrow-up-right is an operation which returns the response from the ClearAlarmRegisterarrow-up-right operation.

  • bypass retry
    priority
    scheduling
    SynchronizeTime
    GetSynchronizeTimeResponse
    SynchronizeTime
    RetrieveAllAttributeValuesarrow-up-right
    SetSpecialDays
    GetSetSpecialDaysResponse
    SetSpecialDays
    SetConfigurationObject
    AddDevice
    GetAddDeviceResponse
    AddDevice
    CoupleMbusDevice
    ClearMBusStatusOnAllChannelsarrow-up-right
    FindEvents
    GetFindEventsResponse
    FindEvents
    GetActualMeterReads
    GetActualMeterReadsResponse
    ActualMeterReads
    GetActualMeterReadsGas
    SetDeviceLifecycleStatusarrow-up-right
    SetDeviceLifecycleStatusResponsearrow-up-right
    SetDeviceLifecycleStatusarrow-up-right
    SendNotification
    Bundle
    GetBundleResponse
    Bundle
    SmartMetering WSDL'sarrow-up-right
    SmartMetering XSD schema'sarrow-up-right
    sm-adhoc.xsdarrow-up-right
    SmartMeteringAdhoc.wsdlarrow-up-right
    sm-adhoc.xsdarrow-up-right
    SmartMeteringAdhoc.wsdlarrow-up-right
    SmartMeteringAdhoc.wsdlarrow-up-right
    http://www.opensmartgridplatform.org/schemas/common/2014/10arrow-up-right
    http://www.opensmartgridplatform.org/schemas/common/2014/10arrow-up-right

    GetRetrieveConfigurationObjectsResponse

    RetrieveConfigurationObjects

    SynchronizeTime

    hashtag
    Description

    SynchronizeTime request synchronizes the date and time on a device. The date and time are retrieved from the server and sent to the device with CLASS_ID 8, OBIS_CODE 0.0.1.0.0.255 and ATTRIBUTE_ID 2. The request is sent with the DeviceIdentification number from the desired device. The request should contain a Deviation of local time to UTC in minutes (from the range of -720 to 720 inclusive) and a value Dst indicating whether daylight savings is active. For example in Central European Summer Time, DST is active and times are UTC/GMT +2 hours. For devices in a region where CEST applies, during the summer time the value for deviation should be "-120" (120 minutes deducted from local time gives GMT/UTC time) and dst should be "true".

    All requests have similar response behaviour which is described in ResponseMessages.

    returns the result from synchronizing date and time. The response contains the DeviceIdentification and CorrelationUid which is received from the SynchronizeTime request.

    hashtag
    References

    XSD:

    WSDL:

    Bundle

    hashtag
    Description

    Bundle is a special request in which one or more single request(s) to a specific device can be bundled. All requests sent to this device make use of one communication channel, which may improve performance considerably.

    returns the result of the actions of the bundle. The response contains the DeviceIdentification and CorrelationUid which is received from the Bundle request.

    The Bundle request has an Actions tag. This contains a list of one or more single request(s). The response behavior is described in

    GetSynchronizeTimeResponse

    hashtag
    Description

    GetSynchronizeTimeResponse returns the result from synchronizing date and time. The response contains the DeviceIdentification and CorrelationUid which is received from the SynchronizeTime request.

    All requests have similar response behaviour which is described in .

    GetBundleResponse

    hashtag
    Description

    GetBundleResponse returns the result of the bundle requested with the Bundle method. The response contains the DeviceIdentification and CorrelationUid which is received from the request.

    All requests have similar response behaviour which is described in .

    GetSynchronizeTimeResponse
    sm-adhoc.xsdarrow-up-right
    SmartMeteringAdhoc.wsdlarrow-up-right
    hashtag
    References

    XSD: sm-adhoc.xsdarrow-up-right

    WSDL: SmartMeteringAdhoc.wsdlarrow-up-right

    ResponseMessages
    hashtag
    References

    XSD:

    sm-adhoc.xsdarrow-up-right

    sm-bundle.xsdarrow-up-right

    sm-configuration.xsdarrow-up-right

    sm-management.xsdarrow-up-right

    sm-monitoring.xsdarrow-up-right

    WSDL: SmartMeteringBundle.wsdlarrow-up-right

    Bundle
    ResponseMessages
    .

    hashtag
    Actions

    Currently, the following actions are supported:

    • FindEventsRequest see FindEvents

    • SetSpecialDaysRequest see SetSpecialDays

    • ReadAlarmRegisterRequest see ReadAlarmRegister

    • GetActualMeterReadsRequest see

    • GetActualMeterReadsGasRequest see

    • GetAdministrativeStatusRequest see

    • GetPeriodicMeterReadsRequest see

    • GetPeriodicMeterReadsGasRequest see

    • SetAdministrativeStatusRequest see

    • SetActivityCalendarRequest see

    • SetKeyOnGMeterRequest see

    • SetAlarmNotificationsRequest see

    • SetConfigurationObjectRequest see

    • SetPushSetupAlarmRequest see

    • SetPushSetupSmsRequest see

    • SynchronizeTimeRequest see

    • GetConfigurationRequest

    • GetFirmwareVersionRequest

    • UpdateFirmwareRequest see

    • GetSpecificConfigurationObjectRequest see

    • SetKeysRequest

    • GetAssociationLnObjectsRequest

    • SetClockConfigurationRequest

    • GetProfileGenericDataRequest see

    • ConfigureDefinableLoadProfileRequest see

    • SetMbusUserKeyByChannelRequest see

    • GetMBusEncryptionKeyStatusRequest see

    hashtag
    References

    XSD: sm-bundle.xsdarrow-up-right

    WSDL: SmartMeteringBundle.wsdlarrow-up-right

    GetBundleResponse
    ResponseMessages

    UpdateFirmware

    hashtag
    Description

    UpdateFirmware is a request to install another firmware version(s) on a device. The request needs the DeviceIdentification and the firmware versions, that together with the device model (as stored with the identified device) uniquely determine the firmware file to be used.

    All requests have similar response behaviour which is described in .

    returns the version(s). The response contains the DeviceIdentification and CorrelationUid which is received from the UpdateFirmware request.

    Bundle

    You can combine multiple requests to a meter in a bundle by creating a BundleRequest with one or more Actions in the namespace . Each Action contains one of the existing requests to a meter.

    A bundle is executed using one connection to the meter. A bundle response contains all individual responses of executed commands both successful and unsuccessful. When an individual request fails it is retried when this is useful, more precisely the bundle is retried, executing only requests that are fit for re-submission.

    SpecificConfigurationObject

    hashtag
    Description

    SpecificConfigurationObject is a request to retrieve the data for a specific configuration object indicated with:

    • ClassId

    Attribute

  • ObisCode

  • hashtag
    References

    XSD: sm-configuration.xsdarrow-up-right

    WSDL: SmartMeteringBundle.wsdlarrow-up-right

    ReadAlarmRegister
    GetActualMeterReadsGas
    GetAdministrativeStatus
    GetPeriodicMeterReads
    GetPeriodicMeterReadsGas
    SetAdministrativeStatus
    SetActivityCalendar
    SetKeyOnGMeter
    SetAlarmNotifications
    SetConfigurationObject
    SetPushSetupAlarm
    SetPushSetupSms
    SynchronizeTime
    UpdateFirmware
    SpecificConfigurationObject
    SetClockConfigurationarrow-up-right
    GetProfileGenericData
    ConfigureDefinableLoadProfile
    SetMbusUserKeyByChannel
    GetMbusEncryptionKeyStatus

    hashtag
    References

    XSD: sm-configuration.xsdarrow-up-right

    WSDL: SmartMeteringConfiguration.wsdlarrow-up-right

    ResponseMessages
    GetUpdateFirmwareResponse
    http://www.opensmartgridplatform.org/schemas/smartmetering/sm-bundle/2014/10arrow-up-right

    ReplaceKeys

    hashtag
    Description

    ReplaceKeys is a request to change the keys on an E-meter. The request needs the DeviceIdentification, an AuthenticationKey and an EncryptionKey.

    All requests have similar response behaviour which is described in ResponseMessages.

    GetReplaceKeysResponse returns if the result is successful from the ReplaceKeys request. The response contains the DeviceIdentification and CorrelationUid which is received from the ReplaceKeys request.

    hashtag
    References

    XSD:

    WSDL:

    GetGetAdministrativeStatusResponse

    hashtag
    Description

    GetGetAdministrativeStatusResponse returns if the setting GetAdministrativeStatus is enabled. The response contains the DeviceIdentification and CorrelationUid which is received from the GetAdministrativeStatus request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    GetAdministrativeStatus

    hashtag
    Description

    GetAdministrativeStatus is a request to retrieve the current AdministrativeStatus setting from a device. The request needs the DeviceIdentification.

    All requests have similar response behaviour which is described in ResponseMessages.

    GetGetAdministrativeStatusResponse returns if the setting GetAdministrativeStatus is enabled. The response contains the DeviceIdentification and CorrelationUid which is received from the GetAdministrativeStatus request.

    hashtag
    References

    XSD:

    WSDL:

    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right

    GetFirmwareVersion

    hashtag
    Description

    GetFirmwareVersion is a request to retrieve the firmware version(s) of a device. The request needs the DeviceIdentification.

    All requests have similar response behaviour which is described in ResponseMessages.

    GetGetFirmwareVersionResponse returns the version(s). The response contains the DeviceIdentification and CorrelationUid which is received from the GetFirmwareVersion request.

    hashtag
    References

    XSD:

    WSDL:

    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right

    Configuration

    Describes the actions as defined in SmartMeteringConfiguration.wsdlarrow-up-right

    GetReplaceKeysResponse

    hashtag
    Description

    GetReplaceKeysResponse returns if the result is successful from the ReplaceKeys request. The response contains the DeviceIdentification and CorrelationUid which is received from the ReplaceKeys request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    GetUpdateFirmwareResponse

    hashtag
    Description

    GetUpdateFirmwareResponse returns the device firmware versions that are on the device after calling the UpdateFirmware method. The response contains the DeviceIdentification and CorrelationUid which is received from the UpdateFirmware request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    GetKeys

    hashtag
    Description

    GetKeys is a request to retrieve keys of a device. Multiple keys can be requested in one request. The keys in the response will be encrypted with the configured public key of the calling application.

    The following key types are allowed:

    • E_METER_MASTER_KEY,

    • E_METER_AUTHENTICATION_KEY,

    • E_METER_ENCRYPTION_KEY_UNICAST,

    • E_METER_ENCRYPTION_KEY_BROADCAST,

    • G_METER_MASTER_KEY,

    • G_METER_ENCRYPTION_KEY,

    • G_METER_FIRMWARE_UPDATE_AUTHENTICATION_KEY,

    • G_METER_OPTICAL_PORT_KEY

    All requests have similar response behaviour which is described in .

    hashtag
    References

    XSD:

    WSDL:

    GetSetActivityCalendarResponse

    hashtag
    Description

    GetSetActivityCalendarResponse returns the result from setting a SetActivityCalendar. The response contains the DeviceIdentification and CorrelationUid which is received from the SetActivityCalendar request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    SetAdministrativeStatus

    hashtag
    Description

    SetAdministrativeStatusis a request to set the AdministrativeStatus on a device. The request needs the DeviceIdentification and Enabled parameter.

    All requests have similar response behaviour which is described in .

    returns if the setting SetAdministrativeStatus is enabled. The response contains the DeviceIdentification and CorrelationUid which is received from the SetAdministrativeStatus request.

    SetAlarmNotifications

    hashtag
    Description

    SetAlarmNotifications is a request to set the types of alarm notifications that must be notified from the device when they occur. The following notifications can be enabled or disabled:

    CLOCK_INVALID, REPLACE_BATTERY, POWER_UP, PROGRAM_MEMORY_ERROR, RAM_ERROR, NV_MEMORY_ERROR, MEASUREMENT_SYSTEM_ERROR, WATCHDOG_ERROR, FRAUD_ATTEMPT, COMMUNICATION_ERROR_M_BUS_CHANNEL_1, COMMUNICATION_ERROR_M_BUS_CHANNEL_2, COMMUNICATION_ERROR_M_BUS_CHANNEL_3, COMMUNICATION_ERROR_M_BUS_CHANNEL_4, FRAUD_ATTEMPT_M_BUS_CHANNEL_1, FRAUD_ATTEMPT_M_BUS_CHANNEL_2, FRAUD_ATTEMPT_M_BUS_CHANNEL_3, FRAUD_ATTEMPT_M_BUS_CHANNEL_4, NEW_M_BUS_DEVICE_DISCOVERED_CHANNEL_1, NEW_M_BUS_DEVICE_DISCOVERED_CHANNEL_2, NEW_M_BUS_DEVICE_DISCOVERED_CHANNEL_3, NEW_M_BUS_DEVICE_DISCOVERED_CHANNEL_4

    The request needs the DeviceIdentification, AlarmType and Enabled parameters.

    All requests have similar response behaviour which is described in ResponseMessages.

    GetSetAlarmNotificationsResponse returns the result from setting a SetAlarmNotifications. The response contains the DeviceIdentification and CorrelationUid which is received from the SetAlarmNotifications request.

    hashtag
    References

    XSD: sm-configuration.xsdarrow-up-right

    WSDL: SmartMeteringConfiguration.wsdlarrow-up-right

    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    ResponseMessages
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    hashtag
    References

    XSD: sm-configuration.xsdarrow-up-right

    WSDL: SmartMeteringConfiguration.wsdlarrow-up-right

    ResponseMessages
    GetSetAdministrativeStatusResponse

    GetSetAlarmNotificationsResponse

    hashtag
    Description

    GetSetAlarmNotificationsResponse returns the result from setting a SetAlarmNotifications. The response contains the DeviceIdentification and CorrelationUid which is received from the SetAlarmNotifications request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    SetActivityCalendar

    hashtag
    Description

    SetActivityCalendar is a request to set tariffs on an E-meter according a SeasonProfile and WeekProfile. In a WeekProfile, seven dayprofiles can be filled in with a start time and dayId which contains the tariff.

    The request needs the DeviceIdentification, CalendarName, ActivatePassiveCalendarTime, SeasonProfileName, SeasonStart, WeekProfileName, DayId and StartTime.

    All requests have similar response behaviour which is described in ResponseMessages.

    returns the result from setting a SetActivityCalendar. The response contains the DeviceIdentification and CorrelationUid which is received from the SetActivityCalendar request.

    hashtag
    References

    XSD:

    WSDL:

    GetGetFirmwareVersionResponse

    hashtag
    Description

    GetGetFirmwareVersionResponse returns the device firmware versions requested with the GetFirmwareVersion method. The response contains the DeviceIdentification and CorrelationUid which is received from the GetFirmwareVersion request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    GetSetActivityCalendarResponse
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    Layers

    SetPushSetupSms

    hashtag
    Description

    SetPushSetupSms is a request to set an endpoint in a device which tells the device where to connect to when it is woken. The request needs the DeviceIdentification, host URL and port.

    All requests have similar response behaviour which is described in ResponseMessages.

    GetSetPushSetupSmsResponse returns the result from setting a SetPushSetupSms. The response contains the DeviceIdentification and CorrelationUid which is received from the SetPushSetupSms request.

    hashtag
    References

    XSD:

    WSDL:

    GetSetPushSetupSmsResponse

    hashtag
    Description

    GetSetPushSetupSmsResponse returns the result from setting a SetPushSetupSms. The response contains the DeviceIdentification and CorrelationUid which is received from the SetPushSetupSms request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    SetKeyOnGMeter

    hashtag
    Description

    SetKeyOnGMeter is a request to transfer and set an encryption key, firmware update authentication key or an optical port key on a G-meter via the E-meter. The request needs the DeviceIdentification from the G-meter and the key type (secrettype). If the device identification of the G-meter is not known, but the gateway device identification and M-Bus channel are known, use the request instead. If the key type is the optical port key, the parameter to close the optical port can be set as well.

    All requests have similar response behaviour which is described in .

    GetSetConfigurationObjectResponse

    hashtag
    Description

    GetSetConfigurationObjectResponse returns the result from setting a ConfigurationObject. The response contains the DeviceIdentification and CorrelationUid which is received from the request.

    All requests have similar response behaviour which is described in .

    SetConfigurationObject

    hashtag
    Description

    SetConfigurationObject is a request to set ConfigurationObject settings on a device. The attributes with OBIS code 0-1:94.31.3.255 give access to set GPRS_operation_mode setting and following flags:

    • discover_on_open_cover

    GetSetAdministrativeStatusResponse

    hashtag
    Description

    GetSetAdministrativeStatusResponse returns if the setting SetAdministrativeStatus is enabled. The response contains the DeviceIdentification and CorrelationUid which is received from the request.

    All requests have similar response behaviour which is described in .

    GetSetKeyOnGMeterResponse

    hashtag
    Description

    GetSetKeyOnGMeterResponse returns the result from setting a SetKeyOnGMeter. The response contains the DeviceIdentification and CorrelationUid which is received from the request.

    All requests have similar response behaviour which is described in .

    SetSpecialDays

    hashtag
    Description

    SetSpecialDays is a request to set a dayId profile for a specific date on a device, other than the standard applicable dayId's. This can be useful to change tariffs and tariff scheduling for specific days such as public holidays. The request is send with the DeviceIdentification number from the desired device, date and dayId.

    All requests have similar response behaviour which is described in .

    returns the result from setting a Special Day. The response contains the DeviceIdentification and CorrelationUid which is received from the SetSpecialDays request.

    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    returns the result from setting a SetKeyOnGMeter. The response contains the DeviceIdentification and CorrelationUid which is received from the SetKeyOnGMeter request.

    hashtag
    References

    XSD:

    WSDL:

    SetMbusUserKeyByChannel
    ResponseMessages
    hashtag
    References

    XSD:

    WSDL:

    SetConfigurationObject
    ResponseMessages

    discover_on_power_on

  • dynamic_mbus_address

  • P0_enable

  • HLS_3_on_P3_enable

  • HLS_4_on_P3_enable

  • HLS_5_on_P3_enable

  • HLS_3_on_P0_enable

  • HLS_4_on_P0_enable

  • HLS_5_on_P0_enable

  • See DSMR document chapter 8.3 for detailed description. The request needs the DeviceIdentification, GprsOperationMode, ConfigurationFlagType and Enabled parameters.

    All requests have similar response behaviour which is described in .

    returns the result from setting a SetConfigurationObject. The response contains the DeviceIdentification and CorrelationUid which is received from the SetConfigurationObject request.

    hashtag
    References

    XSD:

    WSDL:

    hashtag
    References

    XSD:

    WSDL:

    SetAdministrativeStatus
    ResponseMessages
    hashtag
    References

    XSD:

    WSDL:

    SetKeyOnGMeter
    ResponseMessages

    hashtag
    References

    XSD:

    WSDL:

    ResponseMessages
    GetSetSpecialDaysResponse
    Functional Layers Overview
    GetSetKeyOnGMeterResponse
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    ResponseMessages
    GetSetConfigurationObjectResponse
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right

    GetSetPushSetupAlarmResponse

    hashtag
    Description

    GetSetPushSetupAlarmResponse returns the result from setting a SetPushSetupAlarm. The response contains the DeviceIdentification and CorrelationUid which is received from the SetPushSetupAlarm request.

    All requests have similar response behaviour which is described in ResponseMessages.

    hashtag
    References

    XSD:

    WSDL:

    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    Grid eXchange Fabric
    Functional Starting Architecture
    Functional Reference Architecture

    SetPushSetupAlarm

    hashtag
    Description

    SetPushSetupAlarm is a request to define the TCP message that is optionally sent by the device. The request consists of the DeviceIdentification and at least one of the following optional items:

    • The destination: Host URL and port.

    • The push object list, defining which information should be sent in the alarm.

    If an item is not included in the message, the value in the meter will remain unchanged.

    All requests have similar response behaviour which is described in .

    returns the result from setting a SetPushSetupAlarm. The response contains the DeviceIdentification and CorrelationUid which is received from the SetPushSetupAlarm request.

    hashtag
    References

    XSD:

    WSDL:

    ResponseMessages
    GetSetPushSetupAlarmResponse
    sm-configuration.xsdarrow-up-right
    SmartMeteringConfiguration.wsdlarrow-up-right
    Authorization Model
    Core model
    alt text
    DCO Eclipse
    DCO IntelliJ
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text
    alt text