Skip to content

Commit 4b56b60

Browse files
publish(dataModel.EnergyStorage): generated files for ElectrolyzerMeasurement
Date: 2026-06-09 23:01 UTC Generated by publish.py (smart-data-models publication pipeline)
1 parent 33367df commit 4b56b60

27 files changed

Lines changed: 2174 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
description: This is a compilation list of the current adopters of the data model [Data model] of the Subject [Subject]. All fields are non mandatory. More info at https://smart-data-models.github.io/data-models/templates/dataModel/CURRENT_ADOPTERS.yaml
2+
currentAdopters:
3+
-
4+
adopter:
5+
description:
6+
mail:
7+
organization:
8+
project:
9+
comments:
10+
startDate:

ElectrolyzerMeasurement/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[![Smart Data Models](https://smartdatamodels.org/wp-content/uploads/2022/01/SmartDataModels_logo.png "Logo")](https://smartdatamodels.org)
2+
# ElectrolyzerMeasurement
3+
Version: 0.0.1
4+
5+
## Description
6+
7+
A instantaneous measure of hydrogen generation / power consumption by a electrolyzer
8+
9+
notes appearing in the beginning of the README.md at the root of the data model directory
10+
### Specification
11+
12+
Link to the [interactive specification](https://swagger.lab.fiware.org/?url=https://smart-data-models.github.io/dataModel.EnergyStorage/ElectrolyzerMeasurement/swagger.yaml)
13+
14+
Link to the [specification](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec.md)
15+
16+
Enlace a la [Especificación en español](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec_ES.md)
17+
18+
Lien vers le [spécification en français](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec_FR.md)
19+
20+
Link zur [deutschen Spezifikation](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec_DE.md)
21+
22+
Link alla [specifica](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec_IT.md)
23+
24+
[仕様へのリンク](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec_JA.md)
25+
26+
[链接到规范](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec_ZH.md)
27+
28+
[사양 링크](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/doc/spec_KO.md)
29+
### Examples
30+
31+
Link to the [example](https://smart-data-models.github.io/dataModel.EnergyStorage/ElectrolyzerMeasurement/examples/example.json) (keyvalues) for NGSI v2
32+
33+
Link to the [example](https://smart-data-models.github.io/dataModel.EnergyStorage/ElectrolyzerMeasurement/examples/example.jsonld) (keyvalues) for NGSI-LD
34+
35+
Link to the [example](https://smart-data-models.github.io/dataModel.EnergyStorage/ElectrolyzerMeasurement/examples/example-normalized.json) (normalized) for NGSI-V2
36+
37+
Link to the [example](https://smart-data-models.github.io/dataModel.EnergyStorage/ElectrolyzerMeasurement/examples/example-normalized.jsonld) (normalized) for NGSI-LD
38+
### Dynamic Examples generation
39+
40+
Link to the [Generator](https://smartdatamodels.org/extra/ngsi-ld_generator.php?schemaUrl=https://raw.githubusercontent.com/smart-data-models/dataModel.EnergyStorage/master/ElectrolyzerMeasurement/schema.json&email=info@smartdatamodels.org) of NGSI-LD normalized payloads compliant with this data model. Refresh for new values
41+
42+
Link to the [Generator](https://smartdatamodels.org/extra/ngsi-ld_generator_keyvalues.php?schemaUrl=https://raw.githubusercontent.com/smart-data-models/dataModel.EnergyStorage/master/ElectrolyzerMeasurement/schema.json&email=info@smartdatamodels.org) of NGSI-LD keyvalues payloads compliant with this data model. Refresh for new values
43+
44+
Link to the [Generator](https://smartdatamodels.org/extra/geojson_features_generator.php?schemaUrl=https://raw.githubusercontent.com/smart-data-models/dataModel.EnergyStorage/master/ElectrolyzerMeasurement/schema.json&email=info@smartdatamodels.org) of geojson feature format payloads compliant with this data model. Refresh for new values
45+
### PostgreSQL schema
46+
### Contribution
47+
48+
If you have any issue on this data model you can raise an [issue](https://github.com/smart-data-models/dataModel.EnergyStorage/issues) or contribute with a [PR](https://github.com/smart-data-models/dataModel.EnergyStorage/pulls)
49+
50+
If you wish to develop your own data model you can start from [contribution manual](https://bit.ly/contribution_manual). Several services have been developed to help with:
51+
- [Test data model repository](https://smartdatamodels.org/index.php/data-models-contribution-api/) including the schema and example payloads, etc
52+
- [Generate PostgreSQL schema](https://smartdatamodels.org/index.php/sql-service/) to help create a table, create type, etc
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# ElectrolyzerMeasurement
2+
3+
### List of code samples
4+
5+
<!-- 50-List of code -->
6+
7+
<!-- [code entry](link) -->
8+
[code_for_using_dataModel.EnergyStorage_ElectrolyzerMeasurement.py](https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/code/code_for_using_dataModel.EnergyStorage_ElectrolyzerMeasurement.py)
9+
10+
<!-- /50-List of code -->
11+
12+
### Contribution
13+
You can raise an [issue](https://github.com/smart-data-models/dataModel.EnergyStorage/issues) or submit your [PR](https://github.com/smart-data-models/dataModel.EnergyStorage/pulls) on existing data models
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# This code allows you to install a orion-ld broker in a linux system
2+
# The manuals are here https://github.com/FIWARE/context.Orion-LD/tree/develop/doc/manuals-ld
3+
#
4+
# INSTALL NGSI LD broker (OrionLD)
5+
# sudo docker pull mongo:3.6
6+
# sudo docker pull fiware/orion-ld
7+
# sudo docker network create fiware_default
8+
# sudo docker run -d --name=mongo-db --network=fiware_default --expose=27017 mongo:3.6 --bind_ip_all --smallfiles
9+
# sudo docker run -d --name fiware-orionld -h orion --network=fiware_default -p 1026:1026 fiware/orion-ld -dbhost mongo-db
10+
#
11+
# TO RELAUNCH (only if you have already installed a broker in the same machine)
12+
# sudo docker stop fiware-orionld
13+
# sudo docker rm fiware-orionld
14+
# sudo docker stop mongo-db
15+
# sudo docker rm mongo-db
16+
# sudo docker network rm fiware_default
17+
#
18+
# CHECK INSTANCES
19+
# curl -X GET 'http://localhost:1026/version'
20+
# curl -X GET http://localhost:1026/ngsi-ld/v1/entities?local=true&limit=1000
21+
#
22+
# now the python code you can use to insert some value in the context broker
23+
24+
from pysmartdatamodels import pysmartdatamodels as sdm
25+
import subprocess
26+
import requests
27+
import sys
28+
29+
print("Searching broker...")
30+
serverUrl = None
31+
for _url in ["http://localhost:1026", "https://localhost:1026"]:
32+
try:
33+
if requests.get(f"{_url}/version", timeout=5).status_code == 200:
34+
serverUrl = _url
35+
print(f"Broker found at {serverUrl}")
36+
break
37+
except Exception:
38+
pass
39+
if serverUrl is None:
40+
serverUrl = input(
41+
"No broker found at default locations. Enter broker URL (or press Enter to abort): "
42+
).strip()
43+
if serverUrl:
44+
try:
45+
if requests.get(f"{serverUrl}/version", timeout=5).status_code != 200:
46+
print("WARNING: Cannot connect to broker. Script cannot provide results.")
47+
sys.exit(1)
48+
except Exception:
49+
print("WARNING: Cannot connect to broker. Script cannot provide results.")
50+
sys.exit(1)
51+
else:
52+
print("WARNING: No broker URL provided. Script cannot provide results.")
53+
sys.exit(1)
54+
55+
dataModel = "ElectrolyzerMeasurement"
56+
subject = "dataModel.EnergyStorage"
57+
58+
hydrogenFlowGenerated = 509.87
59+
attribute = "hydrogenFlowGenerated"
60+
value = hydrogenFlowGenerated
61+
# Updates the attribute in the broker; creates the entity if it does not exist
62+
print(sdm.update_broker(dataModel, subject, attribute, value, serverUrl=serverUrl, updateThenCreate=True))
63+
64+
powerConsumed = 2387.5
65+
attribute = "powerConsumed"
66+
value = powerConsumed
67+
# Updates the attribute in the broker; creates the entity if it does not exist
68+
print(sdm.update_broker(dataModel, subject, attribute, value, serverUrl=serverUrl, updateThenCreate=True))
69+
70+
refElectrolyzer = "urn:ngsi-ld:Electrolyzer:santander:EnergyStorage:electrolyzer:0001"
71+
attribute = "refElectrolyzer"
72+
value = refElectrolyzer
73+
# Updates the attribute in the broker; creates the entity if it does not exist
74+
print(sdm.update_broker(dataModel, subject, attribute, value, serverUrl=serverUrl, updateThenCreate=True))
75+
76+
print("In case you have installed the orion-ld broker (see header comments)")
77+
print("Execute this to check the entity was inserted:")
78+
command = ['curl', '-X', 'GET', 'http://localhost:1026/ngsi-ld/v1/entities?local=true&limit=1000']
79+
result = subprocess.run(command, capture_output=True, text=True)
80+
print(result.stdout)

ElectrolyzerMeasurement/doc/spec.md

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
<!-- 10-Header -->
2+
[![Smart Data Models](https://smartdatamodels.org/wp-content/uploads/2022/01/SmartDataModels_logo.png "Logo")](https://smartdatamodels.org)
3+
Entity: ElectrolyzerMeasurement
4+
===============================<!-- /10-Header -->
5+
<!-- 15-License -->
6+
[Open License](https://github.com/smart-data-models//dataModel.EnergyStorage/LICENSE.md)
7+
[document generated automatically](https://docs.google.com/presentation/d/e/2PACX-1vTs-Ng5dIAwkg91oTTUdt8ua7woBXhPnwavZ0FxgR8BsAI_Ek3C5q97Nd94HS8KhP-r_quD4H0fgyt3/pub?start=false&loop=false&delayms=3000#slide=id.gb715ace035_0_60)
8+
<!-- /15-License -->
9+
<!-- 20-Description -->
10+
Global description: **A instantaneous measure of hydrogen generation / power consumption by a electrolyzer**
11+
version: 0.0.1
12+
<!-- /20-Description -->
13+
<!-- 30-PropertiesList -->
14+
15+
## List of properties
16+
17+
<sup><sub>[*] If there is not a type in an attribute is because it could have several types or different formats/patterns</sub></sup>
18+
- `dataProvider[string]`: A sequence of characters identifying the provider of the harmonised data entity - `dateCreated[date-time]`: Entity creation timestamp. - `dateModified[date-time]`: Timestamp of the last modification of the entity - `hydrogenFlowGenerated[number]`: Hydrogen flow production (NL/h) - `id[uri]`: Unique ID of the object - `powerConsumed[number]`: power consumed (W) - `refElectrolyzer[uri]`: A reference to the entity Electrolyzer which it belongs the measurement - `type[string]`: Title of the form element <!-- /30-PropertiesList -->
19+
<!-- 35-RequiredProperties -->
20+
Required properties
21+
- `id` - `type` <!-- /35-RequiredProperties -->
22+
<!-- 40-NotesYaml -->
23+
notes appearing at the beginning of the spec
24+
<!-- /40-NotesYaml -->
25+
<!-- 50-DataModelHeader -->
26+
## Data Model description of properties
27+
Sorted alphabetically (click for details)
28+
<!-- /50-DataModelHeader -->
29+
<!-- 60-ModelYaml -->
30+
<details><summary><strong>full yaml details</strong></summary>
31+
```yaml
32+
ElectrolyzerMeasurement:
33+
description: A instantaneous measure of hydrogen generation / power consumption by a electrolyzer
34+
properties:
35+
dataProvider:
36+
description: A sequence of characters identifying the provider of the harmonised data entity
37+
type: string
38+
x-ngsi:
39+
type: Property
40+
dateCreated:
41+
description: Entity creation timestamp.
42+
format: date-time
43+
type: string
44+
x-ngsi:
45+
type: Property
46+
dateModified:
47+
description: Timestamp of the last modification of the entity
48+
format: date-time
49+
type: string
50+
x-ngsi:
51+
type: Property
52+
hydrogenFlowGenerated:
53+
description: Hydrogen flow production (NL/h)
54+
type: number
55+
x-ngsi:
56+
type: Property
57+
id:
58+
description: Unique ID of the object
59+
format: uri
60+
type: string
61+
x-ngsi:
62+
type: Property
63+
powerConsumed:
64+
description: power consumed (W)
65+
type: number
66+
x-ngsi:
67+
type: Property
68+
refElectrolyzer:
69+
description: A reference to the entity Electrolyzer which it belongs the measurement
70+
format: uri
71+
type: string
72+
x-ngsi:
73+
type: Property
74+
type:
75+
description: Title of the form element
76+
type: string
77+
x-ngsi:
78+
type: Property
79+
required:
80+
- id
81+
- type
82+
type: object
83+
x-derived-from: ''
84+
x-disclaimer: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the license conditions are met. Copyleft (c) 2023 Contributors to Smart Data Models Program
85+
x-license-url: https://github.com/smart-data-models/dataModel.EnergyStorage/blob/master/ElectrolyzerMeasurement/LICENSE.md
86+
x-model-schema: https://smart-data-models.github.io/dataModel.EnergyStorage/ElectrolyzerMeasurement/schema.json,
87+
x-model-tags: ''
88+
x-version: 0.0.1
89+
```
90+
</details>
91+
<!-- /60-ModelYaml -->
92+
<!-- 70-MiddleNotes -->
93+
notes appearing in the middle of the spec
94+
<!-- /70-MiddleNotes -->
95+
<!-- 80-Examples -->
96+
## Example payloads
97+
#### ElectrolyzerMeasurement NGSI-v2 key-values Example
98+
Here is an example of a ElectrolyzerMeasurement in JSON-LD format as key-values. This is compatible with NGSI-v2 when using `options=keyValues` and returns the context data of an individual entity.
99+
<details><summary><strong>show/hide example</strong></summary>
100+
```json
101+
{
102+
"id": "urn:ngsi-ld:ElectrolyzerMeasurement:santander:ElectrolyzerMeasurement:Generator:a34f24b",
103+
"type": "ElectrolyzerMeasurement",
104+
"hydrogenFlowGenerated":509.87 ,
105+
"powerConsumed": 2387.5,
106+
"dataProvider": "tlmat-unican",
107+
"dateCreated": "2019-01-01T12:00:00Z",
108+
"dateModified": "2025-03-01T12:00:00Z",
109+
"refElectrolyzer":"urn:ngsi-ld:Electrolyzer:santander:EnergyStorage:electrolyzer:0001"
110+
}
111+
```
112+
</details>
113+
#### ElectrolyzerMeasurement NGSI-v2 normalized Example
114+
Here is an example of a ElectrolyzerMeasurement in JSON-LD format as normalized. This is compatible with NGSI-v2 when not using options and returns the context data of an individual entity.
115+
<details><summary><strong>show/hide example</strong></summary>
116+
```json
117+
{
118+
"id": "urn:ngsi-ld:ElectrolyzerMeasurement:santander:ElectrolyzerMeasurement:Generator:a34f24b",
119+
"type": "ElectrolyzerMeasurement",
120+
"hydrogenFlowGenerated": {
121+
"type": "Number",
122+
"value": 509.87,
123+
"metadata": {}
124+
},
125+
"powerConsumed": {
126+
"type": "Number",
127+
"value": 2387.5,
128+
"metadata": {}
129+
},
130+
"dataProvider": {
131+
"type": "Text",
132+
"value": "tlmat-unican",
133+
"metadata": {}
134+
},
135+
"dateCreated": {
136+
"type": "DateTime",
137+
"value": "2019-01-01T12:00:00Z",
138+
"metadata": {}
139+
},
140+
"dateModified": {
141+
"type": "DateTime",
142+
"value": "2025-03-01T12:00:00Z",
143+
"metadata": {}
144+
},
145+
"refElectrolyzer": {
146+
"type": "Text",
147+
"value": "urn:ngsi-ld:Electrolyzer:santander:EnergyStorage:electrolyzer:0001",
148+
"metadata": {}
149+
}
150+
}
151+
```
152+
</details>
153+
#### ElectrolyzerMeasurement NGSI-LD key-values Example
154+
Here is an example of a ElectrolyzerMeasurement in JSON-LD format as key-values. This is compatible with NGSI-LD when using `options=keyValues` and returns the context data of an individual entity.
155+
<details><summary><strong>show/hide example</strong></summary>
156+
```json
157+
{
158+
"id": "urn:ngsi-ld:ElectrolyzerMeasurement:santander:ElectrolyzerMeasurement:Generator:a34f24b",
159+
"type": "ElectrolyzerMeasurement",
160+
"hydrogenFlowGenerated": 509.87,
161+
"powerConsumed": 2387.5,
162+
"dataProvider": "tlmat-unican",
163+
"dateCreated": "2019-01-01T12:00:00Z",
164+
"dateModified": "2025-03-01T12:00:00Z",
165+
"refElectrolyzer": "urn:ngsi-ld:Electrolyzer:santander:EnergyStorage:electrolyzer:0001",
166+
"@context": [
167+
"https://smartdatamodels.org/context.jsonld"
168+
]
169+
}
170+
```
171+
</details>
172+
#### ElectrolyzerMeasurement NGSI-LD normalized Example
173+
Here is an example of a ElectrolyzerMeasurement in JSON-LD format as normalized. This is compatible with NGSI-LD when not using options and returns the context data of an individual entity.
174+
<details><summary><strong>show/hide example</strong></summary>
175+
```json
176+
{
177+
"id": "urn:ngsi-ld:ElectrolyzerMeasurement:santander:ElectrolyzerMeasurement:Generator:a34f24b",
178+
"type": "ElectrolyzerMeasurement",
179+
"hydrogenFlowGenerated": {
180+
"type": "Property",
181+
"value": 509.87
182+
},
183+
"powerConsumed": {
184+
"type": "Property",
185+
"value": 2387.5
186+
},
187+
"dataProvider": {
188+
"type": "Property",
189+
"value": "tlmat-unican"
190+
},
191+
"dateCreated": {
192+
"type": "Property",
193+
"value": "2019-01-01T12:00:00Z"
194+
},
195+
"dateModified": {
196+
"type": "Property",
197+
"value": "2025-03-01T12:00:00Z"
198+
},
199+
"refElectrolyzer": {
200+
"type": "Relationship",
201+
"object": "urn:ngsi-ld:Electrolyzer:santander:EnergyStorage:electrolyzer:0001"
202+
},
203+
"@context": [
204+
"https://smartdatamodels.org/context.jsonld"
205+
]
206+
}
207+
```
208+
</details><!-- /80-Examples -->
209+
<!-- 90-FooterNotes -->
210+
notes appearing in the footer of the spec
211+
<!-- /90-FooterNotes -->
212+
<!-- 95-Units -->
213+
See [FAQ 10](https://smartdatamodels.org/index.php/faqs/) to get an answer on how to deal with magnitude units
214+
<!-- /95-Units -->
215+
<!-- 97-LastFooter -->
216+
---
217+
[Smart Data Models](https://smartdatamodels.org) +++ [Contribution Manual](https://bit.ly/contribution_manual) +++ [About](https://bit.ly/Introduction_SDM)<!-- /97-LastFooter -->

0 commit comments

Comments
 (0)