Changes
On March 22, 2024 at 6:06:15 PM +0200, hylli:
-
Added resource SwitchingGroup entity example to Tampere Viinikka smart street light pilot
f | 1 | { | f | 1 | { |
2 | "author": "", | 2 | "author": "", | ||
3 | "author_email": "", | 3 | "author_email": "", | ||
4 | "creator_user_id": "c028eea2-1878-47b8-843b-aa298066c249", | 4 | "creator_user_id": "c028eea2-1878-47b8-843b-aa298066c249", | ||
5 | "data_owner": "Tampere", | 5 | "data_owner": "Tampere", | ||
6 | "groups": [ | 6 | "groups": [ | ||
7 | { | 7 | { | ||
8 | "description": "This group collects together data related to the | 8 | "description": "This group collects together data related to the | ||
9 | city of Tampere.", | 9 | city of Tampere.", | ||
10 | "display_name": "Tampere", | 10 | "display_name": "Tampere", | ||
11 | "id": "07adac22-b527-4417-82b9-41c7c24e6f4c", | 11 | "id": "07adac22-b527-4417-82b9-41c7c24e6f4c", | ||
12 | "image_display_url": "", | 12 | "image_display_url": "", | ||
13 | "name": "tampere", | 13 | "name": "tampere", | ||
14 | "title": "Tampere" | 14 | "title": "Tampere" | ||
15 | } | 15 | } | ||
16 | ], | 16 | ], | ||
17 | "id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | 17 | "id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | ||
18 | "isopen": false, | 18 | "isopen": false, | ||
19 | "license_id": "internal", | 19 | "license_id": "internal", | ||
20 | "license_title": "For internal research and education use", | 20 | "license_title": "For internal research and education use", | ||
21 | "maintainer": "Ville Heikkil\u00e4", | 21 | "maintainer": "Ville Heikkil\u00e4", | ||
22 | "maintainer_email": "ville.heikkila@tuni.fi", | 22 | "maintainer_email": "ville.heikkila@tuni.fi", | ||
23 | "metadata_created": "2022-12-20T10:13:33.153585", | 23 | "metadata_created": "2022-12-20T10:13:33.153585", | ||
n | 24 | "metadata_modified": "2024-03-22T16:05:35.088501", | n | 24 | "metadata_modified": "2024-03-22T16:06:15.758235", |
25 | "name": "tampere-viinikka-smart-street-light-pilot", | 25 | "name": "tampere-viinikka-smart-street-light-pilot", | ||
26 | "notes": "Data collected from a smart streetlight pilot in Tampere. | 26 | "notes": "Data collected from a smart streetlight pilot in Tampere. | ||
27 | About 400 smart\r\nstreetlights were piloted in the Viinikka area | 27 | About 400 smart\r\nstreetlights were piloted in the Viinikka area | ||
28 | between 2019 and 2022. each\r\nindividual streetlight provided data | 28 | between 2019 and 2022. each\r\nindividual streetlight provided data | ||
29 | such as electrical measurments, illuminance\r\nlevel and pole angle. | 29 | such as electrical measurments, illuminance\r\nlevel and pole angle. | ||
30 | These streetlights could also then be controlled\r\nindividually. See | 30 | These streetlights could also then be controlled\r\nindividually. See | ||
31 | \r\n[CityIoT](https://ckan.energydata.rd.tuni.fi/organization/cityiot) | 31 | \r\n[CityIoT](https://ckan.energydata.rd.tuni.fi/organization/cityiot) | ||
32 | project for\r\ngeneral information about how the measurements are | 32 | project for\r\ngeneral information about how the measurements are | ||
33 | stored and can be used.\r\n\r\n## Data model\r\n\r\nThe data model | 33 | stored and can be used.\r\n\r\n## Data model\r\n\r\nThe data model | ||
34 | uses entity types from the official FIWARE | 34 | uses entity types from the official FIWARE | ||
35 | amodels.readthedocs.io/en/latest/StreetLighting/doc/introduction.html) | 35 | amodels.readthedocs.io/en/latest/StreetLighting/doc/introduction.html) | ||
36 | data\r\nmodel with some modifications and also custom entity types. | 36 | data\r\nmodel with some modifications and also custom entity types. | ||
37 | The used entity\r\ntypes are the following.\r\n\r\n- | 37 | The used entity\r\ntypes are the following.\r\n\r\n- | ||
38 | eadthedocs.io/en/latest/StreetLighting/Streetlight/doc/spec.html):\r\n | 38 | eadthedocs.io/en/latest/StreetLighting/Streetlight/doc/spec.html):\r\n | ||
39 | Used to represent the individual streetlights. Some new attributes | 39 | Used to represent the individual streetlights. Some new attributes | ||
40 | were added\r\n for example voltage, intensity, activePower, and | 40 | were added\r\n for example voltage, intensity, activePower, and | ||
41 | poleAngleDrift.\r\n- | 41 | poleAngleDrift.\r\n- | ||
42 | en/latest/StreetLighting/StreetlightControlCabinet/doc/spec.html):\r\n | 42 | en/latest/StreetLighting/StreetlightControlCabinet/doc/spec.html):\r\n | ||
43 | Represents streetlight control cabinets which control a group of | 43 | Represents streetlight control cabinets which control a group of | ||
44 | individual streetlights.\r\n- AmbientLightSensor: Custom entity type | 44 | individual streetlights.\r\n- AmbientLightSensor: Custom entity type | ||
45 | for representing light sensors that are\r\n related to | 45 | for representing light sensors that are\r\n related to | ||
46 | SwitchingGroups.\r\n- SwitchingGroup: Represents all the 400 | 46 | SwitchingGroups.\r\n- SwitchingGroup: Represents all the 400 | ||
47 | streetlights and 6 streetlight control\r\n cabinets.Contains for | 47 | streetlights and 6 streetlight control\r\n cabinets.Contains for | ||
48 | example the common configuration for the group.\r\n\r\n## Notes about | 48 | example the common configuration for the group.\r\n\r\n## Notes about | ||
49 | the data\r\n\r\n- This data was originally collected into a different | 49 | the data\r\n\r\n- This data was originally collected into a different | ||
50 | FIWARE platform operated\r\n by the company who implemented the | 50 | FIWARE platform operated\r\n by the company who implemented the | ||
51 | pilot. Using the subscription system of the\r\n Orion context broker, | 51 | pilot. Using the subscription system of the\r\n Orion context broker, | ||
52 | it was then transfered also to the Tampere University\r\n FIWARE | 52 | it was then transfered also to the Tampere University\r\n FIWARE | ||
53 | platform.\r\n- The data contains some initial test entities that have | 53 | platform.\r\n- The data contains some initial test entities that have | ||
54 | no data or only little\r\n data from beginning of 2019. These | 54 | no data or only little\r\n data from beginning of 2019. These | ||
55 | entities were replaced with different ones\r\n later. So for example | 55 | entities were replaced with different ones\r\n later. So for example | ||
56 | although there are 400 streetlights, there are 984\r\n Streetlight | 56 | although there are 400 streetlights, there are 984\r\n Streetlight | ||
57 | entities used to represent them during various phases of the\r\n | 57 | entities used to represent them during various phases of the\r\n | ||
58 | pilot.\r\n- The Switchinggroup entity with id GroupAllOLC has | 58 | pilot.\r\n- The Switchinggroup entity with id GroupAllOLC has | ||
59 | references to the\r\n Streetlight and streetlightControlCabinet | 59 | references to the\r\n Streetlight and streetlightControlCabinet | ||
60 | entities that were in use at\r\n least from 2020-05-11 until the end | 60 | entities that were in use at\r\n least from 2020-05-11 until the end | ||
61 | of the pilot.\r\n- Many entities that were in use until the end of the | 61 | of the pilot.\r\n- Many entities that were in use until the end of the | ||
62 | pilot were created on\r\n 2019-05-17.\r\n- The time interval varies | 62 | pilot were created on\r\n 2019-05-17.\r\n- The time interval varies | ||
63 | for the different attributes. For example it is about\r\n 1.5 minutes | 63 | for the different attributes. For example it is about\r\n 1.5 minutes | ||
64 | for poleAngleDrift of Streetlight entities and energyConsumed of\r\n | 64 | for poleAngleDrift of Streetlight entities and energyConsumed of\r\n | ||
65 | StreetlightControlCabinet entities. It is about 15 minutes for\r\n | 65 | StreetlightControlCabinet entities. It is about 15 minutes for\r\n | ||
66 | illuminanceLevel and powerState of Streetlight entities. It is about | 66 | illuminanceLevel and powerState of Streetlight entities. It is about | ||
67 | one hour\r\n for intensity, voltage and activePower of streetlight | 67 | one hour\r\n for intensity, voltage and activePower of streetlight | ||
68 | entities.\r\n- The Streetlight entities have references to | 68 | entities.\r\n- The Streetlight entities have references to | ||
69 | StreetligthGroup entities but\r\n these entities do not | 69 | StreetligthGroup entities but\r\n these entities do not | ||
70 | exist.\r\n\r\n## Accessing the data\r\n\r\nThe data is stored in the | 70 | exist.\r\n\r\n## Accessing the data\r\n\r\nThe data is stored in the | ||
71 | Tampere University CityIoT platform. The used FIWARR\r\nservice is | 71 | Tampere University CityIoT platform. The used FIWARR\r\nservice is | ||
72 | streetlight and all entities there are under the service | 72 | streetlight and all entities there are under the service | ||
73 | path\r\n/Tampere/viinikka.\r\n\r\n### Examples\r\n\r\nGet the most | 73 | path\r\n/Tampere/viinikka.\r\n\r\n### Examples\r\n\r\nGet the most | ||
74 | recent data about control cabinet KV-0131\r\n\r\n curl -X GET | 74 | recent data about control cabinet KV-0131\r\n\r\n curl -X GET | ||
75 | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities/KV-0131\" --header | 75 | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities/KV-0131\" --header | ||
76 | \"Fiware-Service: streetlight\" --header \"Fiware-Servicepath: | 76 | \"Fiware-Service: streetlight\" --header \"Fiware-Servicepath: | ||
77 | /Tampere/viinikka\" --header \"apikey: your_apikey\"\r\n\r\nfind out | 77 | /Tampere/viinikka\" --header \"apikey: your_apikey\"\r\n\r\nfind out | ||
78 | the streetlight entity ids which has KV-0131 as a controller | 78 | the streetlight entity ids which has KV-0131 as a controller | ||
79 | cabinet:\r\n\r\n curl -X GET | 79 | cabinet:\r\n\r\n curl -X GET | ||
80 | 00&type=Streetlight&q=refStreetlightControlCabinet~=KV-0131&attrs=id\" | 80 | 00&type=Streetlight&q=refStreetlightControlCabinet~=KV-0131&attrs=id\" | ||
81 | --header \"Fiware-Service: streetlight\" --header | 81 | --header \"Fiware-Service: streetlight\" --header | ||
82 | \"Fiware-Servicepath: /Tampere/viinikka\" --header \"apikey: | 82 | \"Fiware-Servicepath: /Tampere/viinikka\" --header \"apikey: | ||
83 | your_apikey\"\r\n\r\nGet activePower measurements for Streetlight | 83 | your_apikey\"\r\n\r\nGet activePower measurements for Streetlight | ||
84 | KV-0121-318 on 21st of May 2019.\r\n\r\n curl -X GET | 84 | KV-0121-318 on 21st of May 2019.\r\n\r\n curl -X GET | ||
85 | ctivePower?fromDate=2019-05-21T00:00:00Z&toDate=2019-05-21T23:59:59Z\" | 85 | ctivePower?fromDate=2019-05-21T00:00:00Z&toDate=2019-05-21T23:59:59Z\" | ||
86 | --header \"Fiware-Service: streetlight\" --header | 86 | --header \"Fiware-Service: streetlight\" --header | ||
87 | \"Fiware-Servicepath: /Tampere/viinikka\" --header \"apikey: | 87 | \"Fiware-Servicepath: /Tampere/viinikka\" --header \"apikey: | ||
88 | your_apikey\"\r\n", | 88 | your_apikey\"\r\n", | ||
n | 89 | "num_resources": 3, | n | 89 | "num_resources": 4, |
90 | "num_tags": 3, | 90 | "num_tags": 3, | ||
91 | "organization": { | 91 | "organization": { | ||
92 | "approval_status": "approved", | 92 | "approval_status": "approved", | ||
93 | "created": "2022-10-17T09:15:18.177419", | 93 | "created": "2022-10-17T09:15:18.177419", | ||
94 | "description": "The [CityIoT project](https://www.cityiot.fi/) | 94 | "description": "The [CityIoT project](https://www.cityiot.fi/) | ||
95 | collected smart city related data\r\nin Tampere about street lights, | 95 | collected smart city related data\r\nin Tampere about street lights, | ||
96 | electric buses and bus passenger analytics. This\r\ndata is stored in | 96 | electric buses and bus passenger analytics. This\r\ndata is stored in | ||
97 | a [FIWARE](https://www.fiware.org/) based platform. FIWARE is\r\na | 97 | a [FIWARE](https://www.fiware.org/) based platform. FIWARE is\r\na | ||
98 | collection of standards and components for creating smart solutions. | 98 | collection of standards and components for creating smart solutions. | ||
99 | The\r\nplatform is available at the URL | 99 | The\r\nplatform is available at the URL | ||
100 | https://tlt-cityiot.rd.tuni.fi/. The data is\r\navailable via the HTTP | 100 | https://tlt-cityiot.rd.tuni.fi/. The data is\r\navailable via the HTTP | ||
101 | based APIs offered by the platform. To access any of the\r\ndata sets | 101 | based APIs offered by the platform. To access any of the\r\ndata sets | ||
102 | an API key is required. If you are interested in using any of | 102 | an API key is required. If you are interested in using any of | ||
103 | the\r\nCityIoT data sets, contact the person marked as the maintainer | 103 | the\r\nCityIoT data sets, contact the person marked as the maintainer | ||
104 | of the data set. \r\n\r\nIn order to get the data and make use of it | 104 | of the data set. \r\n\r\nIn order to get the data and make use of it | ||
105 | some understanding is required about\r\nthe following 3 aspects of the | 105 | some understanding is required about\r\nthe following 3 aspects of the | ||
106 | CityIoT platform:\r\n\r\n1. The [NGSI v2 | 106 | CityIoT platform:\r\n\r\n1. The [NGSI v2 | ||
107 | pecification](https://fiware.github.io/specifications/ngsiv2/stable/): | 107 | pecification](https://fiware.github.io/specifications/ngsiv2/stable/): | ||
108 | defines the API used by the main FIWARE component\r\nthe Orion context | 108 | defines the API used by the main FIWARE component\r\nthe Orion context | ||
109 | broker and also the entity based data model used by all | 109 | broker and also the entity based data model used by all | ||
110 | FIWARE\r\ncomponents.\r\n2. The [Orion context | 110 | FIWARE\r\ncomponents.\r\n2. The [Orion context | ||
111 | broker](https://fiware-orion.readthedocs.io/en/master/): Has the most | 111 | broker](https://fiware-orion.readthedocs.io/en/master/): Has the most | ||
112 | recent version of the data i.e. NGSI v2\r\nentities. This data can be | 112 | recent version of the data i.e. NGSI v2\r\nentities. This data can be | ||
113 | queried or subscribed to so that you get notified\r\nwhen the data | 113 | queried or subscribed to so that you get notified\r\nwhen the data | ||
114 | changes.\r\n3. | 114 | changes.\r\n3. | ||
115 | [QuantumLeap](https://quantumleap.readthedocs.io/en/latest/): Stores | 115 | [QuantumLeap](https://quantumleap.readthedocs.io/en/latest/): Stores | ||
116 | NGSI v2 entity data into a timeseries data base. It allows\r\nthen the | 116 | NGSI v2 entity data into a timeseries data base. It allows\r\nthen the | ||
117 | querying of this historic data via an HTTP API.\r\n\r\nSo in short, | 117 | querying of this historic data via an HTTP API.\r\n\r\nSo in short, | ||
118 | understand the NGSI v2 data model so you know what kind of | 118 | understand the NGSI v2 data model so you know what kind of | ||
119 | data\r\nstructures you are dealing with. Use Orion if you want a | 119 | data\r\nstructures you are dealing with. Use Orion if you want a | ||
120 | programmatic way to\r\nlist all available data entities, query their | 120 | programmatic way to\r\nlist all available data entities, query their | ||
121 | current state or subscribe to\r\nchanges in their state. Use | 121 | current state or subscribe to\r\nchanges in their state. Use | ||
122 | QuantumLeap if you want to explore how the entities\r\nhave changed | 122 | QuantumLeap if you want to explore how the entities\r\nhave changed | ||
123 | over time.\r\n\r\n## The data model\r\n\r\nIn FIWARe NGSI v2 data is | 123 | over time.\r\n\r\n## The data model\r\n\r\nIn FIWARe NGSI v2 data is | ||
124 | modelled as context entities. Entities can represent\r\nlogical of | 124 | modelled as context entities. Entities can represent\r\nlogical of | ||
125 | physical things such as a sensor, a person or a weather | 125 | physical things such as a sensor, a person or a weather | ||
126 | observation.\r\nEntities have a id and a type indicating what the | 126 | observation.\r\nEntities have a id and a type indicating what the | ||
127 | entity represents. Entities\r\nthen can have various attributes | 127 | entity represents. Entities\r\nthen can have various attributes | ||
128 | providing information about them. The entity\r\ntype determines what | 128 | providing information about them. The entity\r\ntype determines what | ||
129 | attributes an entity should have. This way domain specific\r\ndata | 129 | attributes an entity should have. This way domain specific\r\ndata | ||
130 | models can be created by defining the needed entity types and | 130 | models can be created by defining the needed entity types and | ||
131 | their\r\nattributes. For example weather observation could have | 131 | their\r\nattributes. For example weather observation could have | ||
132 | attributes for\r\ntemperature, humidity and the location for the | 132 | attributes for\r\ntemperature, humidity and the location for the | ||
133 | observation. An attribute has a\r\nname and a value including data | 133 | observation. An attribute has a\r\nname and a value including data | ||
134 | type for the value. An attribute can also have\r\nmetadata such as | 134 | type for the value. An attribute can also have\r\nmetadata such as | ||
135 | timestamp for when the value was acquired or what is | 135 | timestamp for when the value was acquired or what is | ||
136 | the\r\nmeasurement accuracy for the value. The documentation for each | 136 | the\r\nmeasurement accuracy for the value. The documentation for each | ||
137 | CityIoT data set\r\nexplains what entity types the data consists of | 137 | CityIoT data set\r\nexplains what entity types the data consists of | ||
138 | and what attributes the entities have.\r\n\r\nThe entities are | 138 | and what attributes the entities have.\r\n\r\nThe entities are | ||
139 | represented as JSON. For example an entity representing an\r\nelectric | 139 | represented as JSON. For example an entity representing an\r\nelectric | ||
140 | bus from one of the CityIoT data sets looks like this with only part | 140 | bus from one of the CityIoT data sets looks like this with only part | ||
141 | of\r\nthe attributes included:\r\n\r\n {\r\n \"id\": | 141 | of\r\nthe attributes included:\r\n\r\n {\r\n \"id\": | ||
142 | \"Vehicle:TKL16\",\r\n \"type\": \"Vehicle\",\r\n | 142 | \"Vehicle:TKL16\",\r\n \"type\": \"Vehicle\",\r\n | ||
143 | \"vehicleType\": {\r\n \"value\": \"bus\"\r\n },\r\n | 143 | \"vehicleType\": {\r\n \"value\": \"bus\"\r\n },\r\n | ||
144 | \"name\": {\r\n \"value\": \"TKL16\"\r\n },\r\n | 144 | \"name\": {\r\n \"value\": \"TKL16\"\r\n },\r\n | ||
145 | \"location\": {\r\n \"type\": \"geo:json\",\r\n | 145 | \"location\": {\r\n \"type\": \"geo:json\",\r\n | ||
146 | \"value\": {\r\n \"type\": \"Point\",\r\n | 146 | \"value\": {\r\n \"type\": \"Point\",\r\n | ||
147 | \"coordinates\": [23.769203333333333, 61.49531666666667]\r\n | 147 | \"coordinates\": [23.769203333333333, 61.49531666666667]\r\n | ||
148 | },\r\n \"metadata\": {\r\n \"timestamp\": | 148 | },\r\n \"metadata\": {\r\n \"timestamp\": | ||
149 | {\r\n \"type\": \"DateTime\",\r\n | 149 | {\r\n \"type\": \"DateTime\",\r\n | ||
150 | \"value\": \"2019-04-03T14:52:18.192881Z\"\r\n }\r\n | 150 | \"value\": \"2019-04-03T14:52:18.192881Z\"\r\n }\r\n | ||
151 | }\r\n },\r\n \"speed\": {\r\n \"value\": | 151 | }\r\n },\r\n \"speed\": {\r\n \"value\": | ||
152 | 34.5,\r\n \"metadata\": {\r\n \"timestamp\": | 152 | 34.5,\r\n \"metadata\": {\r\n \"timestamp\": | ||
153 | {\r\n \"type\": \"DateTime\",\r\n | 153 | {\r\n \"type\": \"DateTime\",\r\n | ||
154 | \"value\": \"2019-04-03T14:52:19.867419Z\"\r\n }\r\n | 154 | \"value\": \"2019-04-03T14:52:19.867419Z\"\r\n }\r\n | ||
155 | }\r\n }, \r\n \"power\": {\r\n | 155 | }\r\n }, \r\n \"power\": {\r\n | ||
156 | \"value\": 75.70000000000027,\r\n \"metadata\": {\r\n | 156 | \"value\": 75.70000000000027,\r\n \"metadata\": {\r\n | ||
157 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | 157 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | ||
158 | \"value\": \"2019-04-03T14:52:20.218114Z\"\r\n }\r\n | 158 | \"value\": \"2019-04-03T14:52:20.218114Z\"\r\n }\r\n | ||
159 | }\r\n },\r\n \"chargeState\": {\r\n | 159 | }\r\n },\r\n \"chargeState\": {\r\n | ||
160 | \"value\": 87,\r\n \"metadata\": {\r\n | 160 | \"value\": 87,\r\n \"metadata\": {\r\n | ||
161 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | 161 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | ||
162 | \"value\": \"2019-04-03T14:52:16.938936Z\"\r\n }\r\n | 162 | \"value\": \"2019-04-03T14:52:16.938936Z\"\r\n }\r\n | ||
163 | }\r\n }\r\n }\r\n\r\n\r\n## The Orion context | 163 | }\r\n }\r\n }\r\n\r\n\r\n## The Orion context | ||
164 | broker\r\n\r\nThe Orion context broker stores the latest versions of | 164 | broker\r\n\r\nThe Orion context broker stores the latest versions of | ||
165 | all entities. Its API is\r\nused to query information about the | 165 | all entities. Its API is\r\nused to query information about the | ||
166 | entities or subscribe to changes in their\r\nattributes. The Tampere | 166 | entities or subscribe to changes in their\r\nattributes. The Tampere | ||
167 | CityIoT Orion API is available at the | 167 | CityIoT Orion API is available at the | ||
168 | URL\r\nhttps://tlt-cityiot.rd.tuni.fi/orion/\r\n\r\nTo separate the | 168 | URL\r\nhttps://tlt-cityiot.rd.tuni.fi/orion/\r\n\r\nTo separate the | ||
169 | entities of the different data sets, Orions multi tenancy\r\nfeature | 169 | entities of the different data sets, Orions multi tenancy\r\nfeature | ||
170 | is used. Data is separated into different services and under a | 170 | is used. Data is separated into different services and under a | ||
171 | service\r\nhierarchical service paths can be used for more | 171 | service\r\nhierarchical service paths can be used for more | ||
172 | fine-grained data organization.\r\nIn API calls the service and | 172 | fine-grained data organization.\r\nIn API calls the service and | ||
173 | service path are given in HTTP headers:\r\n`Fiware-Service` for the | 173 | service path are given in HTTP headers:\r\n`Fiware-Service` for the | ||
174 | service and `Fiware-ServicePath` for the service path. For\r\naccess | 174 | service and `Fiware-ServicePath` for the service path. For\r\naccess | ||
175 | control API keys are used. The API key is given in the `apikey` HTTP | 175 | control API keys are used. The API key is given in the `apikey` HTTP | ||
176 | header.\r\nDocumentation for each data set tells what service is used | 176 | header.\r\nDocumentation for each data set tells what service is used | ||
177 | and how service paths\r\nare used. You can get an API key by | 177 | and how service paths\r\nare used. You can get an API key by | ||
178 | requesting access to a data set from the\r\nmaintainer of the data | 178 | requesting access to a data set from the\r\nmaintainer of the data | ||
179 | set. As an example how all this works in practice, the\r\n[Tampere | 179 | set. As an example how all this works in practice, the\r\n[Tampere | ||
180 | electric | 180 | electric | ||
181 | ckan.energydata.rd.tuni.fi/dataset/tampere-electric-bus-pilot)\r\ndata | 181 | ckan.energydata.rd.tuni.fi/dataset/tampere-electric-bus-pilot)\r\ndata | ||
182 | set has entities representing electric buses in service | 182 | set has entities representing electric buses in service | ||
183 | public_transport\r\nunder the service path /Tampere/electric_bus. | 183 | public_transport\r\nunder the service path /Tampere/electric_bus. | ||
184 | Using the command line HTTP client\r\ncurl, this is how to get all the | 184 | Using the command line HTTP client\r\ncurl, this is how to get all the | ||
185 | electric bus entities and their attributes from\r\nOrion:\r\n\r\n | 185 | electric bus entities and their attributes from\r\nOrion:\r\n\r\n | ||
186 | curl -H 'Fiware-Service: public_transport' -H 'Fiware-ServicePath: | 186 | curl -H 'Fiware-Service: public_transport' -H 'Fiware-ServicePath: | ||
187 | /Tampere/electric_bus' -H 'apikey: your_apikey' | 187 | /Tampere/electric_bus' -H 'apikey: your_apikey' | ||
188 | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities\"\r\n\r\n## | 188 | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities\"\r\n\r\n## | ||
189 | QuantumLeap\r\n\r\nQuantumLeap stores the change history of the | 189 | QuantumLeap\r\n\r\nQuantumLeap stores the change history of the | ||
190 | entities in a timeseries database.\r\nThis can then be queried via its | 190 | entities in a timeseries database.\r\nThis can then be queried via its | ||
191 | API. The Tampere CityIoT QuantumLeap is\r\navailable at the URL: | 191 | API. The Tampere CityIoT QuantumLeap is\r\navailable at the URL: | ||
192 | https://tlt-cityiot.rd.tuni.fi/quantumleap/\r\n\r\nIt uses the same | 192 | https://tlt-cityiot.rd.tuni.fi/quantumleap/\r\n\r\nIt uses the same | ||
193 | service and service path\r\nsystem to organize entities as Orion. The | 193 | service and service path\r\nsystem to organize entities as Orion. The | ||
194 | same API key based authentication\r\nsystem is also used. See the | 194 | same API key based authentication\r\nsystem is also used. See the | ||
195 | Orion section for more details. For example to Get\r\nall values for | 195 | Orion section for more details. For example to Get\r\nall values for | ||
196 | power and speed for electric bus entity TKL15 between 14:01 and 14:02 | 196 | power and speed for electric bus entity TKL15 between 14:01 and 14:02 | ||
197 | on\r\n28th of October 2019 with curl the following command would be | 197 | on\r\n28th of October 2019 with curl the following command would be | ||
198 | used:\r\n\r\n curl -H 'Fiware-Service: public_transport' -H | 198 | used:\r\n\r\n curl -H 'Fiware-Service: public_transport' -H | ||
199 | 'Fiware-ServicePath: /Tampere/electric_bus' -H 'apikey: your_apikey' | 199 | 'Fiware-ServicePath: /Tampere/electric_bus' -H 'apikey: your_apikey' | ||
200 | ed,power&&fromDate=2019-10-28T12:01:00&&toDate=2019-10-28T12:02:00\"", | 200 | ed,power&&fromDate=2019-10-28T12:01:00&&toDate=2019-10-28T12:02:00\"", | ||
201 | "id": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | 201 | "id": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | ||
202 | "image_url": "", | 202 | "image_url": "", | ||
203 | "is_organization": true, | 203 | "is_organization": true, | ||
204 | "name": "cityiot", | 204 | "name": "cityiot", | ||
205 | "state": "active", | 205 | "state": "active", | ||
206 | "title": "CityIoT", | 206 | "title": "CityIoT", | ||
207 | "type": "organization" | 207 | "type": "organization" | ||
208 | }, | 208 | }, | ||
209 | "owner_org": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | 209 | "owner_org": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | ||
210 | "private": false, | 210 | "private": false, | ||
211 | "relationships_as_object": [], | 211 | "relationships_as_object": [], | ||
212 | "relationships_as_subject": [], | 212 | "relationships_as_subject": [], | ||
213 | "resources": [ | 213 | "resources": [ | ||
214 | { | 214 | { | ||
215 | "cache_last_updated": null, | 215 | "cache_last_updated": null, | ||
216 | "cache_url": null, | 216 | "cache_url": null, | ||
217 | "created": "2024-03-22T16:03:48.776474", | 217 | "created": "2024-03-22T16:03:48.776474", | ||
218 | "datastore_active": false, | 218 | "datastore_active": false, | ||
219 | "description": "An example AmbientLightSensor entity.", | 219 | "description": "An example AmbientLightSensor entity.", | ||
220 | "format": "JSON", | 220 | "format": "JSON", | ||
221 | "hash": "", | 221 | "hash": "", | ||
222 | "id": "1c901ac1-7944-4fad-9239-2425bf0f7f28", | 222 | "id": "1c901ac1-7944-4fad-9239-2425bf0f7f28", | ||
223 | "last_modified": "2024-03-22T16:03:48.748319", | 223 | "last_modified": "2024-03-22T16:03:48.748319", | ||
224 | "metadata_modified": "2024-03-22T16:04:48.682412", | 224 | "metadata_modified": "2024-03-22T16:04:48.682412", | ||
225 | "mimetype": "application/json", | 225 | "mimetype": "application/json", | ||
226 | "mimetype_inner": null, | 226 | "mimetype_inner": null, | ||
227 | "name": "AmbientLightSensor entity example", | 227 | "name": "AmbientLightSensor entity example", | ||
228 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | 228 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | ||
229 | "position": 0, | 229 | "position": 0, | ||
230 | "resource_type": null, | 230 | "resource_type": null, | ||
231 | "size": 3918, | 231 | "size": 3918, | ||
232 | "state": "active", | 232 | "state": "active", | ||
233 | "url": | 233 | "url": | ||
234 | 7944-4fad-9239-2425bf0f7f28/download/ambientlightsensor_example.json", | 234 | 7944-4fad-9239-2425bf0f7f28/download/ambientlightsensor_example.json", | ||
235 | "url_type": "upload" | 235 | "url_type": "upload" | ||
236 | }, | 236 | }, | ||
237 | { | 237 | { | ||
238 | "cache_last_updated": null, | 238 | "cache_last_updated": null, | ||
239 | "cache_url": null, | 239 | "cache_url": null, | ||
240 | "created": "2024-03-22T16:04:48.699730", | 240 | "created": "2024-03-22T16:04:48.699730", | ||
241 | "datastore_active": false, | 241 | "datastore_active": false, | ||
242 | "description": "An example Streetlight entity.", | 242 | "description": "An example Streetlight entity.", | ||
243 | "format": "JSON", | 243 | "format": "JSON", | ||
244 | "hash": "", | 244 | "hash": "", | ||
245 | "id": "d514005b-1809-4847-8dc4-77a88d802fc3", | 245 | "id": "d514005b-1809-4847-8dc4-77a88d802fc3", | ||
246 | "last_modified": "2024-03-22T16:04:48.666723", | 246 | "last_modified": "2024-03-22T16:04:48.666723", | ||
247 | "metadata_modified": "2024-03-22T16:05:35.094589", | 247 | "metadata_modified": "2024-03-22T16:05:35.094589", | ||
248 | "mimetype": "application/json", | 248 | "mimetype": "application/json", | ||
249 | "mimetype_inner": null, | 249 | "mimetype_inner": null, | ||
250 | "name": "Streetlight entity example", | 250 | "name": "Streetlight entity example", | ||
251 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | 251 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | ||
252 | "position": 1, | 252 | "position": 1, | ||
253 | "resource_type": null, | 253 | "resource_type": null, | ||
254 | "size": 9341, | 254 | "size": 9341, | ||
255 | "state": "active", | 255 | "state": "active", | ||
256 | "url": | 256 | "url": | ||
257 | 14005b-1809-4847-8dc4-77a88d802fc3/download/streetlight_example.json", | 257 | 14005b-1809-4847-8dc4-77a88d802fc3/download/streetlight_example.json", | ||
258 | "url_type": "upload" | 258 | "url_type": "upload" | ||
259 | }, | 259 | }, | ||
260 | { | 260 | { | ||
261 | "cache_last_updated": null, | 261 | "cache_last_updated": null, | ||
262 | "cache_url": null, | 262 | "cache_url": null, | ||
263 | "created": "2024-03-22T16:05:35.111155", | 263 | "created": "2024-03-22T16:05:35.111155", | ||
264 | "datastore_active": false, | 264 | "datastore_active": false, | ||
265 | "description": "An example StreetlightControlCabinet entity.", | 265 | "description": "An example StreetlightControlCabinet entity.", | ||
266 | "format": "JSON", | 266 | "format": "JSON", | ||
267 | "hash": "", | 267 | "hash": "", | ||
268 | "id": "c8786799-b4bf-4263-a372-103b667e8d44", | 268 | "id": "c8786799-b4bf-4263-a372-103b667e8d44", | ||
269 | "last_modified": "2024-03-22T16:05:35.079184", | 269 | "last_modified": "2024-03-22T16:05:35.079184", | ||
n | 270 | "metadata_modified": "2024-03-22T16:05:35.094827", | n | 270 | "metadata_modified": "2024-03-22T16:06:15.762952", |
271 | "mimetype": "application/json", | 271 | "mimetype": "application/json", | ||
272 | "mimetype_inner": null, | 272 | "mimetype_inner": null, | ||
273 | "name": "StreetlightControlCabinet entity example", | 273 | "name": "StreetlightControlCabinet entity example", | ||
274 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | 274 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | ||
275 | "position": 2, | 275 | "position": 2, | ||
276 | "resource_type": null, | 276 | "resource_type": null, | ||
277 | "size": 11357, | 277 | "size": 11357, | ||
278 | "state": "active", | 278 | "state": "active", | ||
279 | "url": | 279 | "url": | ||
280 | 63-a372-103b667e8d44/download/streetlightcontrolcabinet_example.json", | 280 | 63-a372-103b667e8d44/download/streetlightcontrolcabinet_example.json", | ||
t | t | 281 | "url_type": "upload" | ||
282 | }, | ||||
283 | { | ||||
284 | "cache_last_updated": null, | ||||
285 | "cache_url": null, | ||||
286 | "created": "2024-03-22T16:06:15.777608", | ||||
287 | "datastore_active": false, | ||||
288 | "description": "An example SwitchingGroup entity.", | ||||
289 | "format": "JSON", | ||||
290 | "hash": "", | ||||
291 | "id": "33438961-65f2-4df4-ba22-04c774207e5e", | ||||
292 | "last_modified": "2024-03-22T16:06:15.748706", | ||||
293 | "metadata_modified": "2024-03-22T16:06:15.763181", | ||||
294 | "mimetype": "application/json", | ||||
295 | "mimetype_inner": null, | ||||
296 | "name": "SwitchingGroup entity example", | ||||
297 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | ||||
298 | "position": 3, | ||||
299 | "resource_type": null, | ||||
300 | "size": 14637, | ||||
301 | "state": "active", | ||||
302 | "url": | ||||
303 | 961-65f2-4df4-ba22-04c774207e5e/download/switchinggroup_example.json", | ||||
281 | "url_type": "upload" | 304 | "url_type": "upload" | ||
282 | } | 305 | } | ||
283 | ], | 306 | ], | ||
284 | "state": "active", | 307 | "state": "active", | ||
285 | "tags": [ | 308 | "tags": [ | ||
286 | { | 309 | { | ||
287 | "display_name": "electricity", | 310 | "display_name": "electricity", | ||
288 | "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", | 311 | "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", | ||
289 | "name": "electricity", | 312 | "name": "electricity", | ||
290 | "state": "active", | 313 | "state": "active", | ||
291 | "vocabulary_id": null | 314 | "vocabulary_id": null | ||
292 | }, | 315 | }, | ||
293 | { | 316 | { | ||
294 | "display_name": "street light", | 317 | "display_name": "street light", | ||
295 | "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", | 318 | "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", | ||
296 | "name": "street light", | 319 | "name": "street light", | ||
297 | "state": "active", | 320 | "state": "active", | ||
298 | "vocabulary_id": null | 321 | "vocabulary_id": null | ||
299 | }, | 322 | }, | ||
300 | { | 323 | { | ||
301 | "display_name": "tampere", | 324 | "display_name": "tampere", | ||
302 | "id": "c4067e38-120f-428f-8175-6e7196e617b8", | 325 | "id": "c4067e38-120f-428f-8175-6e7196e617b8", | ||
303 | "name": "tampere", | 326 | "name": "tampere", | ||
304 | "state": "active", | 327 | "state": "active", | ||
305 | "vocabulary_id": null | 328 | "vocabulary_id": null | ||
306 | } | 329 | } | ||
307 | ], | 330 | ], | ||
308 | "temporal_end": "2022-07-10", | 331 | "temporal_end": "2022-07-10", | ||
309 | "temporal_resolution": "varies from 1.5 min to 1 hour", | 332 | "temporal_resolution": "varies from 1.5 min to 1 hour", | ||
310 | "temporal_start": "2019-01-11", | 333 | "temporal_start": "2019-01-11", | ||
311 | "title": "Tampere Viinikka smart street light pilot", | 334 | "title": "Tampere Viinikka smart street light pilot", | ||
312 | "type": "dataset", | 335 | "type": "dataset", | ||
313 | "url": "", | 336 | "url": "", | ||
314 | "version": "" | 337 | "version": "" | ||
315 | } | 338 | } |