Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions entsoe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# ENTSO-E

## Introduction

[ENTSO-E](https://www.entsoe.eu/data/transparency-platform/) is a European transparency platform for the energy market that provides
a large collection of energy related data.

This agent uses their [REST API](https://documenter.getpostman.com/view/7009892/2s93JtP3F6#3b383df0-ada2-49fe-9a50-98b1bb201c6b) to retrieve the `Energy Prices` (document type A44) data.

## Prerequisites

Accessing the REST API requires a security token. You must create an account and request such a token for your own usage.
To do so, follow the process described at [How to get security token? – Transparency Platform](https://transparencyplatform.zendesk.com/hc/en-us/articles/12845911031188-How-to-get-security-token).

## Agent usage

### ENTSO-E Agent

To get access to the data, add an ENTSO-E agent to your configuration.
On the agent, fill-in the `Security token` attribute with the token you got from ENTSO-E (see [Prerequisites](#prerequisites) above).
You can optionally add the `Polling millis` attribute to set the polling frequency. It defaults to 1h.

### Getting the data

Retrieved pricing data is stored as predicted datapoints of any compatible asset attribute in your configuration.
Note: Compatible means capable of storing positive or negative decimal numbers i.e. the attribute type must be Number or Big Number.
If the attribute is of a different type a warning log will be generated, predicted datapoints will still be generated
but inconsistencies in the system will occur (e.g. errors while trying to graph the attribute).

On an attribute of type `Number`, add an `Agent link` configuration (MetaItem).
Select the ENTSO-E agent created above, a `Zone` field will appear.
This indicates the region to fetch data for and must be an [Energy Identification Codes](https://www.entsoe.eu/data/energy-identification-codes-eic/).
[EIC Approved codes](https://www.entsoe.eu/data/energy-identification-codes-eic/eic-approved-codes/) provides a complete list of the available code.
Tip: when searching, be sure to select "All Codes" for the "EIC Type Code" criteria.
You'll for instance find that `10YNL----------L` is the code to use for The Netherlands.

Make sure to also add the `Has predicted data points` configuration to your attribute.

![](img/ENTSO-E-agent-link.png)
87 changes: 87 additions & 0 deletions entsoe/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apply plugin: "groovy"
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "signing"

base {
archivesName = "openremote-${project.name}-extension"
}

dependencies {
api "io.openremote:openremote-manager:$openremoteVersion"
api "io.openremote:openremote-model:$openremoteVersion"

api "org.jboss.resteasy:resteasy-client-api:$resteasyVersion"
api "org.jboss.resteasy:resteasy-jaxb-provider:$resteasyVersion"

testImplementation "io.openremote:openremote-test:$openremoteVersion"
}

jar {
from sourceSets.main.allJava
}

javadoc {
failOnError = false
}

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
maven(MavenPublication) {
group = "io.openremote.extension"
artifactId = "openremote-${project.name}-extension"
from components.java
pom {
name = 'OpenRemote ENTSO-E extension'
description = 'Adds the ENTSO-E extension'
url = 'https://github.com/openremote/extensions'
licenses {
license {
name = 'GNU Affero General Public License v3.0'
url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
}
}
developers {
developer {
id = 'developers'
name = 'Developers'
email = 'developers@openremote.io'
organization = 'OpenRemote'
organizationUrl = 'https://openremote.io'
}
}
scm {
connection = 'scm:git:git://github.com/openremote/extensions.git'
developerConnection = 'scm:git:ssh://github.com:openremote/extensions.git'
url = 'https://github.com/openremote/extensions/tree/main'
}
}
}
}

repositories {
maven {
if (!version.endsWith('-LOCAL')) {
credentials {
username = findProperty("publishUsername")
password = findProperty("publishPassword")
}
}
url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
}
}
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey && signingPassword) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}
Binary file added entsoe/img/ENTSO-E-agent-link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright 2026, OpenRemote Inc.
*
* See the CONTRIBUTORS.txt file in the distribution for a
* full listing of individual contributors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.openremote.extension.entsoe.agent.protocol;
Comment thread
ebariaux marked this conversation as resolved.

import jakarta.persistence.Entity;
import org.openremote.model.asset.agent.Agent;
import org.openremote.model.asset.agent.AgentDescriptor;
import org.openremote.model.value.AttributeDescriptor;
import org.openremote.model.value.ValueType;

import java.util.Optional;

@Entity
public class EntsoeAgent extends Agent<EntsoeAgent, EntsoeProtocol, EntsoeAgentLink> {

public static final AgentDescriptor<EntsoeAgent, EntsoeProtocol, EntsoeAgentLink> DESCRIPTOR = new AgentDescriptor<>(
EntsoeAgent.class, EntsoeProtocol.class, EntsoeAgentLink.class);

public static final AttributeDescriptor<String> SECURITY_TOKEN = new AttributeDescriptor<>("securityToken", ValueType.TEXT);

public static final AttributeDescriptor<String> BASE_URL = new AttributeDescriptor<>("baseURL", ValueType.TEXT).withOptional(true);

public EntsoeAgent() {
}

public EntsoeAgent(String name) {
super(name);
}

@Override
public EntsoeProtocol getProtocolInstance() {
return new EntsoeProtocol(this);
}

public Optional<String> getSecurityToken() {
return getAttributes().getValue(SECURITY_TOKEN);
}

public EntsoeAgent setSecurityToken(String value) {
getAttributes().getOrCreate(SECURITY_TOKEN).setValue(value);
return this;
}

public Optional<String> getBaseURL() {
return getAttributes().getValue(BASE_URL);
}

public EntsoeAgent setBaseURL(String value) {
getAttributes().getOrCreate(BASE_URL).setValue(value);
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright 2026, OpenRemote Inc.
*
* See the CONTRIBUTORS.txt file in the distribution for a
* full listing of individual contributors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.openremote.extension.entsoe.agent.protocol;

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import org.openremote.model.asset.agent.AgentLink;

public class EntsoeAgentLink extends AgentLink<EntsoeAgentLink> {

@NotNull
@JsonPropertyDescription("Energy Identification Code of zone to fetch data for")
@Pattern(regexp = "^\\d{2}[A-Z][A-Z0-9-]{12}[A-Z0-9]$")
private String zone;

// For Hydrators
public EntsoeAgentLink() {
}

public EntsoeAgentLink(String id) {
super(id);
}

public String getZone() {
return zone;
}

public void setZone(String zone) {
this.zone = zone;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2026, OpenRemote Inc.
*
* See the CONTRIBUTORS.txt file in the distribution for a
* full listing of individual contributors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.openremote.extension.entsoe.agent.protocol;

import org.openremote.model.AssetModelProvider;

public class EntsoeAgentModelProvider implements AssetModelProvider {

@Override
public boolean useAutoScan() {
return true;
}
}
Loading
Loading