Changes
On March 22, 2024 at 6:04:48 PM +0200, hylli:
-
Added resource Streetlight 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:03:48.755787", | n | 24 | "metadata_modified": "2024-03-22T16:04:48.676574", |
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": 1, | n | 89 | "num_resources": 2, |
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", | ||
n | 224 | "metadata_modified": "2024-03-22T16:03:48.762514", | n | 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", | ||
t | t | 235 | "url_type": "upload" | ||
236 | }, | ||||
237 | { | ||||
238 | "cache_last_updated": null, | ||||
239 | "cache_url": null, | ||||
240 | "created": "2024-03-22T16:04:48.699730", | ||||
241 | "datastore_active": false, | ||||
242 | "description": "An example Streetlight entity.", | ||||
243 | "format": "JSON", | ||||
244 | "hash": "", | ||||
245 | "id": "d514005b-1809-4847-8dc4-77a88d802fc3", | ||||
246 | "last_modified": "2024-03-22T16:04:48.666723", | ||||
247 | "metadata_modified": "2024-03-22T16:04:48.682661", | ||||
248 | "mimetype": "application/json", | ||||
249 | "mimetype_inner": null, | ||||
250 | "name": "Streetlight entity example", | ||||
251 | "package_id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | ||||
252 | "position": 1, | ||||
253 | "resource_type": null, | ||||
254 | "size": 9341, | ||||
255 | "state": "active", | ||||
256 | "url": | ||||
257 | 14005b-1809-4847-8dc4-77a88d802fc3/download/streetlight_example.json", | ||||
235 | "url_type": "upload" | 258 | "url_type": "upload" | ||
236 | } | 259 | } | ||
237 | ], | 260 | ], | ||
238 | "state": "active", | 261 | "state": "active", | ||
239 | "tags": [ | 262 | "tags": [ | ||
240 | { | 263 | { | ||
241 | "display_name": "electricity", | 264 | "display_name": "electricity", | ||
242 | "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", | 265 | "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", | ||
243 | "name": "electricity", | 266 | "name": "electricity", | ||
244 | "state": "active", | 267 | "state": "active", | ||
245 | "vocabulary_id": null | 268 | "vocabulary_id": null | ||
246 | }, | 269 | }, | ||
247 | { | 270 | { | ||
248 | "display_name": "street light", | 271 | "display_name": "street light", | ||
249 | "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", | 272 | "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", | ||
250 | "name": "street light", | 273 | "name": "street light", | ||
251 | "state": "active", | 274 | "state": "active", | ||
252 | "vocabulary_id": null | 275 | "vocabulary_id": null | ||
253 | }, | 276 | }, | ||
254 | { | 277 | { | ||
255 | "display_name": "tampere", | 278 | "display_name": "tampere", | ||
256 | "id": "c4067e38-120f-428f-8175-6e7196e617b8", | 279 | "id": "c4067e38-120f-428f-8175-6e7196e617b8", | ||
257 | "name": "tampere", | 280 | "name": "tampere", | ||
258 | "state": "active", | 281 | "state": "active", | ||
259 | "vocabulary_id": null | 282 | "vocabulary_id": null | ||
260 | } | 283 | } | ||
261 | ], | 284 | ], | ||
262 | "temporal_end": "2022-07-10", | 285 | "temporal_end": "2022-07-10", | ||
263 | "temporal_resolution": "varies from 1.5 min to 1 hour", | 286 | "temporal_resolution": "varies from 1.5 min to 1 hour", | ||
264 | "temporal_start": "2019-01-11", | 287 | "temporal_start": "2019-01-11", | ||
265 | "title": "Tampere Viinikka smart street light pilot", | 288 | "title": "Tampere Viinikka smart street light pilot", | ||
266 | "type": "dataset", | 289 | "type": "dataset", | ||
267 | "url": "", | 290 | "url": "", | ||
268 | "version": "" | 291 | "version": "" | ||
269 | } | 292 | } |