Skip to content

Cumulocity-IoT/cumulocity-mastr-wec-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cumulocity-mastr-wec-import

The Federal Network Agency (German: Bundesnetzagentur or BNetzA) is the German regulatory office for electricity, gas, telecommunications, post and railway markets. It also gives transparency to the public with a registry "MaStr" Markstammdatenregister.

This is a small node.js application which allows to read the exported csv files from MaStR and creates an asset structure out of it and create it on Cumulocity. Currently the script is focusing on wind turbines, could also be extendet to other assets like solar, bio-gas etc.

In addition the asset model is defined via Cumulocity Digital Twin Manager. Import Asset Model file

The CSV file can be downloaded via https://www.marktstammdatenregister.de/MaStR/Einheit/Einheiten/ErweiterteOeffentlicheEinheitenuebersicht

It is important to use the extendet "Erweitert" to get all informations like geo location etc.

How to run the scirpt

Clone the repository

Install

npm install

Export an CSV

Go to

https://www.marktstammdatenregister.de/MaStR/Einheit/Einheiten/ErweiterteOeffentlicheEinheitenuebersicht

Configure your filter with following default filter attributes:

  • Betriebs-Status entspricht In Betrieb
  • Energieträger entspricht Wind
  • Koordinate: Breitengrad (WGS84) ist nicht leer
  • Name des Windparks is nicht leer

Custom attributes (here you can select by region etc.):

  • Gemeinde entspricht *
  • Postleitzahl entspricht *

ErweiterteOeffentlicheEinheitenuebersicht

After you have selected you wind turbines you want to export. Click on:

ErweiterteOeffentlicheEinheitenuebersicht

It is important that the csv file is in UTF-8. Please change the encoding if necessary.

The csv file can be copied to import folder and should be changed int the app.js

function processCSVFile() {
    fs.createReadStream('import/wec_rostock_20231026.csv')

Configure your Cumulocity tenant

.env file

Import the Asset Model into Digital Twin Manager

Asset Model file

Run the srcipt

npm start

Result

The script will create the assets and the hierarchy.

Cockpit 1

Cockpit 2


These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.