Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Removed demo deployment (moved to deployments repo)

Rich Turner42e797e2f944
diff --git a/deployment/Dockerfile b/deployment/Dockerfile
deleted file mode 100644
index 8fcadac87..000000000
--- a/deployment/Dockerfile
+++ /dev/null
@@ -1,9 +0,0 @@
-# Default deployment when delpoyment-data volume is empty
-FROM debian:stretch-slim
-
-# Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadad
-ARG GIT_COMMIT=unknown
-LABEL git-commit=$GIT_COMMIT
-
-RUN mkdir -p /deployment/extensions
-ADD build/image /deployment
diff --git a/deployment/build.gradle b/deployment/build.gradle
deleted file mode 100644
index 8148810aa..000000000
--- a/deployment/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-apply plugin: "java"
-
-dependencies {
- compile resolveProject(":manager")
-}
-
-task installDist(type: Copy) {
- mustRunAfter (parent.getTasksByName('installDist', true).findAll {it.project != project})
- into "${buildDir}/image"
-
- from(projectDir) {
- exclude "build.gradle", "Dockerfile", "build", "src"
- }
-
- into("manager/extensions") {
- from jar.outputs
- }
-}
diff --git a/deployment/keycloak/themes/README.md b/deployment/keycloak/themes/README.md
deleted file mode 100644
index 47f945958..000000000
--- a/deployment/keycloak/themes/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Keycloak Custom Themes
-Each theme directory here will be volume mapped into the keycloak container, refer to the [OpenRemote Wiki](https://github.com/openremote/openremote/wiki).
diff --git a/deployment/manager/app/manager_config.json b/deployment/manager/app/manager_config.json
deleted file mode 100644
index 486123d64..000000000
--- a/deployment/manager/app/manager_config.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "realms": {
- "default": {
- "appTitle": "OpenRemote Manager Demo",
- "language": "en"
- }
- }
-}
diff --git a/deployment/manager/provisioning/consoleappconfig/smartcity.json b/deployment/manager/provisioning/consoleappconfig/smartcity.json
deleted file mode 100644
index 41b45fa31..000000000
--- a/deployment/manager/provisioning/consoleappconfig/smartcity.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "realm": "smartcity",
- "initialUrl": "https://demo.openremote.io/console_loader/?realm=smartcity&consoleProviders=geofence push storage",
- "url": "https://demo.openremote.io/manager/?realm=smartcity&consoleProviders=geofence push storage&consoleAutoEnable=true#!geofences",
- "menuEnabled": false,
- "menuPosition": "BOTTOM_RIGHT",
- "menuImage": null,
- "primaryColor": "#4D9D2A",
- "secondaryColor": "#CFCFCF",
- "links": [
- {
- "displayText": "Map",
- "pageLink": "https://demo.openremote.io/console_loader/?realm=smartcity&consoleProviders=geofence push storage&consoleAutoEnable=true#!geofences"
- }
- ]
-}
diff --git a/deployment/map/mapdata.mbtiles b/deployment/map/mapdata.mbtiles
deleted file mode 100644
index d8336a396..000000000
Binary files a/deployment/map/mapdata.mbtiles and /dev/null differ
diff --git a/deployment/map/mapsettings.json b/deployment/map/mapsettings.json
deleted file mode 100644
index 4a193842e..000000000
--- a/deployment/map/mapsettings.json
+++ /dev/null
@@ -1,4001 +0,0 @@
-{
- "options": {
- "default": {
- "center": [ 4.485222, 51.911712 ],
- "bounds": [ 3.911, 51.737, 4.784, 52.109 ],
- "zoom": 14,
- "maxZoom": 19,
- "boxZoom": false
- },
- "building": {
- "center": [ 4.46176, 51.9200 ],
- "bounds": [ 3.911, 51.737, 4.784, 52.109 ],
- "zoom": 15,
- "minZoom": 14,
- "maxZoom": 19,
- "boxZoom": false
- }
- },
- "version": 8,
- "sources": {
- "vector_tiles": {
- "type": "vector",
- "url": "mbtiles://mapdata.mbtiles"
- }
- },
- "sprite": "map/sprites/bright-v9",
- "glyphs": "{fontstack}/{range}.pbf",
- "layers": [
- {
- "id": "background",
- "type": "background",
- "paint": {
- "background-color": "#ecf2ea"
- }
- },
- {
- "id": "landcover-glacier",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landcover",
- "filter": [
- "==",
- "subclass",
- "glacier"
- ],
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-color": "#fff",
- "fill-opacity": {
- "base": 1,
- "stops": [
- [ 0, 0.9 ],
- [ 10, 0.3 ]
- ]
- }
- }
- },
- {
- "id": "landuse-residential",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landuse",
- "filter": [
- "==",
- "class",
- "residential"
- ],
- "paint": {
- "fill-color": "#e1e6e0"
- }
- },
- {
- "id": "landuse-commercial",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landuse",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Polygon"
- ],
- [
- "==",
- "class",
- "commercial"
- ]
- ],
- "paint": {
- "fill-color": "#e1e6e0"
- }
- },
- {
- "id": "landuse-industrial",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landuse",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Polygon"
- ],
- [
- "==",
- "class",
- "industrial"
- ]
- ],
- "paint": {
- "fill-color": "#e1e6e0"
- }
- },
- {
- "id": "park",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "park",
- "filter": [
- "==",
- "$type",
- "Polygon"
- ],
- "paint": {
- "fill-color": "#d8e8c8",
- "fill-opacity": {
- "base": 1.8,
- "stops": [
- [ 9, 0.5 ],
- [ 12, 0.2 ]
- ]
- }
- }
- },
- {
- "id": "park-outline",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "park",
- "filter": [
- "==",
- "$type",
- "Polygon"
- ],
- "layout": {},
- "paint": {
- "line-color": {
- "base": 1,
- "stops": [
- [ 6, "hsla(96, 40%, 49%, 0.36)" ],
- [ 8, "hsla(96, 40%, 49%, 0.66)" ]
- ]
- },
- "line-dasharray": [
- 3,
- 3
- ]
- }
- },
- {
- "id": "landuse-cemetery",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landuse",
- "filter": [
- "==",
- "class",
- "cemetery"
- ],
- "paint": {
- "fill-color": "#e1e6e0"
- }
- },
- {
- "id": "landuse-hospital",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landuse",
- "filter": [
- "==",
- "class",
- "hospital"
- ],
- "paint": {
- "fill-color": "#e1e6e0"
- }
- },
- {
- "id": "landuse-school",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landuse",
- "filter": [
- "==",
- "class",
- "school"
- ],
- "paint": {
- "fill-color": "#e1e6e0"
- }
- },
- {
- "id": "landuse-railway",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landuse",
- "filter": [
- "==",
- "class",
- "railway"
- ],
- "paint": {
- "fill-color": "hsla(30, 19%, 90%, 0.4)"
- }
- },
- {
- "id": "landcover-wood",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landcover",
- "filter": [
- "==",
- "class",
- "wood"
- ],
- "paint": {
- "fill-color": "#6a4",
- "fill-opacity": 0.1,
- "fill-outline-color": "hsla(0, 0%, 0%, 0.03)",
- "fill-antialias": {
- "base": 1,
- "stops": [
- [ 0, false ],
- [ 9, true ]
- ]
- }
- }
- },
- {
- "id": "landcover-grass",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "landcover",
- "filter": [
- "==",
- "class",
- "grass"
- ],
- "paint": {
- "fill-color": "#d8e8c8",
- "fill-opacity": 1
- }
- },
- {
- "id": "landcover-grass-park",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849388993.3071"
- },
- "source": "vector_tiles",
- "source-layer": "park",
- "filter": [
- "==",
- "class",
- "public_park"
- ],
- "paint": {
- "fill-color": "#d8e8c8",
- "fill-opacity": 0.8
- }
- },
- {
- "id": "waterway-other",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849382550.77"
- },
- "source": "vector_tiles",
- "source-layer": "waterway",
- "filter": [
- "!in",
- "class",
- "canal",
- "river",
- "stream"
- ],
- "layout": {
- "line-cap": "round"
- },
- "paint": {
- "line-color": "#bad4ff",
- "line-width": {
- "base": 1.3,
- "stops": [
- [ 13, 0.5 ],
- [ 20, 2 ]
- ]
- }
- }
- },
- {
- "id": "waterway-stream-canal",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849382550.77"
- },
- "source": "vector_tiles",
- "source-layer": "waterway",
- "filter": [
- "in",
- "class",
- "canal",
- "stream"
- ],
- "layout": {
- "line-cap": "round"
- },
- "paint": {
- "line-color": "#bad4ff",
- "line-width": {
- "base": 1.3,
- "stops": [
- [ 13, 0.5 ],
- [ 20, 6 ]
- ]
- }
- }
- },
- {
- "id": "waterway-river",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849382550.77"
- },
- "source": "vector_tiles",
- "source-layer": "waterway",
- "filter": [
- "==",
- "class",
- "river"
- ],
- "layout": {
- "line-cap": "round"
- },
- "paint": {
- "line-color": "#bad4ff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [ 10, 0.8 ],
- [ 20, 6 ]
- ]
- }
- }
- },
- {
- "id": "water-offset",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849382550.77"
- },
- "source": "vector_tiles",
- "source-layer": "water",
- "maxzoom": 8,
- "filter": [
- "==",
- "$type",
- "Polygon"
- ],
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-opacity": 1,
- "fill-color": "#bad4ff",
- "fill-translate": {
- "base": 1,
- "stops": [
- [
- 6,
- [ 2, 0 ]
- ],
- [
- 8,
- [ 0, 0 ]
- ]
- ]
- }
- }
- },
- {
- "id": "water",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849382550.77"
- },
- "source": "vector_tiles",
- "source-layer": "water",
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-color": "#bad4ff"
- }
- },
- {
- "id": "water-pattern",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849382550.77"
- },
- "source": "vector_tiles",
- "source-layer": "water",
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-translate": [
- 0,
- 2.5
- ],
- "fill-pattern": "wave"
- }
- },
- {
- "id": "landcover-ice-shelf",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849382550.77"
- },
- "source": "vector_tiles",
- "source-layer": "landcover",
- "filter": [
- "==",
- "subclass",
- "ice_shelf"
- ],
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-color": "#fff",
- "fill-opacity": {
- "base": 1,
- "stops": [
- [ 0, 0.9 ],
- [ 10, 0.3 ]
- ]
- }
- }
- },
- {
- "id": "building",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849364238.8171"
- },
- "source": "vector_tiles",
- "source-layer": "building",
- "paint": {
- "fill-color": {
- "base": 1,
- "stops": [
- [ 15.5, "#cbd8c5" ],
- [ 16, "#cbd8c5" ]
- ]
- },
- "fill-antialias": true
- }
- },
- {
- "id": "building-top",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849364238.8171"
- },
- "source": "vector_tiles",
- "source-layer": "building",
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-translate": {
- "base": 1,
- "stops": [
- [
- 14,
- [ 0, 0 ]
- ],
- [
- 16,
- [ -2, -2 ]
- ]
- ]
- },
- "fill-outline-color": "#aaa",
- "fill-color": "#cbd8c5",
- "fill-opacity": {
- "base": 1,
- "stops": [
- [ 13, 0 ],
- [ 16, 1 ]
- ]
- }
- }
- },
- {
- "id": "housenumber",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "housenumber",
- "minzoom": 18,
- "filter": [
- "==",
- "$type",
- "Point"
- ],
- "layout": {
- "text-field": "{housenumber}",
- "text-size": 10,
- "text-font": [
- "Open Sans Italic"
- ]
- },
- "paint": {
- "text-color": "#666"
- }
- },
- {
- "id": "tunnel-service-track-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "service",
- "track"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#aaa",
- "line-dasharray": [
- 0.5,
- 0.25
- ],
- "line-width": {
- "base": 1.2,
- "stops": [
- [ 15, 1 ],
- [ 16, 4 ],
- [ 20, 11 ]
- ]
- }
- }
- },
- {
- "id": "tunnel-minor-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "==",
- "class",
- "minor"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#aaa",
- "line-opacity": {
- "stops": [
- [
- 12,
- 0
- ],
- [
- 12.5,
- 1
- ]
- ]
- },
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 0.5
- ],
- [
- 13,
- 1
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-secondary-tertiary-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "secondary",
- "tertiary"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#aaa",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 8,
- 1.5
- ],
- [
- 20,
- 17
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-trunk-primary-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "primary",
- "trunk"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#aaa",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 5,
- 0.4
- ],
- [
- 6,
- 0.6
- ],
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-motorway-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "==",
- "class",
- "motorway"
- ]
- ],
- "layout": {
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#aaa",
- "line-dasharray": [
- 0.5,
- 0.25
- ],
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 5,
- 0.4
- ],
- [
- 6,
- 0.6
- ],
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-path",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "==",
- "class",
- "path"
- ]
- ]
- ],
- "paint": {
- "line-color": "#555",
- "line-dasharray": [
- 1.5,
- 0.75
- ],
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 15,
- 1.2
- ],
- [
- 20,
- 4
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-service-track",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "service",
- "track"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#fff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 15.5,
- 0
- ],
- [
- 16,
- 2
- ],
- [
- 20,
- 7.5
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-minor",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "==",
- "class",
- "minor_road"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#fff",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 13.5,
- 0
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-secondary-tertiary",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "secondary",
- "tertiary"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#444",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 10
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-trunk-primary",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "primary",
- "trunk"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#fff4c6",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-motorway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "==",
- "class",
- "motorway"
- ]
- ],
- "layout": {
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#aaa",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- },
- {
- "id": "tunnel-railway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849354174.1904"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "tunnel"
- ],
- [
- "==",
- "class",
- "rail"
- ]
- ],
- "paint": {
- "line-color": "#bbb",
- "line-width": {
- "base": 1.4,
- "stops": [
- [ 14, 0.4 ],
- [ 15, 0.75 ],
- [ 20, 2 ]
- ]
- },
- "line-dasharray": [
- 2,
- 2
- ]
- }
- },
- {
- "id": "aeroway-taxiway-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "aeroway",
- "minzoom": 12,
- "filter": [
- "all",
- [
- "in",
- "class",
- "taxiway"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "rgba(153, 153, 153, 1)",
- "line-width": {
- "base": 1.5,
- "stops": [
- [
- 11,
- 2
- ],
- [
- 17,
- 12
- ]
- ]
- },
- "line-opacity": 1
- }
- },
- {
- "id": "aeroway-runway-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "aeroway",
- "minzoom": 12,
- "filter": [
- "all",
- [
- "in",
- "class",
- "runway"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#aaa",
- "line-width": {
- "base": 1.5,
- "stops": [
- [
- 11,
- 5
- ],
- [
- 17,
- 55
- ]
- ]
- },
- "line-opacity": 1
- }
- },
- {
- "id": "aeroway-area",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "aeroway",
- "minzoom": 4,
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Polygon"
- ],
- [
- "in",
- "class",
- "runway",
- "taxiway"
- ]
- ],
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-opacity": {
- "base": 1,
- "stops": [
- [ 13, 0 ],
- [ 14, 1 ]
- ]
- },
- "fill-color": "#f0f0f0"
- }
- },
- {
- "id": "aeroway-taxiway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "aeroway",
- "minzoom": 4,
- "filter": [
- "all",
- [
- "in",
- "class",
- "taxiway"
- ],
- [
- "==",
- "$type",
- "LineString"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#e9e9e9",
- "line-width": {
- "base": 1.5,
- "stops": [
- [ 11, 1 ],
- [ 17, 10 ]
- ]
- },
- "line-opacity": {
- "base": 1,
- "stops": [
- [ 11, 0 ],
- [ 12, 1 ]
- ]
- }
- }
- },
- {
- "id": "aeroway-runway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "aeroway",
- "minzoom": 4,
- "filter": [
- "all",
- [
- "in",
- "class",
- "runway"
- ],
- [
- "==",
- "$type",
- "LineString"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#f0f0f0",
- "line-width": {
- "base": 1.5,
- "stops": [
- [ 11, 4 ],
- [ 17, 50 ]
- ]
- },
- "line-opacity": {
- "base": 1,
- "stops": [
- [ 11, 0 ],
- [ 12, 1 ]
- ]
- }
- }
- },
- {
- "id": "highway-area",
- "type": "fill",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "==",
- "$type",
- "Polygon"
- ],
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "fill-color": "hsla(0, 0%, 89%, 0.56)",
- "fill-outline-color": "#cfcdca",
- "fill-opacity": 0.9,
- "fill-antialias": false
- }
- },
- {
- "id": "highway-motorway-link-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "minzoom": 12,
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "==",
- "class",
- "motorway_link"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#e9ac77",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 1
- ],
- [
- 13,
- 3
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- },
- {
- "id": "highway-link-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "minzoom": 13,
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "in",
- "class",
- "primary_link",
- "secondary_link",
- "tertiary_link",
- "trunk_link"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#e9ac77",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 1
- ],
- [
- 13,
- 3
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- },
- {
- "id": "highway-minor-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "!=",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "minor",
- "service",
- "track"
- ]
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#cfcdca",
- "line-opacity": {
- "stops": [
- [
- 12,
- 0
- ],
- [
- 12.5,
- 1
- ]
- ]
- },
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 0.5
- ],
- [
- 13,
- 1
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- },
- {
- "id": "highway-secondary-tertiary-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "in",
- "class",
- "secondary",
- "tertiary"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#999999",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 8,
- 1.5
- ],
- [
- 20,
- 17
- ]
- ]
- }
- }
- },
- {
- "id": "highway-trunk-primary-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "minzoom": 5,
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "in",
- "class",
- "primary",
- "trunk"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#a0a0a0",
- "line-opacity": {
- "stops": [
- [
- 5,
- 0
- ],
- [
- 6,
- 1
- ]
- ]
- },
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 5,
- 0
- ],
- [
- 6,
- 0.6
- ],
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- }
- }
- },
- {
- "id": "highway-motorway-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "minzoom": 4,
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "==",
- "class",
- "motorway"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#a0a0a0",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 4,
- 0
- ],
- [
- 5,
- 0.4
- ],
- [
- 6,
- 0.6
- ],
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- },
- "line-opacity": {
- "stops": [
- [
- 4,
- 0
- ],
- [
- 5,
- 1
- ]
- ]
- }
- }
- },
- {
- "id": "highway-path",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "==",
- "class",
- "path"
- ]
- ]
- ],
- "paint": {
- "line-color": "#d0d0d0",
- "line-dasharray": [
- 1.5,
- 0.75
- ],
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 15,
- 1.2
- ],
- [
- 20,
- 4
- ]
- ]
- }
- }
- },
- {
- "id": "highway-motorway-link",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "minzoom": 12,
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "==",
- "class",
- "motorway_link"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12.5,
- 0
- ],
- [
- 13,
- 1.5
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- },
- {
- "id": "highway-link",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "minzoom": 13,
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "in",
- "class",
- "primary_link",
- "secondary_link",
- "tertiary_link",
- "trunk_link"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12.5,
- 0
- ],
- [
- 13,
- 1.5
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- },
- {
- "id": "highway-minor",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "!=",
- "brunnel",
- "tunnel"
- ],
- [
- "in",
- "class",
- "minor",
- "service",
- "track"
- ]
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 13.5,
- 0
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- },
- {
- "id": "highway-secondary-tertiary",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "in",
- "class",
- "secondary",
- "tertiary"
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 8,
- 0.5
- ],
- [
- 20,
- 13
- ]
- ]
- }
- }
- },
- {
- "id": "highway-trunk-primary",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "in",
- "class",
- "primary",
- "trunk"
- ]
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- },
- {
- "id": "highway-motorway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "minzoom": 5,
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "==",
- "class",
- "motorway"
- ]
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- },
- {
- "id": "railway-service",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "==",
- "class",
- "rail"
- ],
- [
- "has",
- "service"
- ]
- ]
- ],
- "paint": {
- "line-color": "hsla(0, 0%, 73%, 0.77)",
- "line-width": {
- "base": 1.4,
- "stops": [
- [
- 14,
- 0.4
- ],
- [
- 20,
- 1
- ]
- ]
- }
- }
- },
- {
- "id": "railway-service-hatching",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "==",
- "class",
- "rail"
- ],
- [
- "has",
- "service"
- ]
- ]
- ],
- "layout": {
- "visibility": "visible"
- },
- "paint": {
- "line-color": "hsla(0, 0%, 73%, 0.68)",
- "line-dasharray": [
- 0.2,
- 8
- ],
- "line-width": {
- "base": 1.4,
- "stops": [
- [
- 14.5,
- 0
- ],
- [
- 15,
- 2
- ],
- [
- 20,
- 6
- ]
- ]
- }
- }
- },
- {
- "id": "railway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "!has",
- "service"
- ],
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "==",
- "class",
- "rail"
- ]
- ]
- ],
- "paint": {
- "line-color": "#bbb",
- "line-width": {
- "base": 1.4,
- "stops": [
- [
- 14,
- 0.4
- ],
- [
- 15,
- 0.75
- ],
- [
- 20,
- 2
- ]
- ]
- }
- }
- },
- {
- "id": "railway-hatching",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849345966.4436"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "!has",
- "service"
- ],
- [
- "!in",
- "brunnel",
- "bridge",
- "tunnel"
- ],
- [
- "==",
- "class",
- "rail"
- ]
- ]
- ],
- "paint": {
- "line-color": "#bbb",
- "line-dasharray": [
- 0.2,
- 8
- ],
- "line-width": {
- "base": 1.4,
- "stops": [
- [
- 14.5,
- 0
- ],
- [
- 15,
- 3
- ],
- [
- 20,
- 8
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-motorway-link-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "motorway_link"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#777",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 1
- ],
- [
- 13,
- 3
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-link-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "in",
- "class",
- "primary_link",
- "secondary_link",
- "tertiary_link",
- "trunk_link"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#666",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 1
- ],
- [
- 13,
- 3
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-secondary-tertiary-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "in",
- "class",
- "secondary",
- "tertiary"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#777",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 8,
- 1.5
- ],
- [
- 20,
- 28
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-trunk-primary-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "in",
- "class",
- "primary",
- "trunk"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#777",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 5,
- 0.4
- ],
- [
- 6,
- 0.6
- ],
- [
- 7,
- 1.5
- ],
- [
- 20,
- 26
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-motorway-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "motorway"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#777",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 5,
- 0.4
- ],
- [
- 6,
- 0.6
- ],
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-path-casing",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "path"
- ]
- ]
- ],
- "paint": {
- "line-color": "#777",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 15,
- 1.2
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-path",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "path"
- ]
- ]
- ],
- "paint": {
- "line-color": "#ddd",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 15,
- 1.2
- ],
- [
- 20,
- 4
- ]
- ]
- },
- "line-dasharray": [
- 1.5,
- 0.75
- ]
- }
- },
- {
- "id": "bridge-motorway-link",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "motorway_link"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12.5,
- 0
- ],
- [
- 13,
- 1.5
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-link",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "in",
- "class",
- "primary_link",
- "secondary_link",
- "tertiary_link",
- "trunk_link"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#ffffff",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12.5,
- 0
- ],
- [
- 13,
- 1.5
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-secondary-tertiary",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "in",
- "class",
- "secondary",
- "tertiary"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#f5f5f5",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-trunk-primary",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "in",
- "class",
- "primary",
- "trunk"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#f0f0f0",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-motorway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "motorway"
- ]
- ],
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#f0f0f0",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 6.5,
- 0
- ],
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-railway",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "rail"
- ]
- ],
- "paint": {
- "line-color": "#f0f0f0",
- "line-width": {
- "base": 1.4,
- "stops": [
- [
- 14,
- 0.4
- ],
- [
- 15,
- 0.75
- ],
- [
- 20,
- 2
- ]
- ]
- }
- }
- },
- {
- "id": "bridge-railway-hatching",
- "type": "line",
- "metadata": {
- "mapbox:group": "1444849334699.1902"
- },
- "source": "vector_tiles",
- "source-layer": "transportation",
- "filter": [
- "all",
- [
- "==",
- "brunnel",
- "bridge"
- ],
- [
- "==",
- "class",
- "rail"
- ]
- ],
- "paint": {
- "line-color": "#bbb",
- "line-dasharray": [
- 0.2,
- 8
- ],
- "line-width": {
- "base": 1.4,
- "stops": [
- [
- 14.5,
- 0
- ],
- [
- 15,
- 3
- ],
- [
- 20,
- 8
- ]
- ]
- }
- }
- },
- {
- "id": "boundary-water",
- "type": "line",
- "source": "vector_tiles",
- "source-layer": "boundary",
- "filter": [
- "all",
- [
- "in",
- "admin_level",
- 2,
- 4
- ],
- [
- "==",
- "maritime",
- 1
- ]
- ],
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#8ca0c2",
- "line-width": {
- "base": 1,
- "stops": [
- [ 0, 0.6 ],
- [ 4, 1.4 ],
- [ 5, 2 ],
- [ 12, 8 ]
- ]
- },
- "line-opacity": {
- "stops": [
- [ 6, 0.6 ],
- [ 10, 1 ]
- ]
- }
- }
- },
- {
- "id": "waterway-name",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "waterway",
- "minzoom": 13,
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "has",
- "name"
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Italic"
- ],
- "text-size": 14,
- "text-field": "{name}",
- "text-max-width": 5,
- "text-rotation-alignment": "map",
- "symbol-placement": "line",
- "text-letter-spacing": 0.2,
- "symbol-spacing": 350
- },
- "paint": {
- "text-color": "#687692",
- "text-halo-width": 1.5,
- "text-halo-color": "rgba(255,255,255,0.7)"
- }
- },
- {
- "id": "water-name-lakeline",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "water_name",
- "filter": [
- "==",
- "$type",
- "LineString"
- ],
- "layout": {
- "text-font": [
- "Open Sans Italic"
- ],
- "text-size": 14,
- "text-field": "{name}",
- "text-max-width": 5,
- "text-rotation-alignment": "map",
- "symbol-placement": "line",
- "symbol-spacing": 350,
- "text-letter-spacing": 0.2
- },
- "paint": {
- "text-color": "#687692",
- "text-halo-width": 1.5,
- "text-halo-color": "rgba(255,255,255,0.7)"
- }
- },
- {
- "id": "water-name-ocean",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "water_name",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Point"
- ],
- [
- "==",
- "class",
- "ocean"
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Italic"
- ],
- "text-size": 14,
- "text-field": "{name}",
- "text-max-width": 5,
- "text-rotation-alignment": "map",
- "symbol-placement": "point",
- "symbol-spacing": 350,
- "text-letter-spacing": 0.2
- },
- "paint": {
- "text-color": "#687692",
- "text-halo-width": 1.5,
- "text-halo-color": "rgba(255,255,255,0.7)"
- }
- },
- {
- "id": "water-name-other",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "water_name",
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Point"
- ],
- [
- "!in",
- "class",
- "ocean"
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Italic"
- ],
- "text-size": {
- "stops": [
- [ 0, 10 ],
- [ 6, 14 ]
- ]
- },
- "text-field": "{name}",
- "text-max-width": 5,
- "text-rotation-alignment": "map",
- "symbol-placement": "point",
- "symbol-spacing": 350,
- "text-letter-spacing": 0.2,
- "visibility": "visible"
- },
- "paint": {
- "text-color": "#687692",
- "text-halo-width": 1.5,
- "text-halo-color": "rgba(255,255,255,0.7)"
- }
- },
- {
- "id": "poi-level-3",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "poi",
- "minzoom": 16,
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Point"
- ],
- [
- ">=",
- "rank",
- 25
- ]
- ],
- "layout": {
- "text-padding": 2,
- "text-font": [
- "Open Sans Semibold"
- ],
- "text-anchor": "top",
- "icon-image": "{class}_11",
- "text-field": "{name}",
- "text-offset": [
- 0,
- 0.6
- ],
- "text-size": 12,
- "text-max-width": 9
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#999",
- "text-halo-width": 1,
- "text-halo-color": "#ffffff"
- }
- },
- {
- "id": "poi-level-2",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "poi",
- "minzoom": 15,
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Point"
- ],
- [
- "all",
- [
- "<=",
- "rank",
- 24
- ],
- [
- ">=",
- "rank",
- 15
- ]
- ]
- ],
- "layout": {
- "text-padding": 2,
- "text-font": [
- "Open Sans Semibold"
- ],
- "text-anchor": "top",
- "icon-image": "{class}_11",
- "text-field": "{name}",
- "text-offset": [
- 0,
- 0.6
- ],
- "text-size": 12,
- "text-max-width": 9
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#999",
- "text-halo-width": 1,
- "text-halo-color": "#ffffff"
- }
- },
- {
- "id": "poi-level-1",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "poi",
- "minzoom": 14,
- "filter": [
- "all",
- [
- "==",
- "$type",
- "Point"
- ],
- [
- "all",
- [
- "<=",
- "rank",
- 14
- ],
- [
- "has",
- "name"
- ]
- ]
- ],
- "layout": {
- "text-padding": 2,
- "text-font": [
- "Open Sans Semibold"
- ],
- "text-anchor": "top",
- "icon-image": "{class}_11",
- "text-field": "{name}",
- "text-offset": [
- 0,
- 0.6
- ],
- "text-size": 12,
- "text-max-width": 9
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#999",
- "text-halo-width": 1,
- "text-halo-color": "#ffffff"
- }
- },
- {
- "id": "highway-name-path",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "transportation_name",
- "minzoom": 15.5,
- "filter": [
- "==",
- "class",
- "path"
- ],
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-font": [
- "Open Sans Regular"
- ],
- "text-field": "{name}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-color": "#f8f4f0",
- "text-color": "#444",
- "text-halo-width": 0.5
- }
- },
- {
- "id": "highway-name-minor",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "transportation_name",
- "minzoom": 15,
- "filter": [
- "all",
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "in",
- "class",
- "minor",
- "service",
- "track"
- ]
- ],
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-font": [
- "Open Sans Regular"
- ],
- "text-field": "{name}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#666",
- "text-halo-width": 1
- }
- },
- {
- "id": "highway-name-major",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "transportation_name",
- "minzoom": 12.2,
- "filter": [
- "in",
- "class",
- "primary",
- "secondary",
- "tertiary",
- "trunk"
- ],
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-font": [
- "Open Sans Regular"
- ],
- "text-field": "{name}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#666",
- "text-halo-width": 1
- }
- },
- {
- "id": "highway-shield",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "transportation_name",
- "minzoom": 8,
- "filter": [
- "all",
- [
- "<=",
- "ref_length",
- 6
- ],
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "!in",
- "network",
- "us-interstate",
- "us-highway",
- "us-state"
- ]
- ],
- "layout": {
- "text-size": 12,
- "icon-image": "road_{ref_length}",
- "icon-rotation-alignment": "viewport",
- "symbol-spacing": 200,
- "text-font": [
- "Open Sans Semibold"
- ],
- "symbol-placement": {
- "base": 1,
- "stops": [
- [
- 10,
- "point"
- ],
- [
- 11,
- "line"
- ]
- ]
- },
- "text-rotation-alignment": "viewport",
- "icon-size": 1,
- "text-field": "{ref}"
- },
- "paint": {
- "text-color": "#666"
- }
- },
- {
- "id": "highway-shield-us-interstate",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "transportation_name",
- "minzoom": 7,
- "filter": [
- "all",
- [
- "<=",
- "ref_length",
- 6
- ],
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "in",
- "network",
- "us-interstate"
- ]
- ],
- "layout": {
- "text-size": 10,
- "icon-image": "{network}_{ref_length}",
- "icon-rotation-alignment": "viewport",
- "symbol-spacing": 200,
- "text-font": [
- "Open Sans Semibold"
- ],
- "symbol-placement": {
- "base": 1,
- "stops": [
- [
- 7,
- "point"
- ],
- [
- 7,
- "line"
- ],
- [
- 8,
- "line"
- ]
- ]
- },
- "text-rotation-alignment": "viewport",
- "icon-size": 1,
- "text-field": "{ref}"
- },
- "paint": {
- "text-color": "rgba(0, 0, 0, 1)"
- }
- },
- {
- "id": "highway-shield-us-other",
- "type": "symbol",
- "source": "vector_tiles",
- "source-layer": "transportation_name",
- "minzoom": 9,
- "filter": [
- "all",
- [
- "<=",
- "ref_length",
- 6
- ],
- [
- "==",
- "$type",
- "LineString"
- ],
- [
- "in",
- "network",
- "us-highway",
- "us-state"
- ]
- ],
- "layout": {
- "text-size": 10,
- "icon-image": "{network}_{ref_length}",
- "icon-rotation-alignment": "viewport",
- "symbol-spacing": 200,
- "text-font": [
- "Open Sans Semibold"
- ],
- "symbol-placement": {
- "base": 1,
- "stops": [
- [
- 10,
- "point"
- ],
- [
- 11,
- "line"
- ]
- ]
- },
- "text-rotation-alignment": "viewport",
- "icon-size": 1,
- "text-field": "{ref}"
- },
- "paint": {
- "text-color": "rgba(0, 0, 0, 1)"
- }
- },
- {
- "id": "place-other",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "!in",
- "class",
- "city",
- "town",
- "village"
- ],
- "layout": {
- "text-letter-spacing": 0.1,
- "text-size": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 10
- ],
- [
- 15,
- 14
- ]
- ]
- },
- "text-font": [
- "Open Sans Bold"
- ],
- "text-field": "{name_en}",
- "text-transform": "uppercase",
- "text-max-width": 9
- },
- "paint": {
- "text-color": "#888",
- "text-halo-width": 1.2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-village",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "==",
- "class",
- "village"
- ],
- "layout": {
- "text-font": [
- "Open Sans Regular"
- ],
- "text-size": {
- "base": 1.2,
- "stops": [
- [
- 10,
- 12
- ],
- [
- 15,
- 22
- ]
- ]
- },
- "text-field": "{name_en}",
- "text-max-width": 8
- },
- "paint": {
- "text-color": "#444",
- "text-halo-width": 1.2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-town",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "==",
- "class",
- "town"
- ],
- "layout": {
- "text-font": [
- "Open Sans Regular"
- ],
- "text-size": {
- "base": 1.2,
- "stops": [
- [
- 10,
- 14
- ],
- [
- 15,
- 24
- ]
- ]
- },
- "text-field": "{name_en}",
- "text-max-width": 8
- },
- "paint": {
- "text-color": "#444",
- "text-halo-width": 1.2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-city",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "all",
- [
- "!=",
- "capital",
- 2
- ],
- [
- "==",
- "class",
- "city"
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Semibold"
- ],
- "text-size": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 14
- ],
- [
- 11,
- 24
- ]
- ]
- },
- "text-field": "{name_en}",
- "text-max-width": 8
- },
- "paint": {
- "text-color": "#666",
- "text-halo-width": 1.2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-city-capital",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "all",
- [
- "==",
- "capital",
- 2
- ],
- [
- "==",
- "class",
- "city"
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Semibold"
- ],
- "text-size": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 14
- ],
- [
- 11,
- 24
- ]
- ]
- },
- "text-field": "{name_en}",
- "text-max-width": 8,
- "icon-image": "star_11",
- "text-offset": [
- 0.4,
- 0
- ],
- "icon-size": 0.8,
- "text-anchor": "left"
- },
- "paint": {
- "text-color": "#444",
- "text-halo-width": 1.2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-country-3",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "all",
- [
- "==",
- "class",
- "country"
- ],
- [
- ">=",
- "rank",
- 3
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Bold"
- ],
- "text-field": "{name_en}",
- "text-size": {
- "stops": [
- [
- 3,
- 11
- ],
- [
- 7,
- 17
- ]
- ]
- },
- "text-transform": "uppercase",
- "text-max-width": 6.25
- },
- "paint": {
- "text-halo-blur": 1,
- "text-color": "#444",
- "text-halo-width": 2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-country-2",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "all",
- [
- "==",
- "class",
- "country"
- ],
- [
- "==",
- "rank",
- 2
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Bold"
- ],
- "text-field": "{name_en}",
- "text-size": {
- "stops": [
- [
- 2,
- 11
- ],
- [
- 5,
- 17
- ]
- ]
- },
- "text-transform": "uppercase",
- "text-max-width": 6.25
- },
- "paint": {
- "text-halo-blur": 1,
- "text-color": "#444",
- "text-halo-width": 2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-country-1",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "filter": [
- "all",
- [
- "==",
- "class",
- "country"
- ],
- [
- "==",
- "rank",
- 1
- ]
- ],
- "layout": {
- "text-font": [
- "Open Sans Bold"
- ],
- "text-field": "{name_en}",
- "text-size": {
- "stops": [
- [
- 1,
- 11
- ],
- [
- 4,
- 17
- ]
- ]
- },
- "text-transform": "uppercase",
- "text-max-width": 6.25
- },
- "paint": {
- "text-halo-blur": 1,
- "text-color": "#444",
- "text-halo-width": 2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- },
- {
- "id": "place-continent",
- "type": "symbol",
- "metadata": {
- "mapbox:group": "1444849242106.713"
- },
- "source": "vector_tiles",
- "source-layer": "place",
- "maxzoom": 1,
- "filter": [
- "==",
- "class",
- "continent"
- ],
- "layout": {
- "text-font": [
- "Open Sans Bold"
- ],
- "text-field": "{name_en}",
- "text-size": 14,
- "text-max-width": 6.25,
- "text-transform": "uppercase"
- },
- "paint": {
- "text-halo-blur": 1,
- "text-color": "#444",
- "text-halo-width": 2,
- "text-halo-color": "rgba(255,255,255,0.8)"
- }
- }
- ]
-}
diff --git a/deployment/src/main/java/org/openremote/demo/setup/DemoSetupTasks.java b/deployment/src/main/java/org/openremote/demo/setup/DemoSetupTasks.java
deleted file mode 100644
index 7514b1f92..000000000
--- a/deployment/src/main/java/org/openremote/demo/setup/DemoSetupTasks.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2017, 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.demo.setup;
-
-import org.openremote.manager.security.ManagerIdentityService;
-import org.openremote.manager.setup.EmptySetupTasks;
-import org.openremote.manager.setup.Setup;
-import org.openremote.manager.setup.SetupTasks;
-import org.openremote.model.Container;
-
-import java.util.List;
-
-import static org.openremote.manager.setup.SetupTasks.*;
-
-/**
- * Builtin setup tasks.
- */
-public class DemoSetupTasks extends EmptySetupTasks {
-
- @Override
- public List<Setup> createTasks(Container container) {
- super.createTasks(container);
-
- // Basic vs Keycloak identity provider
- if (container.getService(ManagerIdentityService.class).isKeycloakEnabled()) {
-
- if (SetupTasks.isImportDemoUsers(container)) {
- addTask(new KeycloakDemoSetup(container));
- }
- if (SetupTasks.isImportDemoAssets(container)) {
- addTask(new ManagerDemoSetup(container));
- }
- if (SetupTasks.isImportDemoRules(container)) {
- addTask(new RulesDemoSetup(container));
- }
- if (SetupTasks.isImportDemoAgent(container)) {
- addTask(new ManagerDemoAgentSetup(container));
- }
- }
-
- return getTasks();
- }
-}
diff --git a/deployment/src/main/java/org/openremote/demo/setup/KeycloakDemoSetup.java b/deployment/src/main/java/org/openremote/demo/setup/KeycloakDemoSetup.java
deleted file mode 100644
index 12b76cf4e..000000000
--- a/deployment/src/main/java/org/openremote/demo/setup/KeycloakDemoSetup.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2020, 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.demo.setup;
-
-import org.openremote.model.Container;
-import org.openremote.manager.setup.AbstractKeycloakSetup;
-import org.openremote.model.Constants;
-import org.openremote.model.security.ClientRole;
-import org.openremote.model.security.Tenant;
-import org.openremote.model.security.User;
-
-import java.util.Arrays;
-import java.util.logging.Logger;
-
-/**
- * We have the following demo users:
- * <ul>
- * <li><code>admin</code> - The superuser in the "master" realm with all access</li>
- * <li><code>smartcity</code> - (Password: smartcity) A user in the "smartcity" realm with read access</li>
- *
- * </ul>
- */
-public class KeycloakDemoSetup extends AbstractKeycloakSetup {
-
- private static final Logger LOG = Logger.getLogger(KeycloakDemoSetup.class.getName());
-
- public String smartCityUserId;
- public Tenant masterTenant;
- public Tenant tenantCity;
-
- public KeycloakDemoSetup(Container container) {
- super(container);
- }
-
- @Override
- public void onStart() throws Exception {
- super.onStart();
-
- // Tenants
- masterTenant = identityService.getIdentityProvider().getTenant(Constants.MASTER_REALM);
- tenantCity = createTenant("smartcity", "Smart City");
-
- // Don't allow demo users to write assets
- ClientRole[] demoUserRoles = Arrays.stream(AbstractKeycloakSetup.REGULAR_USER_ROLES)
- .filter(clientRole -> clientRole != ClientRole.WRITE_ASSETS)
- .toArray(ClientRole[]::new);
-
- // Users
- User smartCityUser = createUser(tenantCity.getRealm(), "smartcity", "smartcity", "Smart", "City", null, true, demoUserRoles);
- this.smartCityUserId = smartCityUser.getId();
- keycloakProvider.updateUserRoles(tenantCity.getRealm(), smartCityUserId, "account"); // Remove all roles for account client
- }
-}
diff --git a/deployment/src/main/java/org/openremote/demo/setup/ManagerDemoAgentSetup.java b/deployment/src/main/java/org/openremote/demo/setup/ManagerDemoAgentSetup.java
deleted file mode 100644
index ee077081a..000000000
--- a/deployment/src/main/java/org/openremote/demo/setup/ManagerDemoAgentSetup.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2020, 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.demo.setup;
-
-import org.openremote.agent.protocol.knx.KNXAgent;
-import org.openremote.agent.protocol.velbus.VelbusTcpAgent;
-import org.openremote.container.util.MapAccess;
-import org.openremote.manager.setup.ManagerSetup;
-import org.openremote.model.Container;
-import org.openremote.model.security.Tenant;
-
-import java.util.logging.Logger;
-
-import static org.openremote.container.util.MapAccess.*;
-
-public class ManagerDemoAgentSetup extends ManagerSetup {
-
- private static final Logger LOG = Logger.getLogger(ManagerDemoAgentSetup.class.getName());
-
- public static final String SETUP_IMPORT_DEMO_AGENT_KNX = "SETUP_IMPORT_DEMO_AGENT_KNX";
- public static final String SETUP_IMPORT_DEMO_AGENT_KNX_GATEWAY_IP = "SETUP_IMPORT_DEMO_AGENT_KNX_GATEWAY_IP";
- public static final String SETUP_IMPORT_DEMO_AGENT_KNX_LOCAL_IP = "SETUP_IMPORT_DEMO_AGENT_KNX_LOCAL_IP";
-
- public static final String SETUP_IMPORT_DEMO_AGENT_VELBUS = "SETUP_IMPORT_DEMO_AGENT_VELBUS";
- public static final String SETUP_IMPORT_DEMO_AGENT_VELBUS_HOST = "SETUP_IMPORT_DEMO_AGENT_VELBUS_HOST";
- public static final String SETUP_IMPORT_DEMO_AGENT_VELBUS_PORT = "SETUP_IMPORT_DEMO_AGENT_VELBUS_PORT";
-
- public String masterRealm;
-
- final protected boolean knx;
- final protected String knxGatewayIp;
- final protected String knxLocalIp;
-
- final protected boolean velbus;
- final protected String velbusHost;
- final protected Integer velbusPort;
-
- public ManagerDemoAgentSetup(Container container) {
- super(container);
-
- this.knx = MapAccess.getBoolean(container.getConfig(), SETUP_IMPORT_DEMO_AGENT_KNX, false);
- this.knxGatewayIp = MapAccess.getString(container.getConfig(), SETUP_IMPORT_DEMO_AGENT_KNX_GATEWAY_IP, "localhost");
- this.knxLocalIp = MapAccess.getString(container.getConfig(), SETUP_IMPORT_DEMO_AGENT_KNX_LOCAL_IP, "localhost");
-
- this.velbus = MapAccess.getBoolean(container.getConfig(), SETUP_IMPORT_DEMO_AGENT_VELBUS, false);
- this.velbusHost = MapAccess.getString(container.getConfig(), SETUP_IMPORT_DEMO_AGENT_VELBUS_HOST, "localhost");
- this.velbusPort = MapAccess.getInteger(container.getConfig(), SETUP_IMPORT_DEMO_AGENT_VELBUS_PORT, 6000);
- }
-
- @Override
- public void onStart() throws Exception {
- super.onStart();
-
- KeycloakDemoSetup keycloakDemoSetup = setupService.getTaskOfType(KeycloakDemoSetup.class);
- Tenant masterTenant = keycloakDemoSetup.masterTenant;
- masterRealm = masterTenant.getRealm();
-
- if (knx) {
- LOG.info("Enable KNX demo agent, gateway/local IP: " + knxGatewayIp + "/" + knxLocalIp);
-
- KNXAgent agent = new KNXAgent("Demo KNX agent")
- .setRealm(masterRealm)
- .setHost(knxGatewayIp)
- .setBindHost(knxLocalIp);
-
- agent = assetStorageService.merge(agent);
- }
-
- if (velbus) {
- LOG.info("Enable Velbus demo agent, host/port: " + velbusHost + "/" + velbusPort);
-
- VelbusTcpAgent agent = new VelbusTcpAgent("Demo VELBUS agent")
- .setRealm(masterRealm)
- .setHost(velbusHost)
- .setPort(velbusPort);
-
- agent = assetStorageService.merge(agent);
- }
- }
-}
diff --git a/deployment/src/main/java/org/openremote/demo/setup/ManagerDemoSetup.java b/deployment/src/main/java/org/openremote/demo/setup/ManagerDemoSetup.java
deleted file mode 100644
index f19ac9b32..000000000
--- a/deployment/src/main/java/org/openremote/demo/setup/ManagerDemoSetup.java
+++ /dev/null
@@ -1,1570 +0,0 @@
-/*
- * Copyright 2016, 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.demo.setup;
-
-import org.openremote.agent.protocol.http.HttpClientAgent;
-import org.openremote.agent.protocol.simulator.SimulatorAgent;
-import org.openremote.container.util.UniqueIdentifierGenerator;
-import org.openremote.manager.setup.ManagerSetup;
-import org.openremote.model.Constants;
-import org.openremote.model.Container;
-import org.openremote.model.asset.Asset;
-import org.openremote.model.asset.impl.*;
-import org.openremote.model.attribute.Attribute;
-import org.openremote.model.attribute.AttributeLink;
-import org.openremote.model.attribute.AttributeRef;
-import org.openremote.model.attribute.MetaItem;
-import org.openremote.model.geo.GeoJSONPoint;
-import org.openremote.model.security.Tenant;
-import org.openremote.model.simulator.SimulatorReplayDatapoint;
-import org.openremote.model.value.*;
-
-import java.time.Duration;
-import java.time.LocalTime;
-import java.util.Collections;
-import java.util.Random;
-
-import static java.time.temporal.ChronoField.SECOND_OF_DAY;
-import static org.openremote.model.value.MetaItemType.ATTRIBUTE_LINKS;
-import static org.openremote.model.value.MetaItemType.*;
-import static org.openremote.model.value.ValueType.*;
-
-public class ManagerDemoSetup extends ManagerSetup {
-
- public static GeoJSONPoint STATIONSPLEIN_LOCATION = new GeoJSONPoint(4.470175, 51.923464);
- public String masterRealm;
- public String realmCityTenant;
- public String area1Id;
- public String smartcitySimulatorAgentId;
- public String energyManagementId;
- public String weatherHttpApiAgentId;
-
- private final long halfHourInMillis = Duration.ofMinutes(30).toMillis();
-
- public ManagerDemoSetup(Container container) {
- super(container);
- }
-
- private static int getRandomNumberInRange(int min, int max) {
- if (min >= max) {
- throw new IllegalArgumentException("max must be greater than min");
- }
- Random r = new Random();
- return r.nextInt((max - min) + 1) + min;
- }
-
- @Override
- public void onStart() throws Exception {
- super.onStart();
-
- KeycloakDemoSetup keycloakDemoSetup = setupService.getTaskOfType(KeycloakDemoSetup.class);
- Tenant masterTenant = keycloakDemoSetup.masterTenant;
- Tenant tenantCity = keycloakDemoSetup.tenantCity;
- masterRealm = masterTenant.getRealm();
- this.realmCityTenant = tenantCity.getRealm();
-
- // ################################ Demo assets for 'master' realm ###################################
-
-
- // ################################ Link demo users and assets ###################################
-
-
- // ################################ Make users restricted ###################################
-
-
- // ################################ Realm smartcity ###################################
-
- SimulatorAgent smartcitySimulatorAgent = new SimulatorAgent("Simulator agent");
- smartcitySimulatorAgent.setRealm(this.realmCityTenant);
-
- smartcitySimulatorAgent = assetStorageService.merge(smartcitySimulatorAgent);
- smartcitySimulatorAgentId = smartcitySimulatorAgent.getId();
-
- LocalTime midnight = LocalTime.of(0, 0);
-
- // ################################ Realm smartcity - Energy Management ###################################
-
- ThingAsset energyManagement = new ThingAsset("Energy management");
- energyManagement.setRealm(this.realmCityTenant);
- energyManagement.getAttributes().addOrReplace(
- new Attribute<>("powerTotalProducers", ValueType.NUMBER)
- .addOrReplaceMeta(
- new MetaItem<>(MetaItemType.UNITS, Constants.units(Constants.UNITS_KILO, Constants.UNITS_WATT)),
- new MetaItem<>(MetaItemType.READ_ONLY, true),
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS, true),
- new MetaItem<>(MetaItemType.RULE_STATE, true)),
- new Attribute<>("powerTotalConsumers", ValueType.NUMBER).addOrReplaceMeta(
- new MetaItem<>(MetaItemType.UNITS, Constants.units(Constants.UNITS_KILO, Constants.UNITS_WATT)),
- new MetaItem<>(MetaItemType.READ_ONLY, true),
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS, true),
- new MetaItem<>(MetaItemType.RULE_STATE, true))
- );
- energyManagement.setId(UniqueIdentifierGenerator.generateId(energyManagement.getName()));
- energyManagement = assetStorageService.merge(energyManagement);
- energyManagementId = energyManagement.getId();
-
- // ### De Rotterdam ###
- BuildingAsset building1Asset = new BuildingAsset("De Rotterdam");
- building1Asset.setParent(energyManagement);
- building1Asset.getAttributes().addOrReplace(
- new Attribute<>(BuildingAsset.STREET, "Wilhelminakade 139"),
- new Attribute<>(BuildingAsset.POSTAL_CODE, "3072 AP"),
- new Attribute<>(BuildingAsset.CITY, "Rotterdam"),
- new Attribute<>(BuildingAsset.COUNTRY, "Netherlands"),
- new Attribute<>(Asset.LOCATION, new GeoJSONPoint(4.488324, 51.906577)),
- new Attribute<>("powerBalance", ValueType.NUMBER).addMeta(
- new MetaItem<>(MetaItemType.UNITS, Constants.units(Constants.UNITS_KILO, Constants.UNITS_WATT)),
- new MetaItem<>(MetaItemType.READ_ONLY),
- new MetaItem<>(MetaItemType.RULE_STATE),
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS))
- );
- building1Asset.setId(UniqueIdentifierGenerator.generateId(building1Asset.getName() + "building"));
- building1Asset = assetStorageService.merge(building1Asset);
-
- ElectricityStorageAsset storage1Asset = createDemoElectricityStorageAsset("Battery De Rotterdam", building1Asset, new GeoJSONPoint(4.488324, 51.906577));
- storage1Asset.setManufacturer("Super-B");
- storage1Asset.setModel("Nomia");
- storage1Asset.setId(UniqueIdentifierGenerator.generateId(storage1Asset.getName()));
- storage1Asset = assetStorageService.merge(storage1Asset);
-
- ElectricityConsumerAsset consumption1Asset = createDemoElectricityConsumerAsset("Consumption De Rotterdam", building1Asset, new GeoJSONPoint(4.487519, 51.906544));
- consumption1Asset.getAttribute(ElectricityConsumerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 23),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 21),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 20),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 22),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 21),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 22),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 41),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 54),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 63),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 76),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 80),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 79),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 84),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 76),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 82),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 83),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 77),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 71),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 63),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 41),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 27),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 22),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 24),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 20)
- })
- )
- );
- });
-
- consumption1Asset.setId(UniqueIdentifierGenerator.generateId(consumption1Asset.getName()));
- consumption1Asset = assetStorageService.merge(consumption1Asset);
-
- ElectricityProducerSolarAsset production1Asset = createDemoElectricitySolarProducerAsset("Solar De Rotterdam", building1Asset, new GeoJSONPoint(4.488592, 51.907047));
- production1Asset.setManufacturer("AEG");
- production1Asset.setModel("AS-P60");
- production1Asset.getAttribute(ElectricityProducerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), -1),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), -10),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), -15),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), -39),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), -52),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), -50),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), -48),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), -36),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), -23),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), -24),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), -18),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), -10),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), -8),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), -3),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), -1),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0)
- }
- )
- )
- );
- });
- production1Asset.setEnergyExportTotal(152689d);
- production1Asset.setPowerExportMax(89.6);
- production1Asset.setEfficiencyExport(93);
- production1Asset.setPanelOrientation(ElectricityProducerSolarAsset.PanelOrientation.EAST_WEST);
- production1Asset.setId(UniqueIdentifierGenerator.generateId(production1Asset.getName()));
- production1Asset = assetStorageService.merge(production1Asset);
-
- // ### Stadhuis ###
-
- BuildingAsset building2Asset = new BuildingAsset("Stadhuis");
- building2Asset.setParent(energyManagement);
- building2Asset.getAttributes().addOrReplace(
- new Attribute<>(BuildingAsset.STREET, "Coolsingel 40"),
- new Attribute<>(BuildingAsset.POSTAL_CODE, "3011 AD"),
- new Attribute<>(BuildingAsset.CITY, "Rotterdam"),
- new Attribute<>(BuildingAsset.COUNTRY, "Netherlands"),
- new Attribute<>(Asset.LOCATION, new GeoJSONPoint(4.47985, 51.92274))
- );
- building2Asset.setId(UniqueIdentifierGenerator.generateId(building2Asset.getName() + "building"));
- building2Asset = assetStorageService.merge(building2Asset);
-
- ElectricityStorageAsset storage2Asset = createDemoElectricityStorageAsset("Battery Stadhuis", building2Asset, new GeoJSONPoint(4.47985, 51.92274));
- storage2Asset.setManufacturer("LG Chem");
- storage2Asset.setModel("ESS Industrial");
- storage2Asset.setId(UniqueIdentifierGenerator.generateId(storage2Asset.getName()));
- storage2Asset = assetStorageService.merge(storage2Asset);
-
- ElectricityConsumerAsset consumption2Asset = createDemoElectricityConsumerAsset("Consumption Stadhuis", building2Asset, new GeoJSONPoint(4.47933, 51.92259));
- consumption2Asset.getAttribute(ElectricityConsumerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 7),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 8),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 7),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 9),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 8),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 9),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 12),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 22),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 30),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 36),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 39),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 32),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 36),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 44),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 47),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 44),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 38),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 38),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 34),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 33),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 23),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 13),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 9),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 8)
- }
- )
- )
- );
- });
- consumption2Asset.setId(UniqueIdentifierGenerator.generateId(consumption2Asset.getName()));
- consumption2Asset = assetStorageService.merge(consumption2Asset);
-
- ElectricityProducerSolarAsset production2Asset = createDemoElectricitySolarProducerAsset("Solar Stadhuis", building2Asset, new GeoJSONPoint(4.47945, 51.92301));
- production2Asset.getAttribute(ElectricityProducerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), -1),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), -2),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), -3),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), -8),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), -14),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), -12),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), -10),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), -7),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), -5),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), -7),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), -5),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), -3),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), -2),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), -1),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), -1),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0)
- }
- )
- )
- );
- });
- production2Asset.setEnergyExportTotal(88961d);
- production2Asset.setPowerExportMax(19.2);
- production2Asset.setEfficiencyExport(79);
- production2Asset.setPanelOrientation(ElectricityProducerSolarAsset.PanelOrientation.SOUTH);
- production2Asset.setManufacturer("Solarwatt");
- production2Asset.setModel("EasyIn 60M");
- production2Asset.setId(UniqueIdentifierGenerator.generateId(production2Asset.getName()));
- production2Asset = assetStorageService.merge(production2Asset);
-
- // ### Markthal ###
-
- BuildingAsset building3Asset = new BuildingAsset("Markthal");
- building3Asset.setParent(energyManagement);
- building3Asset.getAttributes().addOrReplace(
- new Attribute<>(BuildingAsset.STREET, "Dominee Jan Scharpstraat 298"),
- new Attribute<>(BuildingAsset.POSTAL_CODE, "3011 GZ"),
- new Attribute<>(BuildingAsset.CITY, "Rotterdam"),
- new Attribute<>(BuildingAsset.COUNTRY, "Netherlands"),
- new Attribute<>(Asset.LOCATION, new GeoJSONPoint(4.47945, 51.92301)),
- new Attribute<>("allChargersInUse", ValueType.BOOLEAN)
- .addMeta(
- new MetaItem<>(MetaItemType.READ_ONLY))
- );
- building3Asset.setId(UniqueIdentifierGenerator.generateId(building3Asset.getName() + "building"));
- building3Asset = assetStorageService.merge(building3Asset);
-
- ElectricityProducerSolarAsset production3Asset = createDemoElectricitySolarProducerAsset("Solar Markthal", building3Asset, new GeoJSONPoint(4.47945, 51.92301));
- production3Asset.getAttribute(ElectricityProducerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), -2),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), -6),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), -10),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), -13),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), -21),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), -14),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), -17),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), -10),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), -9),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), -7),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), -5),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), -4),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), -2),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), -1),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0)
- }
- )
- )
- );
- });
- production3Asset.setEnergyExportTotal(24134d);
- production3Asset.setPowerExportMax(29.8);
- production3Asset.setEfficiencyExport(91);
- production3Asset.setPanelOrientation(ElectricityProducerSolarAsset.PanelOrientation.SOUTH);
- production3Asset.setManufacturer("Sunpower");
- production3Asset.setModel("E20-327");
- production3Asset.setId(UniqueIdentifierGenerator.generateId(production3Asset.getName()));
- production3Asset = assetStorageService.merge(production3Asset);
-
- ElectricityChargerAsset charger1Asset = createDemoElectricityChargerAsset("Charger 1 Markthal", building3Asset, new GeoJSONPoint(4.486143, 51.920058));
- charger1Asset.setPower(0d);
- charger1Asset.getAttributes().getOrCreate(ElectricityChargerAsset.POWER).addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 2),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 5),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 10),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 5),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 15),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 32),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 35),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 17),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 9),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0)
- }
- )
- )
- );
- charger1Asset.setManufacturer("Allego");
- charger1Asset.setModel("HPC");
- charger1Asset.setId(UniqueIdentifierGenerator.generateId(charger1Asset.getName()));
- charger1Asset = assetStorageService.merge(charger1Asset);
-
- ElectricityChargerAsset charger2Asset = createDemoElectricityChargerAsset("Charger 2 Markthal", building3Asset, new GeoJSONPoint(4.486188, 51.919957));
- charger2Asset.setPower(0d);
- charger2Asset.getAttributes().getOrCreate(ElectricityChargerAsset.POWER)
- .addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 5),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 11),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 5),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 10),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 17),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 14),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 9),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 4),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 28),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 38),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 32),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 26),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 13),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0)
- }
- )
- )
- );
- charger2Asset.setManufacturer("Bosch");
- charger2Asset.setModel("EV800");
- charger2Asset.setId(UniqueIdentifierGenerator.generateId(charger2Asset.getName()));
- charger2Asset = assetStorageService.merge(charger2Asset);
-
- ElectricityChargerAsset charger3Asset = createDemoElectricityChargerAsset("Charger 3 Markthal", building3Asset, new GeoJSONPoint(4.486232, 51.919856));
- charger3Asset.setPower(0d);
- charger3Asset.getAttributes().getOrCreate(ElectricityChargerAsset.POWER)
- .addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 4),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 4),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 7),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 9),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 2),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 18),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 4),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 29),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 34),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 22),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 14),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0)
- }
- )
- )
- );
- charger3Asset.setManufacturer("Siemens");
- charger3Asset.setModel("CPC 50");
- charger3Asset.setId(UniqueIdentifierGenerator.generateId(charger3Asset.getName()));
- charger3Asset = assetStorageService.merge(charger3Asset);
-
- ElectricityChargerAsset charger4Asset = createDemoElectricityChargerAsset("Charger 4 Markthal", building3Asset, new GeoJSONPoint(4.486286, 51.919733));
- charger4Asset.setPower(0d);
- charger4Asset.getAttributes().getOrCreate(ElectricityChargerAsset.POWER)
- .addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 3),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 4),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 17),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 15),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 8),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 16),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 4),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 15),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 34),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 30),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 11),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 16),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 7),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 4)
- }
- )
- )
- );
-
- charger4Asset.setManufacturer("SemaConnect");
- charger4Asset.setModel("The Series 6");
- charger4Asset.setId(UniqueIdentifierGenerator.generateId(charger4Asset.getName()));
- charger4Asset = assetStorageService.merge(charger4Asset);
-
- // ### Erasmianum ###
-
- BuildingAsset building4Asset = new BuildingAsset("Erasmianum");
- building4Asset.setParent(energyManagement);
- building4Asset.getAttributes().addOrReplace(
- new Attribute<>(BuildingAsset.STREET, "Wytemaweg 25"),
- new Attribute<>(BuildingAsset.POSTAL_CODE, "3015 CN"),
- new Attribute<>(BuildingAsset.CITY, "Rotterdam"),
- new Attribute<>(BuildingAsset.COUNTRY, "Netherlands"),
- new Attribute<>(Asset.LOCATION, new GeoJSONPoint(4.468324, 51.912062))
- );
- building4Asset.setId(UniqueIdentifierGenerator.generateId(building4Asset.getName() + "building"));
- building4Asset = assetStorageService.merge(building4Asset);
-
- ElectricityConsumerAsset consumption4Asset = createDemoElectricityConsumerAsset("Consumption Erasmianum", building4Asset, new GeoJSONPoint(4.468324, 51.912062));
- consumption4Asset.getAttribute(ElectricityConsumerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 5),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 7),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 5),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 6),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 9),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 23),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 37),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 41),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 47),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 49),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 51),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 43),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 48),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 45),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 46),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 41),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 38),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 30),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 19),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 15),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 7),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 6)
- }
- )
- )
- );
- });
- consumption4Asset.setId(UniqueIdentifierGenerator.generateId(consumption4Asset.getName()));
- consumption4Asset = assetStorageService.merge(consumption4Asset);
-
- // ### Oostelijk zwembad ###
-
- BuildingAsset building5Asset = new BuildingAsset("Oostelijk zwembad");
- building5Asset.setParent(energyManagement);
- building5Asset.getAttributes().addOrReplace(
- new Attribute<>(BuildingAsset.STREET, "Gerdesiaweg 480"),
- new Attribute<>(BuildingAsset.POSTAL_CODE, "3061 RA"),
- new Attribute<>(BuildingAsset.CITY, "Rotterdam"),
- new Attribute<>(BuildingAsset.COUNTRY, "Netherlands"),
- new Attribute<>(Asset.LOCATION, new GeoJSONPoint(4.498048, 51.925770))
- );
- building5Asset.setId(UniqueIdentifierGenerator.generateId(building5Asset.getName() + "building"));
- building5Asset = assetStorageService.merge(building5Asset);
-
- ElectricityConsumerAsset consumption5Asset = createDemoElectricityConsumerAsset("Consumption Zwembad", building5Asset, new GeoJSONPoint(4.498048, 51.925770));
- consumption5Asset.getAttribute(ElectricityConsumerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 16),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 16),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 15),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 16),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 17),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 16),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 24),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 35),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 32),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 33),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 34),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 33),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 34),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 31),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 36),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 34),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 32),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 37),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 38),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 37),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 38),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 35),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 24),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 19)
- }
- )
- )
- );
- });
- consumption5Asset.setId(UniqueIdentifierGenerator.generateId(consumption5Asset.getName()));
- consumption5Asset = assetStorageService.merge(consumption5Asset);
-
- ElectricityProducerSolarAsset production5Asset = createDemoElectricitySolarProducerAsset("Solar Zwembad", building5Asset, new GeoJSONPoint(4.498281, 51.925507));
- production5Asset.getAttribute(ElectricityProducerAsset.POWER).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), -1),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), -3),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), -8),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), -30),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), -44),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), -42),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), -41),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), -29),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), -19),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), -16),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), -11),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), -4),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), -3),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), -2),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 0),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0)
- }
- )
- )
- );
- });
- production5Asset.setEnergyExportTotal(23461d);
- production5Asset.setPowerExportMax(76.2);
- production5Asset.setEfficiencyExport(86);
- production5Asset.setPanelOrientation(ElectricityProducerSolarAsset.PanelOrientation.SOUTH);
- production5Asset.setManufacturer("S-Energy");
- production5Asset.setModel("SN260P-10");
- production5Asset.setId(UniqueIdentifierGenerator.generateId(production5Asset.getName()));
- production5Asset = assetStorageService.merge(production5Asset);
-
- // ### Weather ###
- HttpClientAgent weatherHttpApiAgent = new HttpClientAgent("Weather Agent");
- weatherHttpApiAgent.setParent(energyManagement);
- weatherHttpApiAgent.setBaseURI("https://api.openweathermap.org/data/2.5/");
-
- MultivaluedStringMap queryParams = new MultivaluedStringMap();
- queryParams.put("appid", Collections.singletonList("a6ea6724e5d116ea6d938bee2a8f4689"));
- queryParams.put("lat", Collections.singletonList("51.918849"));
- queryParams.put("lon", Collections.singletonList("4.463250"));
- queryParams.put("units", Collections.singletonList("metric"));
- weatherHttpApiAgent.setRequestQueryParameters(queryParams);
-
- MultivaluedStringMap headers = new MultivaluedStringMap();
- headers.put("Accept", Collections.singletonList("application/json"));
- weatherHttpApiAgent.setRequestHeaders(headers);
-
- weatherHttpApiAgent = assetStorageService.merge(weatherHttpApiAgent);
- weatherHttpApiAgentId = weatherHttpApiAgent.getId();
-
- WeatherAsset weather = new WeatherAsset("Weather");
- weather.setParent(energyManagement);
- weather.setId(UniqueIdentifierGenerator.generateId(weather.getName()));
-
- HttpClientAgent.HttpClientAgentLink agentLink = new HttpClientAgent.HttpClientAgentLink(weatherHttpApiAgentId);
- agentLink.setPath("weather");
- agentLink.setPollingMillis((int)halfHourInMillis);
-
- weather.getAttributes().addOrReplace(
- new Attribute<>("currentWeather", ValueType.JSON_OBJECT)
- .addMeta(
- new MetaItem<>(MetaItemType.AGENT_LINK, agentLink),
- new MetaItem<>(MetaItemType.LABEL, "Open Weather Map API weather end point"),
- new MetaItem<>(MetaItemType.READ_ONLY, true),
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS, false),
- new MetaItem<>(MetaItemType.RULE_STATE, false),
- new MetaItem<>(MetaItemType.ATTRIBUTE_LINKS, new AttributeLink[] {
- createWeatherApiAttributeLink(weather.getId(), "main", "temp", "temperature"),
- createWeatherApiAttributeLink(weather.getId(), "main", "humidity", "humidity"),
- createWeatherApiAttributeLink(weather.getId(), "wind", "speed", "windSpeed"),
- createWeatherApiAttributeLink(weather.getId(), "wind", "deg", "windDirection")
- })
- ));
- weather.getAttribute("windSpeed").ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS),
- new MetaItem<>(MetaItemType.RULE_STATE)
- );
- });
- weather.getAttribute("temperature").ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS),
- new MetaItem<>(MetaItemType.RULE_STATE)
- );
- });
- weather.getAttribute("windDirection").ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS),
- new MetaItem<>(MetaItemType.RULE_STATE)
- );
- });
- weather.getAttribute("humidity").ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS),
- new MetaItem<>(MetaItemType.RULE_STATE)
- );
- });
- new Attribute<>(Asset.LOCATION, new GeoJSONPoint(4.463250, 51.918849));
- weather = assetStorageService.merge(weather);
-
- // ################################ Realm smartcity - Environment monitor ###################################
-
- Asset<?> environmentMonitor = new ThingAsset("Environment monitor");
- environmentMonitor.setRealm(this.realmCityTenant);
- environmentMonitor.setId(UniqueIdentifierGenerator.generateId(environmentMonitor.getName()));
- environmentMonitor = assetStorageService.merge(environmentMonitor);
-
- EnvironmentSensorAsset environment1Asset = createDemoEnvironmentAsset("Oudehaven", environmentMonitor, new GeoJSONPoint(4.49313, 51.91885), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId));
- EnvironmentSensorAsset environment2Asset = createDemoEnvironmentAsset("Kaappark", environmentMonitor, new GeoJSONPoint(4.480434, 51.899287), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId));
- EnvironmentSensorAsset environment3Asset = createDemoEnvironmentAsset("Museumpark", environmentMonitor, new GeoJSONPoint(4.472457, 51.912047), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId));
- EnvironmentSensorAsset environment4Asset = createDemoEnvironmentAsset("Eendrachtsplein", environmentMonitor, new GeoJSONPoint(4.473599, 51.916292), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId));
-
- EnvironmentSensorAsset[] environmentArray = {environment1Asset, environment2Asset, environment3Asset, environment4Asset};
- for (EnvironmentSensorAsset asset : environmentArray) {
- asset.setManufacturer("Intemo");
- asset.setModel("Josene outdoor");
- asset.getAttribute(EnvironmentSensorAsset.OZONE).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), getRandomNumberInRange(90,110)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), getRandomNumberInRange(90,110)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), getRandomNumberInRange(90,110)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), getRandomNumberInRange(90,110)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), getRandomNumberInRange(110,120)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), getRandomNumberInRange(115,125)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), getRandomNumberInRange(115,125)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), getRandomNumberInRange(110,120)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), getRandomNumberInRange(90,110)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), getRandomNumberInRange(90,110)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), getRandomNumberInRange(80,90)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), getRandomNumberInRange(80,90))
- }
- )
- )
- );
- });
- asset.setId(UniqueIdentifierGenerator.generateId(asset.getName()));
- asset = assetStorageService.merge(asset);
- }
-
- GroundwaterSensorAsset groundwater1Asset = createDemoGroundwaterAsset("Leuvehaven", environmentMonitor, new GeoJSONPoint(4.48413, 51.91431));
- GroundwaterSensorAsset groundwater2Asset = createDemoGroundwaterAsset("Steiger", environmentMonitor, new GeoJSONPoint(4.482887, 51.920082));
- GroundwaterSensorAsset groundwater3Asset = createDemoGroundwaterAsset("Stadhuis", environmentMonitor, new GeoJSONPoint(4.480876, 51.923212));
-
- GroundwaterSensorAsset[] groundwaterArray = {groundwater1Asset, groundwater2Asset, groundwater3Asset};
- for (GroundwaterSensorAsset asset : groundwaterArray) {
- asset.setManufacturer("Eijkelkamp");
- asset.setModel("TeleControlNet");
- asset.getAttribute(GroundwaterSensorAsset.SOIL_TEMPERATURE).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 12.2),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 12.1),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 12.0),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 11.8),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 11.7),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 11.7),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 11.9),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 12.1),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 12.8),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 13.5),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 13.9),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 15.2),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 15.3),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 15.5),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 15.5),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 15.4),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 15.2),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 15.2),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 14.6),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 14.2),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 13.8),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 13.4),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 12.8),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 12.3)
- }
- )
- )
- );
- });
- asset.getAttribute(GroundwaterSensorAsset.WATER_LEVEL).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), getRandomNumberInRange(100, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), getRandomNumberInRange(100, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), getRandomNumberInRange(90, 110)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), getRandomNumberInRange(100, 110)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), getRandomNumberInRange(100, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), getRandomNumberInRange(110, 120))
- }
- )
- )
- );
- });
- asset.setId(UniqueIdentifierGenerator.generateId(asset.getName()));
- asset = assetStorageService.merge(asset);
- }
-
- // ################################ Realm smartcity - Mobility and Safety ###################################
-
- Asset<?> mobilityAndSafety = new ThingAsset("Mobility and safety");
- mobilityAndSafety.setRealm(this.realmCityTenant);
- mobilityAndSafety.setId(UniqueIdentifierGenerator.generateId(mobilityAndSafety.getName()));
- mobilityAndSafety = assetStorageService.merge(mobilityAndSafety);
-
- // ### Parking ###
-
- GroupAsset parkingGroupAsset = new GroupAsset("Parking group", ParkingAsset.class);
- parkingGroupAsset.setParent(mobilityAndSafety);
- parkingGroupAsset.getAttributes().addOrReplace(
- new Attribute<>("totalOccupancy", ValueType.POSITIVE_INTEGER)
- .addMeta(
- new MetaItem<>(MetaItemType.UNITS, Constants.units(Constants.UNITS_PERCENTAGE)),
- new MetaItem<>(MetaItemType.CONSTRAINTS, ValueConstraint.constraints(new ValueConstraint.Min(0), new ValueConstraint.Max(100))),
- new MetaItem<>(MetaItemType.READ_ONLY),
- new MetaItem<>(MetaItemType.RULE_STATE),
- new MetaItem<>(MetaItemType.STORE_DATA_POINTS)
- ));
- parkingGroupAsset.setId(UniqueIdentifierGenerator.generateId(parkingGroupAsset.getName()));
- parkingGroupAsset = assetStorageService.merge(parkingGroupAsset);
-
- ParkingAsset parking1Asset = createDemoParkingAsset("Markthal", parkingGroupAsset, new GeoJSONPoint(4.48527, 51.91984))
- .setManufacturer("SKIDATA")
- .setModel("Barrier.Gate");
- parking1Asset.getAttribute(ParkingAsset.SPACES_OCCUPIED).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 34),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 37),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 31),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 36),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 32),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 39),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 47),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 53),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 165),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 301),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 417),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 442),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 489),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 467),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 490),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 438),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 457),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 402),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 379),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 336),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 257),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 204),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 112),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 75)
- }
- )
- )
- );
- });
- parking1Asset.setPriceHourly(3.75);
- parking1Asset.setPriceDaily(25.00);
- parking1Asset.setSpacesTotal(512);
- parking1Asset.getAttribute(ParkingAsset.SPACES_TOTAL).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(MetaItemType.RULE_STATE));
- });
- parking1Asset.setId(UniqueIdentifierGenerator.generateId(parking1Asset.getName()));
- parking1Asset = assetStorageService.merge(parking1Asset);
-
- ParkingAsset parking2Asset = createDemoParkingAsset("Lijnbaan", parkingGroupAsset, new GeoJSONPoint(4.47681, 51.91849));
- parking2Asset.setManufacturer("SKIDATA");
- parking2Asset.setModel("Barrier.Gate");
- parking2Asset.getAttribute(ParkingAsset.SPACES_OCCUPIED).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 31),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 24),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 36),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 38),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 46),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 48),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 52),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 89),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 142),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 187),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 246),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 231),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 367),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 345),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 386),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 312),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 363),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 276),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 249),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 256),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 123),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 153),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 83),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 25)
- }
- )
- )
- );
- });
- parking2Asset.setPriceHourly(3.50);
- parking2Asset.setPriceDaily(23.00);
- parking2Asset.setSpacesTotal(390);
- parking2Asset.getAttribute(ParkingAsset.SPACES_TOTAL).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(MetaItemType.RULE_STATE));
- });
- parking2Asset.setId(UniqueIdentifierGenerator.generateId(parking2Asset.getName()));
- parking2Asset = assetStorageService.merge(parking2Asset);
-
- ParkingAsset parking3Asset = createDemoParkingAsset("Erasmusbrug", parkingGroupAsset, new GeoJSONPoint(4.48207, 51.91127));
- parking3Asset.setManufacturer("Kiestra");
- parking3Asset.setModel("Genius Rainbow");
- parking3Asset.getAttribute(ParkingAsset.SPACES_OCCUPIED).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 25),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 23),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 23),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 21),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 18),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 13),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 29),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 36),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 119),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 257),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 357),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 368),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 362),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 349),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 370),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 367),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 355),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 314),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 254),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 215),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 165),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 149),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 108),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 47)
- }
- )
- )
- );
- });
- parking3Asset.setPriceHourly(3.40);
- parking3Asset.setPriceDaily(20.00);
- parking3Asset.setSpacesTotal(373);
- parking3Asset.getAttribute(ParkingAsset.SPACES_TOTAL).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(MetaItemType.RULE_STATE));
- });
- parking3Asset.setId(UniqueIdentifierGenerator.generateId(parking3Asset.getName()));
- parking3Asset = assetStorageService.merge(parking3Asset);
-
- // ### Crowd control ###
-
- ThingAsset assetAreaStation = new ThingAsset("Stationsplein");
- assetAreaStation.setParent(mobilityAndSafety)
- .getAttributes().addOrReplace(
- new Attribute<>(Asset.LOCATION, STATIONSPLEIN_LOCATION),
- new Attribute<>(BuildingAsset.POSTAL_CODE, "3013 AK"),
- new Attribute<>(BuildingAsset.CITY, "Rotterdam"),
- new Attribute<>(BuildingAsset.COUNTRY, "Netherlands")
- );
- assetAreaStation.setId(UniqueIdentifierGenerator.generateId(assetAreaStation.getName()));
- assetAreaStation = assetStorageService.merge(assetAreaStation);
- area1Id = assetAreaStation.getId();
-
- PeopleCounterAsset peopleCounter1Asset = createDemoPeopleCounterAsset("People Counter South", assetAreaStation, new GeoJSONPoint(4.470147, 51.923171), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId));
- peopleCounter1Asset.setManufacturer("ViNotion");
- peopleCounter1Asset.setModel("ViSense");
- peopleCounter1Asset.getAttribute(PeopleCounterAsset.COUNT_GROWTH_PER_MINUTE).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0.2),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0.3),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0.1),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0.0),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0.2),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0.4),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0.5),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 0.7),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 1.8),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 2.1),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 2.4),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 1.9),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 1.8),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 2.1),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 1.8),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 1.7),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 2.3),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 3.1),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 2.8),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 2.2),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 1.6),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 1.7),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 1.1),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0.8)
- }
- )
- )
- );
- });
- peopleCounter1Asset.setId(UniqueIdentifierGenerator.generateId(peopleCounter1Asset.getName()));
- peopleCounter1Asset = assetStorageService.merge(peopleCounter1Asset);
-
- Asset<?> peopleCounter2Asset = createDemoPeopleCounterAsset("People Counter North", assetAreaStation, new GeoJSONPoint(4.469329, 51.923700), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId));
- peopleCounter2Asset.setManufacturer("Axis");
- peopleCounter2Asset.setModel("P1375-E");
- peopleCounter2Asset.getAttribute(PeopleCounterAsset.COUNT_GROWTH_PER_MINUTE).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), 0.3),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), 0.2),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), 0.3),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), 0.1),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), 0.0),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), 0.3),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), 0.7),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), 0.6),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), 1.9),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), 2.2),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), 2.8),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), 1.6),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), 1.9),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), 2.2),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), 1.9),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), 1.6),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), 2.4),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), 3.2),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), 2.9),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), 2.3),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), 1.7),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), 1.4),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), 1.2),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), 0.7)
- }
- )
- )
- );
- });
- peopleCounter2Asset.setId(UniqueIdentifierGenerator.generateId(peopleCounter2Asset.getName()));
- peopleCounter2Asset = assetStorageService.merge(peopleCounter2Asset);
-
- MicrophoneAsset microphone1Asset = createDemoMicrophoneAsset("Microphone South", assetAreaStation, new GeoJSONPoint(4.470362, 51.923201), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), getRandomNumberInRange(50,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), getRandomNumberInRange(50,55)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), getRandomNumberInRange(50,55)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), getRandomNumberInRange(50,55)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), getRandomNumberInRange(60,70)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), getRandomNumberInRange(60,70)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), getRandomNumberInRange(50,60))
- }
- ));
- microphone1Asset.setManufacturer("Sorama");
- microphone1Asset.setModel("CAM1K");
- microphone1Asset.setId(UniqueIdentifierGenerator.generateId(microphone1Asset.getName()));
- microphone1Asset = assetStorageService.merge(microphone1Asset);
-
- MicrophoneAsset microphone2Asset = createDemoMicrophoneAsset("Microphone North", assetAreaStation, new GeoJSONPoint(4.469190, 51.923786), () ->
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[] {
- new SimulatorReplayDatapoint(midnight.get(SECOND_OF_DAY), getRandomNumberInRange(50,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(1).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(2).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(3).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(4).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(5).get(SECOND_OF_DAY), getRandomNumberInRange(45,50)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), getRandomNumberInRange(50,55)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), getRandomNumberInRange(50,55)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), getRandomNumberInRange(50,55)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), getRandomNumberInRange(60,70)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), getRandomNumberInRange(55,60)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), getRandomNumberInRange(60,70)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), getRandomNumberInRange(60,65)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), getRandomNumberInRange(50,60))
- }
- ));
- microphone2Asset.setManufacturer("Sorama");
- microphone2Asset.setModel("CAM1K");
- microphone2Asset.setId(UniqueIdentifierGenerator.generateId(microphone2Asset.getName()));
- microphone2Asset = assetStorageService.merge(microphone2Asset);
-
- LightAsset lightStation1Asset = createDemoLightAsset("Station Light NW", assetAreaStation, new GeoJSONPoint(4.468874, 51.923881));
- lightStation1Asset.setManufacturer("Philips");
- lightStation1Asset.setModel("CityTouch");
- lightStation1Asset.setId(UniqueIdentifierGenerator.generateId(lightStation1Asset.getName()));
- lightStation1Asset = assetStorageService.merge(lightStation1Asset);
-
- LightAsset lightStation2Asset = createDemoLightAsset("Station Light NE", assetAreaStation, new GeoJSONPoint(4.470539, 51.923991));
- lightStation2Asset.setManufacturer("Philips");
- lightStation2Asset.setModel("CityTouch");
- lightStation2Asset.setId(UniqueIdentifierGenerator.generateId(lightStation2Asset.getName()));
- lightStation2Asset = assetStorageService.merge(lightStation2Asset);
-
- LightAsset lightStation3Asset = createDemoLightAsset("Station Light S", assetAreaStation, new GeoJSONPoint(4.470558, 51.923186));
- lightStation3Asset.setManufacturer("Philips");
- lightStation3Asset.setModel("CityTouch");
- lightStation3Asset.setId(UniqueIdentifierGenerator.generateId(lightStation3Asset.getName()));
- lightStation3Asset = assetStorageService.merge(lightStation3Asset);
-
- // ### Lighting controller ###
-
- LightAsset lightingControllerOPAsset = createDemoLightControllerAsset("Lighting Noordereiland", mobilityAndSafety, new GeoJSONPoint(4.496177, 51.915060));
- lightingControllerOPAsset.setManufacturer("Pharos");
- lightingControllerOPAsset.setModel("LPC X");
- lightingControllerOPAsset.setId(UniqueIdentifierGenerator.generateId(lightingControllerOPAsset.getName()));
- lightingControllerOPAsset = assetStorageService.merge(lightingControllerOPAsset);
-
- LightAsset lightOP1Asset = createDemoLightAsset("Ons Park 1", lightingControllerOPAsset, new GeoJSONPoint(4.49626, 51.91516));
- lightOP1Asset.setManufacturer("Schréder");
- lightOP1Asset.setModel("Axia 2");
- lightOP1Asset.setId(UniqueIdentifierGenerator.generateId(lightOP1Asset.getName()));
- lightOP1Asset = assetStorageService.merge(lightOP1Asset);
-
- LightAsset lightOP2Asset = createDemoLightAsset("Ons Park 2", lightingControllerOPAsset, new GeoJSONPoint(4.49705, 51.91549));
- lightOP2Asset.setManufacturer("Schréder");
- lightOP2Asset.setModel("Axia 2");
- lightOP2Asset.setId(UniqueIdentifierGenerator.generateId(lightOP2Asset.getName()));
- lightOP2Asset = assetStorageService.merge(lightOP2Asset);
-
- LightAsset lightOP3Asset = createDemoLightAsset("Ons Park 3", lightingControllerOPAsset, new GeoJSONPoint(4.49661, 51.91495));
- lightOP3Asset.setManufacturer("Schréder");
- lightOP3Asset.setModel("Axia 2");
- lightOP3Asset.setId(UniqueIdentifierGenerator.generateId(lightOP3Asset.getName()));
- lightOP3Asset = assetStorageService.merge(lightOP3Asset);
-
- LightAsset lightOP4Asset = createDemoLightAsset("Ons Park 4", lightingControllerOPAsset, new GeoJSONPoint(4.49704, 51.91520));
- lightOP4Asset.setManufacturer("Schréder");
- lightOP4Asset.setModel("Axia 2");
- lightOP4Asset.setId(UniqueIdentifierGenerator.generateId(lightOP4Asset.getName()));
- lightOP4Asset = assetStorageService.merge(lightOP4Asset);
-
- LightAsset lightOP5Asset = createDemoLightAsset("Ons Park 5", lightingControllerOPAsset, new GeoJSONPoint(4.49758, 51.91440));
- lightOP5Asset.setManufacturer("Schréder");
- lightOP5Asset.setModel("Axia 2");
- lightOP5Asset.setId(UniqueIdentifierGenerator.generateId(lightOP5Asset.getName()));
- lightOP5Asset = assetStorageService.merge(lightOP5Asset);
-
- LightAsset lightOP6Asset = createDemoLightAsset("Ons Park 6", lightingControllerOPAsset, new GeoJSONPoint(4.49786, 51.91452));
- lightOP6Asset.setManufacturer("Schréder");
- lightOP6Asset.setModel("Axia 2");
- lightOP6Asset.setId(UniqueIdentifierGenerator.generateId(lightOP6Asset.getName()));
- lightOP6Asset = assetStorageService.merge(lightOP6Asset);
-
- // ### Ships ###
-
- GroupAsset shipGroupAsset = new GroupAsset("Ship group", ShipAsset.class);
- shipGroupAsset.setParent(mobilityAndSafety);
- shipGroupAsset.setId(UniqueIdentifierGenerator.generateId(shipGroupAsset.getName()));
- shipGroupAsset = assetStorageService.merge(shipGroupAsset);
-
- ShipAsset ship1Asset = createDemoShipAsset("Hotel New York", shipGroupAsset, new GeoJSONPoint(4.48527, 51.91984));
- ship1Asset.setLength(12);
- ship1Asset.setShipType("Passenger");
- ship1Asset.setIMONumber(9183527);
- ship1Asset.setMSSINumber(244650537);
- ship1Asset.getAttribute(Asset.LOCATION).ifPresent(assetAttribute -> {
- assetAttribute.addMeta(
- new MetaItem<>(
- MetaItemType.AGENT_LINK,
- new SimulatorAgent.SimulatorAgentLink(smartcitySimulatorAgentId).setSimulatorReplayData(
- new SimulatorReplayDatapoint[]{
- new SimulatorReplayDatapoint(midnight.plusHours(6).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(6).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(7).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(8).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(9).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(10).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(11).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(12).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(13).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(14).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(15).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(16).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(17).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(18).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(19).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(20).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(21).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(22).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(5).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(10).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(15).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(20).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(25).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(30).get(SECOND_OF_DAY), new GeoJSONPoint(4.484374, 51.903518)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(35).get(SECOND_OF_DAY), new GeoJSONPoint(4.479779, 51.904404)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(40).get(SECOND_OF_DAY), new GeoJSONPoint(4.482914, 51.906769)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(45).get(SECOND_OF_DAY), new GeoJSONPoint(4.486156, 51.908570)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(50).get(SECOND_OF_DAY), new GeoJSONPoint(4.483362, 51.911897)),
- new SimulatorReplayDatapoint(midnight.plusHours(23).plusMinutes(55).get(SECOND_OF_DAY), new GeoJSONPoint(4.482669, 51.916436))
- }
- )
- )
- );
- });
- ship1Asset.setId(UniqueIdentifierGenerator.generateId(ship1Asset.getName()));
- ship1Asset = assetStorageService.merge(ship1Asset);
- }
-
- @SuppressWarnings("OptionalGetWithoutIsPresent")
- protected static AttributeLink createWeatherApiAttributeLink(String assetId, String jsonParentName, String jsonName, String parameter) {
- return new AttributeLink(
- new AttributeRef(assetId, parameter),
- null,
- new ValueFilter[]{
- new JsonPathFilter("$." + jsonParentName + "." + jsonName, true, false),
- }
- );
- }
-}
diff --git a/deployment/src/main/java/org/openremote/demo/setup/RulesDemoSetup.java b/deployment/src/main/java/org/openremote/demo/setup/RulesDemoSetup.java
deleted file mode 100644
index c33b1565f..000000000
--- a/deployment/src/main/java/org/openremote/demo/setup/RulesDemoSetup.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright 2020, 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.demo.setup;
-
-import org.apache.commons.io.IOUtils;
-import org.openremote.manager.setup.ManagerSetup;
-import org.openremote.model.Container;
-import org.openremote.model.attribute.MetaItem;
-import org.openremote.model.rules.Ruleset;
-import org.openremote.model.rules.TenantRuleset;
-
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.logging.Logger;
-
-import static org.openremote.model.rules.Ruleset.Lang.SHOW_ON_LIST;
-import static org.openremote.model.value.MetaItemType.SHOW_ON_DASHBOARD;
-
-public class RulesDemoSetup extends ManagerSetup {
-
- private static final Logger LOG = Logger.getLogger(RulesDemoSetup.class.getName());
-
- public RulesDemoSetup(Container container) {
- super(container);
- }
-
- public Long tenantSmartCityRulesetId;
-
- @Override
- public void onStart() throws Exception {
-
- KeycloakDemoSetup keycloakDemoSetup = setupService.getTaskOfType(KeycloakDemoSetup.class);
- ManagerDemoSetup managerDemoSetup = setupService.getTaskOfType(ManagerDemoSetup.class);
-
- LOG.info("Importing demo rulesets");
-
- // ################################ Rules demo data ###################################
-
- // SmartCity geofences
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/DeKuip.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "De Kuip", Ruleset.Lang.JSON, rules
- ).setAccessPublicRead(true);
- ruleset.getMeta().addOrReplace(
- new MetaItem<>(Ruleset.Lang.SHOW_ON_LIST));
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/Euromast.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Euromast", Ruleset.Lang.JSON, rules
- ).setAccessPublicRead(true);
- ruleset.getMeta().addOrReplace(
- new MetaItem<>(Ruleset.Lang.SHOW_ON_LIST));
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/Markthal.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Markthal", Ruleset.Lang.JSON, rules
- ).setAccessPublicRead(true);
- ruleset.getMeta().addOrReplace(
- new MetaItem<>(Ruleset.Lang.SHOW_ON_LIST));
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/MarkthalChargersInUse.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Markthal: All chargers in use", Ruleset.Lang.JSON, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/OnsParkBrightStrongWinds.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Ons Park: Brighten lights", Ruleset.Lang.JSON, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/OnsParkDimLightWinds.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Ons Park: Dim lights", Ruleset.Lang.JSON, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/StationCrowded.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Station: Crowded square", Ruleset.Lang.JSON, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/EnvironmentAlerts.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Environment monitoring: Alerts", Ruleset.Lang.JSON, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/TotalPowerConsumption.flow")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Total power consumption", Ruleset.Lang.FLOW, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/TotalSolarProduction.flow")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Total power production", Ruleset.Lang.FLOW, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/RotterdamPowerBalance.flow")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "De Rotterdam: Power balance", Ruleset.Lang.FLOW, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/ParkingOccupiedPercentage.flow")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Parking: Occupied spaces", Ruleset.Lang.FLOW, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/ParkingFull.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Parking: Almost full", Ruleset.Lang.JSON, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/RotterdamBatteryUse.json")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "De Rotterdam: Battery use", Ruleset.Lang.JSON, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
-
- try (InputStream inputStream = RulesDemoSetup.class.getResourceAsStream("/demo/rules/smartcity/LightGroupOnOff.flow")) {
- String rules = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
- Ruleset ruleset = new TenantRuleset(
- keycloakDemoSetup.tenantCity.getRealm(), "Light group: On/Off", Ruleset.Lang.FLOW, rules
- );
- tenantSmartCityRulesetId = rulesetStorageService.merge(ruleset).getId();
- }
- }
-}
diff --git a/deployment/src/main/resources/META-INF/services/org.openremote.manager.setup.SetupTasks b/deployment/src/main/resources/META-INF/services/org.openremote.manager.setup.SetupTasks
deleted file mode 100644
index e951c7a20..000000000
--- a/deployment/src/main/resources/META-INF/services/org.openremote.manager.setup.SetupTasks
+++ /dev/null
@@ -1 +0,0 @@
-org.openremote.demo.setup.DemoSetupTasks
diff --git a/deployment/src/main/resources/demo/rules/smartcity/DeKuip.json b/deployment/src/main/resources/demo/rules/smartcity/DeKuip.json
deleted file mode 100644
index 242ddae75..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/DeKuip.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "rules": [
- {
- "name": "De Kuip",
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "ConsoleAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "location"
- },
- "value": {
- "predicateType": "radial",
- "negated": false,
- "radius": 100,
- "lat": 51.8938569,
- "lng": 4.5219983
- }
- }
- ]
- }
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "notification",
- "notification": {
- "name": "De Kuip",
- "message": {
- "type": "push",
- "title": "De Kuip",
- "body": "De thuis van Feyenoord",
- "action": {
- "url": "https://www.feyenoord.nl"
- },
- "buttons": [
- {
- "title": "Open in app",
- "action": {
- "url": "https://www.feyenoord.nl"
- }
- },
- {
- "title": "Open in browser",
- "action": {
- "url": "https://www.feyenoord.nl",
- "openInBrowser": true
- }
- }
- ]
- }
- }
- }
- ],
- "reset": {
- "timer": "1m"
- }
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/EnvironmentAlerts.json b/deployment/src/main/resources/demo/rules/smartcity/EnvironmentAlerts.json
deleted file mode 100644
index 78aa615c4..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/EnvironmentAlerts.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "rules": [
- {
- "recurrence": {
- "mins": 10080
- },
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "GroundwaterSensorAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "waterLevel"
- },
- "value": {
- "predicateType": "number",
- "operator": "LESS_THAN",
- "value": 100
- }
- }
- ]
- }
- }
- }
- ]
- },
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "EnvironmentSensorAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "ozoneLevel"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_THAN",
- "value": 120
- }
- }
- ]
- }
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "notification",
- "target": {
- "custom": "[email protected]"
- },
- "notification": {
- "message": {
- "type": "email",
- "subject": "%RULESET_NAME%",
- "html": "%TRIGGER_ASSETS%"
- }
- }
- }
- ],
- "name": "Environment monitoring: Alerts"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/Euromast.json b/deployment/src/main/resources/demo/rules/smartcity/Euromast.json
deleted file mode 100644
index 0b0b86a02..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/Euromast.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "rules": [
- {
- "name": "Euromast",
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "ConsoleAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "location"
- },
- "value": {
- "predicateType": "radial",
- "negated": false,
- "radius": 100,
- "lat": 51.9069373,
- "lng": 4.4633775
- }
- }
- ]
- }
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "notification",
- "notification": {
- "name": "Euromast",
- "message": {
- "type": "push",
- "title": "Euromast",
- "body": "Euromast, sinds 1960",
- "action": {
- "url": "https://euromast.nl"
- },
- "buttons": [
- {
- "title": "Open in app",
- "action": {
- "url": "https://euromast.nl"
- }
- },
- {
- "title": "Open in browser",
- "action": {
- "url": "https://euromast.nl",
- "openInBrowser": true
- }
- }
- ]
- }
- }
- }
- ],
- "reset": {
- "timer": "1m"
- }
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/LightGroupOnOff.flow b/deployment/src/main/resources/demo/rules/smartcity/LightGroupOnOff.flow
deleted file mode 100644
index 3cc9f75fc..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/LightGroupOnOff.flow
+++ /dev/null
@@ -1,270 +0,0 @@
-{
- "name": "Light group: On/Off",
- "description": null,
- "connections": [
- {
- "from": "ukpONuy_1l",
- "to": "B3dY_taYNK"
- },
- {
- "from": "ukpONuy_1l",
- "to": "68LWcne-67"
- },
- {
- "from": "ukpONuy_1l",
- "to": "ktRR2NfCIz"
- },
- {
- "from": "ukpONuy_1l",
- "to": "yeg_2mKTYs"
- },
- {
- "from": "ukpONuy_1l",
- "to": "IZLWvgKE53"
- },
- {
- "from": "ukpONuy_1l",
- "to": "jhuPjbsPKE"
- }
- ],
- "nodes": [
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "52kOB7c1Rs7WUxgfoCKf5B",
- "attributeName": "onOff"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "BOOLEAN",
- "nodeId": "06QKgajTZ",
- "id": "ukpONuy_1l"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -543.9625396728516,
- "y": -112.80001831054688
- },
- "size": {
- "x": 227.5,
- "y": 65
- },
- "id": "06QKgajTZ"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "BOOLEAN",
- "nodeId": "B5WJbAESc",
- "id": "B3dY_taYNK"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "3QlH8nQWvnevcyxat6tQKJ",
- "attributeName": "onOff"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": -17.587539672851562,
- "y": -464.4250183105469
- },
- "size": {
- "x": 113,
- "y": 65
- },
- "id": "B5WJbAESc"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "BOOLEAN",
- "nodeId": "-RIbDrogC",
- "id": "68LWcne-67"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "4Y8sldGAezGSxqSSW3bly5",
- "attributeName": "onOff"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": -17.212539672851562,
- "y": -323.1750183105469
- },
- "size": {
- "x": 113,
- "y": 65
- },
- "id": "-RIbDrogC"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "BOOLEAN",
- "nodeId": "pfENJ9_NZ",
- "id": "ktRR2NfCIz"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "4RYkKKuM1wOw21PNOgHShZ",
- "attributeName": "onOff"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": -16.962539672851562,
- "y": -183.30001831054688
- },
- "size": {
- "x": 113,
- "y": 65
- },
- "id": "pfENJ9_NZ"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "BOOLEAN",
- "nodeId": "w11vs1M8S",
- "id": "yeg_2mKTYs"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "43F9MlyRcnGhY2m2hHlOdz",
- "attributeName": "onOff"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": -17.712539672851562,
- "y": -41.675018310546875
- },
- "size": {
- "x": 113,
- "y": 65
- },
- "id": "w11vs1M8S"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "BOOLEAN",
- "nodeId": "80FuLcHW-",
- "id": "IZLWvgKE53"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "5aID6iE9exaVNirT2flago",
- "attributeName": "onOff"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": -16.587539672851562,
- "y": 94.57498168945312
- },
- "size": {
- "x": 113,
- "y": 65
- },
- "id": "80FuLcHW-"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "BOOLEAN",
- "nodeId": "aJz5lyWMD",
- "id": "jhuPjbsPKE"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "3wauEi0ol2th6hXULHV2N4",
- "attributeName": "onOff"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": -17.462539672851562,
- "y": 233.94998168945312
- },
- "size": {
- "x": 113,
- "y": 65
- },
- "id": "aJz5lyWMD"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/Markthal.json b/deployment/src/main/resources/demo/rules/smartcity/Markthal.json
deleted file mode 100644
index d430586ee..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/Markthal.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "rules": [
- {
- "name": "Markthal",
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "ConsoleAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "location"
- },
- "value": {
- "predicateType": "radial",
- "negated": false,
- "radius": 100,
- "lat": 51.9202494,
- "lng": 4.4851372
- }
- }
- ]
- }
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "notification",
- "notification": {
- "name": "Markthal",
- "message": {
- "type": "push",
- "title": "Markthal",
- "body": "Happy Food Shopping",
- "action": {
- "url": "https://www.markthal.nl"
- },
- "buttons": [
- {
- "title": "Open in app",
- "action": {
- "url": "https://www.markthal.nl"
- }
- },
- {
- "title": "Open in browser",
- "action": {
- "url": "https://www.markthal.nl",
- "openInBrowser": true
- }
- }
- ]
- }
- }
- }
- ],
- "reset": {
- "timer": "1m"
- }
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/MarkthalChargersInUse.json b/deployment/src/main/resources/demo/rules/smartcity/MarkthalChargersInUse.json
deleted file mode 100644
index 833a2c533..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/MarkthalChargersInUse.json
+++ /dev/null
@@ -1,139 +0,0 @@
-{
- "rules": [
- {
- "recurrence": {
- "mins": 10080
- },
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "ElectricityChargerAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "power"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_EQUALS",
- "value": 0
- }
- }
- ]
- },
- "ids": [
- "2QEKoczoTiOfLKh5UHqEf5"
- ]
- }
- },
- {
- "assets": {
- "types": [
- "ElectricityChargerAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "power"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_EQUALS",
- "value": 0
- }
- }
- ]
- },
- "ids": [
- "6Pgv4HQGmC0EjXg7GmNM6l"
- ]
- }
- },
- {
- "assets": {
- "types": [
- "ElectricityChargerAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "power"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_EQUALS",
- "value": 0
- }
- }
- ]
- },
- "ids": [
- "3KUCNnuNcS2zFAURMpAq0u"
- ]
- }
- },
- {
- "assets": {
- "types": [
- "ElectricityChargerAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "power"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_EQUALS",
- "value": 0
- }
- }
- ]
- },
- "ids": [
- "6EaYX7DEAFwxOJr3de4GFf"
- ]
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "notification",
- "target": {
- "custom": "[email protected]"
- },
- "notification": {
- "message": {
- "type": "email",
- "subject": "%RULESET_NAME%",
- "html": "%TRIGGER_ASSETS%"
- }
- }
- }
- ],
- "name": "Markthal: All chargers in use"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/OnsParkBrightStrongWinds.json b/deployment/src/main/resources/demo/rules/smartcity/OnsParkBrightStrongWinds.json
deleted file mode 100644
index ee06d235f..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/OnsParkBrightStrongWinds.json
+++ /dev/null
@@ -1,138 +0,0 @@
-{
- "rules": [
- {
- "recurrence": {
- "mins": 0
- },
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "WeatherAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "windSpeed"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_THAN",
- "value": 2
- }
- }
- ]
- },
- "ids": [
- "2bMjSx0iy1usC9KKhT24h9"
- ]
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "3QlH8nQWvnevcyxat6tQKJ"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 90,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "4Y8sldGAezGSxqSSW3bly5"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 90,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "4RYkKKuM1wOw21PNOgHShZ"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 90,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "43F9MlyRcnGhY2m2hHlOdz"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 90,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "5aID6iE9exaVNirT2flago"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 90,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "3wauEi0ol2th6hXULHV2N4"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 90,
- "attributeName": "brightness"
- }
- ],
- "name": "Ons Park: Brighten lights"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/OnsParkDimLightWinds.json b/deployment/src/main/resources/demo/rules/smartcity/OnsParkDimLightWinds.json
deleted file mode 100644
index dd59a4c85..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/OnsParkDimLightWinds.json
+++ /dev/null
@@ -1,138 +0,0 @@
-{
- "rules": [
- {
- "recurrence": {
- "mins": 0
- },
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "WeatherAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "windSpeed"
- },
- "value": {
- "predicateType": "number",
- "operator": "LESS_EQUALS",
- "value": 2
- }
- }
- ]
- },
- "ids": [
- "2bMjSx0iy1usC9KKhT24h9"
- ]
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "3QlH8nQWvnevcyxat6tQKJ"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 60,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "4Y8sldGAezGSxqSSW3bly5"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 60,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "4RYkKKuM1wOw21PNOgHShZ"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 60,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "43F9MlyRcnGhY2m2hHlOdz"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 60,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "5aID6iE9exaVNirT2flago"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 60,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "3wauEi0ol2th6hXULHV2N4"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 60,
- "attributeName": "brightness"
- }
- ],
- "name": "Ons Park: Dim lights"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/ParkingFull.json b/deployment/src/main/resources/demo/rules/smartcity/ParkingFull.json
deleted file mode 100644
index 1593d387b..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/ParkingFull.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "rules": [
- {
- "recurrence": {
- "mins": 10080
- },
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "GroupAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "totalOccupancy"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_EQUALS",
- "value": 90
- }
- }
- ]
- },
- "ids": [
- "7UUzmvnTuLdjVpTb8MnjSX"
- ]
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "notification",
- "target": {
- "custom": "[email protected]"
- },
- "notification": {
- "message": {
- "type": "email",
- "subject": "%RULESET_NAME%",
- "html": "%TRIGGER_ASSETS%"
- }
- }
- }
- ],
- "name": "Parking: Almost full"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/ParkingOccupiedPercentage.flow b/deployment/src/main/resources/demo/rules/smartcity/ParkingOccupiedPercentage.flow
deleted file mode 100644
index 38c595895..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/ParkingOccupiedPercentage.flow
+++ /dev/null
@@ -1,551 +0,0 @@
-{
- "name": "Parking: Occupied spaces",
- "description": null,
- "connections": [
- {
- "from": "5D-B3ktG0G",
- "to": "vw097tfr81"
- },
- {
- "from": "hsSgzfNE-E",
- "to": "bQs4E9qCN2"
- },
- {
- "from": "vCKMzAmLNx",
- "to": "hz9f6Q4ESn"
- },
- {
- "from": "lasR8uUoUR",
- "to": "KqxwaOcGIP"
- },
- {
- "from": "cOmTxKOpO0",
- "to": "mJMXOPeGZd"
- },
- {
- "from": "SOy3l0IR80",
- "to": "vVdwGz2y8k"
- },
- {
- "from": "-GPWnMsaGi",
- "to": "OwI5iFzFMS"
- },
- {
- "from": "z3-Iw-kaOH",
- "to": "IEc8KwEhvK"
- },
- {
- "from": "AKbiPAtB8t",
- "to": "UVDHhIKihX"
- },
- {
- "from": "C1DIYbdOhv",
- "to": "6S19cFPyNd"
- },
- {
- "from": "LI2D3VNWB6",
- "to": "TPkxQ4HKOE"
- },
- {
- "from": "Rw4MA6Afzc",
- "to": "iTcEE2Mgzd"
- },
- {
- "from": "yxflB92whn",
- "to": "mfesEa2D7N"
- }
- ],
- "nodes": [
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "2tLAEBGjmRCu1KrdJn9T2Z",
- "attributeName": "spacesOccupied"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "EXZ-b6ute",
- "id": "5D-B3ktG0G"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -749.5,
- "y": -501.5
- },
- "size": {
- "x": 136.234,
- "y": 65
- },
- "id": "EXZ-b6ute"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "1yuaW634x1LqumPTwGxvyg",
- "attributeName": "spacesOccupied"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "4K3EqIsY6",
- "id": "hsSgzfNE-E"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -748.5,
- "y": -348.5
- },
- "size": {
- "x": 121,
- "y": 65
- },
- "id": "4K3EqIsY6"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "3D49AxXerrIycM8gNd0zlK",
- "attributeName": "spacesOccupied"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "fsaLpxzdx",
- "id": "lasR8uUoUR"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -744.5,
- "y": -197.5
- },
- "size": {
- "x": 121,
- "y": 65
- },
- "id": "fsaLpxzdx"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "1yuaW634x1LqumPTwGxvyg",
- "attributeName": "spacesTotal"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "cUasODe-H",
- "id": "SOy3l0IR80"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -745.5,
- "y": 133.5
- },
- "size": {
- "x": 121,
- "y": 65
- },
- "id": "cUasODe-H"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "2tLAEBGjmRCu1KrdJn9T2Z",
- "attributeName": "spacesTotal"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "SNDES5qeX",
- "id": "cOmTxKOpO0"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -744.5,
- "y": -12.5
- },
- "size": {
- "x": 136.234,
- "y": 65
- },
- "id": "SNDES5qeX"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "3D49AxXerrIycM8gNd0zlK",
- "attributeName": "spacesTotal"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "qZnj0EbDZ",
- "id": "-GPWnMsaGi"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -749.5,
- "y": 278.5
- },
- "size": {
- "x": 121,
- "y": 65
- },
- "id": "qZnj0EbDZ"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "EN5SNd71j",
- "id": "vw097tfr81"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "EN5SNd71j",
- "id": "bQs4E9qCN2"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "EN5SNd71j",
- "id": "vCKMzAmLNx"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -446.5,
- "y": -387.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "EN5SNd71j"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "4PR4GPJ-N",
- "id": "hz9f6Q4ESn"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "4PR4GPJ-N",
- "id": "KqxwaOcGIP"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "4PR4GPJ-N",
- "id": "AKbiPAtB8t"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -328.5,
- "y": -251.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "4PR4GPJ-N"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "XoUjUmfs9",
- "id": "mJMXOPeGZd"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "XoUjUmfs9",
- "id": "vVdwGz2y8k"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "XoUjUmfs9",
- "id": "z3-Iw-kaOH"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -434.5,
- "y": 104.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "XoUjUmfs9"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "dlsfNuzaj",
- "id": "IEc8KwEhvK"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "dlsfNuzaj",
- "id": "OwI5iFzFMS"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "dlsfNuzaj",
- "id": "C1DIYbdOhv"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -301.5,
- "y": 194.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "dlsfNuzaj"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "INNVamTqd",
- "id": "UVDHhIKihX"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "INNVamTqd",
- "id": "6S19cFPyNd"
- }
- ],
- "internals": [],
- "name": "DIVIDE_OPERATOR",
- "displayCharacter": "÷",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "INNVamTqd",
- "id": "LI2D3VNWB6"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -141.5,
- "y": -113.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "INNVamTqd"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "WsFkoOv-R",
- "id": "TPkxQ4HKOE"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "WsFkoOv-R",
- "id": "iTcEE2Mgzd"
- }
- ],
- "internals": [],
- "name": "MULTIPLY_OPERATOR",
- "displayCharacter": "×",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "WsFkoOv-R",
- "id": "yxflB92whn"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": 136.5,
- "y": -51.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "WsFkoOv-R"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "value",
- "picker": {
- "type": "NUMBER"
- },
- "value": 100
- }
- ],
- "name": "NUMBER_INPUT",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "_H7TZoQqw",
- "id": "Rw4MA6Afzc"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -149.734375,
- "y": 50.5
- },
- "size": {
- "x": 148,
- "y": 17
- },
- "id": "_H7TZoQqw"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "jeli6TQY1",
- "id": "mfesEa2D7N"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "7UUzmvnTuLdjVpTb8MnjSX",
- "attributeName": "totalOccupancy"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": 281.9921875,
- "y": -98.5
- },
- "size": {
- "x": 263,
- "y": 65
- },
- "id": "jeli6TQY1"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/RotterdamBatteryUse.json b/deployment/src/main/resources/demo/rules/smartcity/RotterdamBatteryUse.json
deleted file mode 100644
index 878497ca8..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/RotterdamBatteryUse.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "rules": [
- {
- "recurrence": {
- "mins": 0
- },
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "BuildingAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "powerBalance"
- },
- "value": {
- "predicateType": "number",
- "operator": "LESS_THAN",
- "value": -25
- }
- }
- ]
- },
- "ids": [
- "2wzKB2j39144oTzAJnHpfs"
- ]
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "6bzhox7vxOKpKQ5yX5Ysoh"
- ],
- "types": [
- "ElectricityBatteryAsset"
- ]
- }
- },
- "value": 25,
- "attributeName": "powerSetpoint"
- }
- ],
- "name": "De Rotterdam: Battery use"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/RotterdamPowerBalance.flow b/deployment/src/main/resources/demo/rules/smartcity/RotterdamPowerBalance.flow
deleted file mode 100644
index 367a11964..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/RotterdamPowerBalance.flow
+++ /dev/null
@@ -1,167 +0,0 @@
-{
-"name": "De Rotterdam: Power balance",
-"description": "",
- "connections": [
- {
- "from": "mtdBqMHEXV",
- "to": "HdQFYHsvcv"
- },
- {
- "from": "LvwzHkg9-A",
- "to": "q-nDnOD6dF"
- },
- {
- "from": "NsjVJrTtFW",
- "to": "Ni1QTWS6Cr"
- }
- ],
- "nodes": [
- {
- "inputs": [
-
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "6DW7WWYVtOybr7W1BWREc3",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "sroPWsTkE",
- "id": "LvwzHkg9-A"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -689.5,
- "y": -341.5
- },
- "size": {
- "x": 193.766,
- "y": 65
- },
- "id": "sroPWsTkE"
- },
- {
- "inputs": [
-
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "3Mj9yiC6bcH4MoIYDY2T35",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "f4jr9m-j7",
- "id": "mtdBqMHEXV"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -687.5,
- "y": -165.5
- },
- "size": {
- "x": 256.844,
- "y": 65
- },
- "id": "f4jr9m-j7"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "pR1MxgR1S",
- "id": "Ni1QTWS6Cr"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "2wzKB2j39144oTzAJnHpfs",
- "attributeName": "powerBalance"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [
-
- ],
- "type": "OUTPUT",
- "position": {
- "x": 25.9921875,
- "y": -245.5
- },
- "size": {
- "x": 139.453,
- "y": 65
- },
- "id": "pR1MxgR1S"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "WdW_DByTa",
- "id": "q-nDnOD6dF"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "WdW_DByTa",
- "id": "HdQFYHsvcv"
- }
- ],
- "internals": [
-
- ],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "WdW_DByTa",
- "id": "NsjVJrTtFW"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -187.5,
- "y": -197.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "WdW_DByTa"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/StationCrowded.json b/deployment/src/main/resources/demo/rules/smartcity/StationCrowded.json
deleted file mode 100644
index 0f0293576..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/StationCrowded.json
+++ /dev/null
@@ -1,150 +0,0 @@
-{
- "rules": [
- {
- "recurrence": {
- "mins": 0
- },
- "when": {
- "operator": "OR",
- "groups": [
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "MicrophoneAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "soundLevel"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_THAN",
- "value": 60
- }
- }
- ]
- },
- "ids": [
- "2bdD9xZlveIOabucPi9Iur"
- ]
- }
- }
- ]
- },
- {
- "operator": "AND",
- "items": [
- {
- "assets": {
- "types": [
- "MicrophoneAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "soundLevel"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_THAN",
- "value": 60
- }
- }
- ]
- },
- "ids": [
- "5WKcxVxZqFq1GYd9b2YVGD"
- ]
- }
- },
- {
- "assets": {
- "types": [
- "PeopleCounterAsset"
- ],
- "attributes": {
- "items": [
- {
- "name": {
- "predicateType": "string",
- "match": "EXACT",
- "value": "countGrowthMinute"
- },
- "value": {
- "predicateType": "number",
- "operator": "GREATER_THAN",
- "value": 2
- }
- }
- ]
- },
- "ids": [
- "4vD8XpKSR6iieaSLJ35nKl"
- ]
- }
- }
- ]
- }
- ]
- },
- "then": [
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "2JA9oLQDHY0pjVHnGJMS35"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 60,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "3BSvaTREZX2MLjuE8bkM16"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 75,
- "attributeName": "brightness"
- },
- {
- "action": "write-attribute",
- "target": {
- "assets": {
- "ids": [
- "2motXSzult66RsYrImPTdf"
- ],
- "types": [
- "LightAsset"
- ]
- }
- },
- "value": 70,
- "attributeName": "brightness"
- }
- ],
- "name": "Station: Crowded square"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/TotalPowerConsumption.flow b/deployment/src/main/resources/demo/rules/smartcity/TotalPowerConsumption.flow
deleted file mode 100644
index 332a9bfd5..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/TotalPowerConsumption.flow
+++ /dev/null
@@ -1,317 +0,0 @@
-{
- "name": "Total power consumption",
- "description": null,
- "connections": [
- {
- "from": "k7xzWpPmOU",
- "to": "mOv6cwMsN6"
- },
- {
- "from": "0GKNcY239I",
- "to": "TlmXpsOXUQ"
- },
- {
- "from": "h9ZwYflt4Z",
- "to": "rDjJ1NRPSV"
- },
- {
- "from": "lzZfpdD4S0",
- "to": "N2_UIZs3xI"
- },
- {
- "from": "quH3sV5fSp",
- "to": "Rsco32_whA"
- },
- {
- "from": "cTWyTa7iqz",
- "to": "DZdxsbYtlW"
- },
- {
- "from": "74xUsnTGZY",
- "to": "kW3nIIzmKM"
- }
- ],
- "nodes": [
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "3Mj9yiC6bcH4MoIYDY2T35",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "b_5QIrcpn",
- "id": "k7xzWpPmOU"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -855.0078125,
- "y": -453.5
- },
- "size": {
- "x": 257.781,
- "y": 65
- },
- "id": "b_5QIrcpn"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "4jBtdIZOtA7pLxPNSwWCVa",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "5zCZbiVkM",
- "id": "0GKNcY239I"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -858.0078125,
- "y": -301.5
- },
- "size": {
- "x": 243.969,
- "y": 65
- },
- "id": "5zCZbiVkM"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "6L8hVlM1fQ4dDHFM6HYA6O",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "TQ9PC2hLm",
- "id": "h9ZwYflt4Z"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -861.0078125,
- "y": -151.5
- },
- "size": {
- "x": 217.031,
- "y": 65
- },
- "id": "TQ9PC2hLm"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "4oio0T4DX9lxeBsZVNIpEN",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "EA8rltWHy",
- "id": "lzZfpdD4S0"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -865.0078125,
- "y": 2.5
- },
- "size": {
- "x": 216.141,
- "y": 65
- },
- "id": "EA8rltWHy"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "VTzqeMTRY",
- "id": "mOv6cwMsN6"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "VTzqeMTRY",
- "id": "TlmXpsOXUQ"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "VTzqeMTRY",
- "id": "quH3sV5fSp"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -336.5,
- "y": -327.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "VTzqeMTRY"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "zy-tW7hST",
- "id": "rDjJ1NRPSV"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "zy-tW7hST",
- "id": "N2_UIZs3xI"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "zy-tW7hST",
- "id": "cTWyTa7iqz"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -362.5,
- "y": -31.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "zy-tW7hST"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "4_h4BFrUr",
- "id": "Rsco32_whA"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "4_h4BFrUr",
- "id": "DZdxsbYtlW"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "4_h4BFrUr",
- "id": "74xUsnTGZY"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -167.5,
- "y": -186.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "4_h4BFrUr"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "3CV-fcqbr",
- "id": "kW3nIIzmKM"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "44ORIhkDVAlT97dYGUD9n5",
- "attributeName": "powerTotalConsumers"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": 25.9921875,
- "y": -232.5
- },
- "size": {
- "x": 247,
- "y": 65
- },
- "id": "3CV-fcqbr"
- }
- ]
-}
diff --git a/deployment/src/main/resources/demo/rules/smartcity/TotalSolarProduction.flow b/deployment/src/main/resources/demo/rules/smartcity/TotalSolarProduction.flow
deleted file mode 100644
index 8d1effe71..000000000
--- a/deployment/src/main/resources/demo/rules/smartcity/TotalSolarProduction.flow
+++ /dev/null
@@ -1,317 +0,0 @@
-{
- "name": "Total power production",
- "description": null,
- "connections": [
- {
- "from": "C-QaWZEeBs",
- "to": "dxvU9Xz2IM"
- },
- {
- "from": "mNS9-GZPMK",
- "to": "VIEnlWRV_a"
- },
- {
- "from": "nYeDEdHMK3",
- "to": "r0o8xVQT3N"
- },
- {
- "from": "oCML5aGaOI",
- "to": "bONtkmO85l"
- },
- {
- "from": "IV-unZRsFH",
- "to": "PJIlVVDNQw"
- },
- {
- "from": "UCNOY-HrzI",
- "to": "zW2K73tjyv"
- },
- {
- "from": "lEI0uY0L1o",
- "to": "2zo6HaMm88"
- }
- ],
- "nodes": [
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "6DW7WWYVtOybr7W1BWREc3",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "CynzKmqQe",
- "id": "C-QaWZEeBs"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -753.0078125,
- "y": -514.5
- },
- "size": {
- "x": 194.563,
- "y": 65
- },
- "id": "CynzKmqQe"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "4Fnz8pxxdtDobuDGWYwRNp",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "NEAaAZEMD",
- "id": "mNS9-GZPMK"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -751.0078125,
- "y": -353.5
- },
- "size": {
- "x": 161.578,
- "y": 65
- },
- "id": "NEAaAZEMD"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "2RIt5xuSj1BSyaRhwU3z3I",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "DlwsVTeKD",
- "id": "nYeDEdHMK3"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -754.5,
- "y": -188.5
- },
- "size": {
- "x": 153.828,
- "y": 65
- },
- "id": "DlwsVTeKD"
- },
- {
- "inputs": [],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "5xgMdcrVWORYWpUKuP2Mo0",
- "attributeName": "power"
- }
- }
- ],
- "name": "READ_ATTRIBUTE",
- "outputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "0_2NG2WHi",
- "id": "oCML5aGaOI"
- }
- ],
- "type": "INPUT",
- "position": {
- "x": -749.5,
- "y": -32.5
- },
- "size": {
- "x": 152.922,
- "y": 65
- },
- "id": "0_2NG2WHi"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "-Citw31Em",
- "id": "dxvU9Xz2IM"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "-Citw31Em",
- "id": "VIEnlWRV_a"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "-Citw31Em",
- "id": "UCNOY-HrzI"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -339.5,
- "y": -348.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "-Citw31Em"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "2O2rRgaWI",
- "id": "r0o8xVQT3N"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "2O2rRgaWI",
- "id": "bONtkmO85l"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "2O2rRgaWI",
- "id": "IV-unZRsFH"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -344.5,
- "y": -94.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "2O2rRgaWI"
- },
- {
- "inputs": [
- {
- "name": "a",
- "type": "NUMBER",
- "nodeId": "Gvoh2qclw",
- "id": "zW2K73tjyv"
- },
- {
- "name": "b",
- "type": "NUMBER",
- "nodeId": "Gvoh2qclw",
- "id": "PJIlVVDNQw"
- }
- ],
- "internals": [],
- "name": "ADD_OPERATOR",
- "displayCharacter": "+",
- "outputs": [
- {
- "name": "c",
- "type": "NUMBER",
- "nodeId": "Gvoh2qclw",
- "id": "lEI0uY0L1o"
- }
- ],
- "type": "PROCESSOR",
- "position": {
- "x": -179.5,
- "y": -215.5
- },
- "size": {
- "x": 0,
- "y": 0
- },
- "id": "Gvoh2qclw"
- },
- {
- "inputs": [
- {
- "name": "value",
- "type": "NUMBER",
- "nodeId": "XVFP1kzlH",
- "id": "2zo6HaMm88"
- }
- ],
- "internals": [
- {
- "name": "Attribute",
- "picker": {
- "type": "ASSET_ATTRIBUTE"
- },
- "value": {
- "assetId": "44ORIhkDVAlT97dYGUD9n5",
- "attributeName": "powerTotalProducers"
- }
- }
- ],
- "name": "WRITE_ATTRIBUTE",
- "outputs": [],
- "type": "OUTPUT",
- "position": {
- "x": -14.5,
- "y": -262.5
- },
- "size": {
- "x": 247,
- "y": 65
- },
- "id": "XVFP1kzlH"
- }
- ]
-}