Changes
On March 8, 2024 at 2:03:53 PM +0200, hylli:
-
Added resource Illuminance sensor Device entity example to Tampere street lights
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": "73444995-4438-4443-9402-b11cf84a7060", | 17 | "id": "73444995-4438-4443-9402-b11cf84a7060", | ||
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-10-17T08:24:38.547680", | 23 | "metadata_created": "2022-10-17T08:24:38.547680", | ||
n | 24 | "metadata_modified": "2024-03-08T12:00:33.454137", | n | 24 | "metadata_modified": "2024-03-08T12:03:53.040436", |
25 | "name": "tampere-street-lights", | 25 | "name": "tampere-street-lights", | ||
26 | "notes": "Data from the street light system of Tampere including | 26 | "notes": "Data from the street light system of Tampere including | ||
27 | electricity consumption,\r\nambient illuminance data and door sensor | 27 | electricity consumption,\r\nambient illuminance data and door sensor | ||
28 | data. There are 3 different control\r\ncabinets and 317 different | 28 | data. There are 3 different control\r\ncabinets and 317 different | ||
29 | street light groups which together manage about 40000\r\nstreetlights. | 29 | street light groups which together manage about 40000\r\nstreetlights. | ||
30 | Each control cabinet provides illuminance measurements. The | 30 | Each control cabinet provides illuminance measurements. The | ||
31 | data\r\nalso contains the limit values at which the streetlights are | 31 | data\r\nalso contains the limit values at which the streetlights are | ||
32 | supposed to turn on\r\n or off. These limits can be different for each | 32 | supposed to turn on\r\n or off. These limits can be different for each | ||
33 | control cabinet. Each street\r\nlight group provides electrical | 33 | control cabinet. Each street\r\nlight group provides electrical | ||
34 | intensity (electrical current) and voltage\r\nmeasurements. The | 34 | intensity (electrical current) and voltage\r\nmeasurements. The | ||
35 | electrical data is given separately for each of the three\r\nphases. | 35 | electrical data is given separately for each of the three\r\nphases. | ||
36 | The door sensor data relates to the street light groups. The data | 36 | The door sensor data relates to the street light groups. The data | ||
37 | also\r\ncontains information on which control cabinet controls which | 37 | also\r\ncontains information on which control cabinet controls which | ||
38 | street light group\r\n(each street light group can have either 1 or 2 | 38 | street light group\r\n(each street light group can have either 1 or 2 | ||
39 | control cabinets). See | 39 | control cabinets). See | ||
40 | \r\n[CityIoT](https://ckan.energydata.rd.tuni.fi/organization/cityiot) | 40 | \r\n[CityIoT](https://ckan.energydata.rd.tuni.fi/organization/cityiot) | ||
41 | project for\r\ngeneral information about how the measurements are | 41 | project for\r\ngeneral information about how the measurements are | ||
42 | stored and can be used.\r\n\r\n## Data model\r\n\r\nThe FIWARE entity | 42 | stored and can be used.\r\n\r\n## Data model\r\n\r\nThe FIWARE entity | ||
43 | types used in this data set are from | 43 | types used in this data set are from | ||
44 | amodels.readthedocs.io/en/latest/Weather/doc/introduction.html)\r\nand | 44 | amodels.readthedocs.io/en/latest/Weather/doc/introduction.html)\r\nand | ||
45 | readthedocs.io/en/latest/StreetLighting/doc/introduction.html)\r\ndata | 45 | readthedocs.io/en/latest/StreetLighting/doc/introduction.html)\r\ndata | ||
46 | models. However some changes had to be made to the entity attributes | 46 | models. However some changes had to be made to the entity attributes | ||
47 | to\r\nfit them to the original data. The following entity types are | 47 | to\r\nfit them to the original data. The following entity types are | ||
48 | used.\r\n\r\n- | 48 | used.\r\n\r\n- | ||
49 | en/latest/StreetLighting/StreetlightControlCabinet/doc/spec.html):\r\n | 49 | en/latest/StreetLighting/StreetlightControlCabinet/doc/spec.html):\r\n | ||
50 | Controllers of the street light groups. IlluminanceOn and | 50 | Controllers of the street light groups. IlluminanceOn and | ||
51 | IlluminanceOff\r\n attributes were added to this type to represent | 51 | IlluminanceOff\r\n attributes were added to this type to represent | ||
52 | the values when the street\r\n lights should be turned on and | 52 | the values when the street\r\n lights should be turned on and | ||
53 | off.\r\n- | 53 | off.\r\n- | ||
54 | edocs.io/en/latest/StreetLighting/StreetlightGroup/doc/spec.html):\r\n | 54 | edocs.io/en/latest/StreetLighting/StreetlightGroup/doc/spec.html):\r\n | ||
55 | Represents a group of street lights . In this data set contains the | 55 | Represents a group of street lights . In this data set contains the | ||
56 | electrical\r\n measurements which in the original data model are part | 56 | electrical\r\n measurements which in the original data model are part | ||
57 | of the control cabinet.\r\n- | 57 | of the control cabinet.\r\n- | ||
58 | amodels.readthedocs.io/en/latest/Device/Device/doc/spec.html):\r\nUsed | 58 | amodels.readthedocs.io/en/latest/Device/Device/doc/spec.html):\r\nUsed | ||
59 | to represent door sensors and illuminance sensors. The illuminance | 59 | to represent door sensors and illuminance sensors. The illuminance | ||
60 | sensors\r\nare related to control cabinets and the door sensors to | 60 | sensors\r\nare related to control cabinets and the door sensors to | ||
61 | street light groups. As\r\na change from the standard device data | 61 | street light groups. As\r\na change from the standard device data | ||
62 | model, The\r\nowner attribute is used to model these | 62 | model, The\r\nowner attribute is used to model these | ||
63 | relationships.\r\n- | 63 | relationships.\r\n- | ||
64 | s.readthedocs.io/en/latest/Weather/WeatherObserved/doc/spec.html):\r\n | 64 | s.readthedocs.io/en/latest/Weather/WeatherObserved/doc/spec.html):\r\n | ||
65 | Is used to model the illuminance measurements from the control | 65 | Is used to model the illuminance measurements from the control | ||
66 | cabinets.\r\n\r\n## Notes about the data\r\n\r\n- The data was | 66 | cabinets.\r\n\r\n## Notes about the data\r\n\r\n- The data was | ||
67 | originally stored in a different database system with its own\r\n | 67 | originally stored in a different database system with its own\r\n | ||
68 | data model. From there it was then transfered and converted to the | 68 | data model. From there it was then transfered and converted to the | ||
69 | CityIoT platform.\r\n- In the original data, locations were given only | 69 | CityIoT platform.\r\n- In the original data, locations were given only | ||
70 | as street addresses. For this\r\ndata set, the free service | 70 | as street addresses. For this\r\ndata set, the free service | ||
71 | <https://nominatim.openstreetmap.org/> was used to\r\nget the | 71 | <https://nominatim.openstreetmap.org/> was used to\r\nget the | ||
72 | corresponding latitude and longitude coordinates.\r\n- The illuminance | 72 | corresponding latitude and longitude coordinates.\r\n- The illuminance | ||
73 | data contained only measurement values close to the point when\r\n | 73 | data contained only measurement values close to the point when\r\n | ||
74 | the streetlights were supposed to turn on or off. This means that | 74 | the streetlights were supposed to turn on or off. This means that | ||
75 | there is no\r\n measurements from midday or midnight. This was | 75 | there is no\r\n measurements from midday or midnight. This was | ||
76 | intentional by the data\r\n provider, since the data was originally | 76 | intentional by the data\r\n provider, since the data was originally | ||
77 | meant to test whether the streetlight\r\n control system worked | 77 | meant to test whether the streetlight\r\n control system worked | ||
78 | properly.\r\n- Time resolution for illuminance measurements is about 4 | 78 | properly.\r\n- Time resolution for illuminance measurements is about 4 | ||
79 | minutes. For the\r\n electrical intensity it is 2 or 3 hours though | 79 | minutes. For the\r\n electrical intensity it is 2 or 3 hours though | ||
80 | there can be cases where\r\n measurements for one phase are reported | 80 | there can be cases where\r\n measurements for one phase are reported | ||
81 | first then few minutes after there are\r\n measurements for the other | 81 | first then few minutes after there are\r\n measurements for the other | ||
82 | phases for example. Voltage is reported only couple\r\n times a | 82 | phases for example. Voltage is reported only couple\r\n times a | ||
83 | day.\r\n- UTC time is used with the timestamps.\r\n\r\n## Accessing | 83 | day.\r\n- UTC time is used with the timestamps.\r\n\r\n## Accessing | ||
84 | the data\r\n\r\nThe data is stored in the Tampere University CityIoT | 84 | the data\r\n\r\nThe data is stored in the Tampere University CityIoT | ||
85 | platform. The used FIWARR\r\nservice is streetlight and all entities | 85 | platform. The used FIWARR\r\nservice is streetlight and all entities | ||
86 | there are under the service path\r\n/Tampere.\r\n\r\n### | 86 | there are under the service path\r\n/Tampere.\r\n\r\n### | ||
87 | Examples\r\n\r\nfind out the streetlight group entity ids which has | 87 | Examples\r\n\r\nfind out the streetlight group entity ids which has | ||
88 | KV-0446 as a controller cabinet:\r\n\r\n curl -X GET | 88 | KV-0446 as a controller cabinet:\r\n\r\n curl -X GET | ||
89 | StreetlightGroup&q=refStreetlightCabinetController~=KV-0446&attrs=id\" | 89 | StreetlightGroup&q=refStreetlightCabinetController~=KV-0446&attrs=id\" | ||
90 | --header \"Fiware-Service: streetlight\" --header | 90 | --header \"Fiware-Service: streetlight\" --header | ||
91 | \"Fiware-Servicepath: /Tampere\" --header \"apikey: | 91 | \"Fiware-Servicepath: /Tampere\" --header \"apikey: | ||
92 | your_apikey\"\r\n\r\nFind out which streetlight groups have all phases | 92 | your_apikey\"\r\n\r\nFind out which streetlight groups have all phases | ||
93 | for intensity and voltage set with all values for intensity being | 93 | for intensity and voltage set with all values for intensity being | ||
94 | above 10 A:\r\n\r\n curl -X GET | 94 | above 10 A:\r\n\r\n curl -X GET | ||
95 | e.L1!=null;voltage.L2!=null;voltage.L3!=null&attrs=intensity,voltage\" | 95 | e.L1!=null;voltage.L2!=null;voltage.L3!=null&attrs=intensity,voltage\" | ||
96 | --header \"Fiware-Service: streetlight\" --header | 96 | --header \"Fiware-Service: streetlight\" --header | ||
97 | \"Fiware-Servicepath: /Tampere\" --header \"apikey: | 97 | \"Fiware-Servicepath: /Tampere\" --header \"apikey: | ||
98 | your_apikey\"\r\n\r\nGet daily maximum illuminance values for street | 98 | your_apikey\"\r\n\r\nGet daily maximum illuminance values for street | ||
99 | light control cabinet KV-0217 between 4 January 2019 and 7 January | 99 | light control cabinet KV-0217 between 4 January 2019 and 7 January | ||
100 | 2019:\r\n\r\n curl -X GET | 100 | 2019:\r\n\r\n curl -X GET | ||
101 | T00:00:00Z&toDate=2019-01-07T23:59:59Z&aggrMethod=max&aggrPeriod=day\" | 101 | T00:00:00Z&toDate=2019-01-07T23:59:59Z&aggrMethod=max&aggrPeriod=day\" | ||
102 | --header \"Fiware-Service: streetlight\" --header | 102 | --header \"Fiware-Service: streetlight\" --header | ||
103 | \"Fiware-Servicepath: /Tampere\" --header \"apikey: | 103 | \"Fiware-Servicepath: /Tampere\" --header \"apikey: | ||
104 | your_apikey\"\r\n", | 104 | your_apikey\"\r\n", | ||
n | 105 | "num_resources": 2, | n | 105 | "num_resources": 3, |
106 | "num_tags": 3, | 106 | "num_tags": 3, | ||
107 | "organization": { | 107 | "organization": { | ||
108 | "approval_status": "approved", | 108 | "approval_status": "approved", | ||
109 | "created": "2022-10-17T09:15:18.177419", | 109 | "created": "2022-10-17T09:15:18.177419", | ||
110 | "description": "The [CityIoT project](https://www.cityiot.fi/) | 110 | "description": "The [CityIoT project](https://www.cityiot.fi/) | ||
111 | collected smart city related data\r\nin Tampere about street lights, | 111 | collected smart city related data\r\nin Tampere about street lights, | ||
112 | electric buses and bus passenger analytics. This\r\ndata is stored in | 112 | electric buses and bus passenger analytics. This\r\ndata is stored in | ||
113 | a [FIWARE](https://www.fiware.org/) based platform. FIWARE is\r\na | 113 | a [FIWARE](https://www.fiware.org/) based platform. FIWARE is\r\na | ||
114 | collection of standards and components for creating smart solutions. | 114 | collection of standards and components for creating smart solutions. | ||
115 | The\r\nplatform is available at the URL | 115 | The\r\nplatform is available at the URL | ||
116 | https://tlt-cityiot.rd.tuni.fi/. The data is\r\navailable via the HTTP | 116 | https://tlt-cityiot.rd.tuni.fi/. The data is\r\navailable via the HTTP | ||
117 | based APIs offered by the platform. To access any of the\r\ndata sets | 117 | based APIs offered by the platform. To access any of the\r\ndata sets | ||
118 | an API key is required. If you are interested in using any of | 118 | an API key is required. If you are interested in using any of | ||
119 | the\r\nCityIoT data sets, contact the person marked as the maintainer | 119 | the\r\nCityIoT data sets, contact the person marked as the maintainer | ||
120 | of the data set. \r\n\r\nIn order to get the data and make use of it | 120 | of the data set. \r\n\r\nIn order to get the data and make use of it | ||
121 | some understanding is required about\r\nthe following 3 aspects of the | 121 | some understanding is required about\r\nthe following 3 aspects of the | ||
122 | CityIoT platform:\r\n\r\n1. The [NGSI v2 | 122 | CityIoT platform:\r\n\r\n1. The [NGSI v2 | ||
123 | pecification](https://fiware.github.io/specifications/ngsiv2/stable/): | 123 | pecification](https://fiware.github.io/specifications/ngsiv2/stable/): | ||
124 | defines the API used by the main FIWARE component\r\nthe Orion context | 124 | defines the API used by the main FIWARE component\r\nthe Orion context | ||
125 | broker and also the entity based data model used by all | 125 | broker and also the entity based data model used by all | ||
126 | FIWARE\r\ncomponents.\r\n2. The [Orion context | 126 | FIWARE\r\ncomponents.\r\n2. The [Orion context | ||
127 | broker](https://fiware-orion.readthedocs.io/en/master/): Has the most | 127 | broker](https://fiware-orion.readthedocs.io/en/master/): Has the most | ||
128 | recent version of the data i.e. NGSI v2\r\nentities. This data can be | 128 | recent version of the data i.e. NGSI v2\r\nentities. This data can be | ||
129 | queried or subscribed to so that you get notified\r\nwhen the data | 129 | queried or subscribed to so that you get notified\r\nwhen the data | ||
130 | changes.\r\n3. | 130 | changes.\r\n3. | ||
131 | [QuantumLeap](https://quantumleap.readthedocs.io/en/latest/): Stores | 131 | [QuantumLeap](https://quantumleap.readthedocs.io/en/latest/): Stores | ||
132 | NGSI v2 entity data into a timeseries data base. It allows\r\nthen the | 132 | NGSI v2 entity data into a timeseries data base. It allows\r\nthen the | ||
133 | querying of this historic data via an HTTP API.\r\n\r\nSo in short, | 133 | querying of this historic data via an HTTP API.\r\n\r\nSo in short, | ||
134 | understand the NGSI v2 data model so you know what kind of | 134 | understand the NGSI v2 data model so you know what kind of | ||
135 | data\r\nstructures you are dealing with. Use Orion if you want a | 135 | data\r\nstructures you are dealing with. Use Orion if you want a | ||
136 | programmatic way to\r\nlist all available data entities, query their | 136 | programmatic way to\r\nlist all available data entities, query their | ||
137 | current state or subscribe to\r\nchanges in their state. Use | 137 | current state or subscribe to\r\nchanges in their state. Use | ||
138 | QuantumLeap if you want to explore how the entities\r\nhave changed | 138 | QuantumLeap if you want to explore how the entities\r\nhave changed | ||
139 | over time.\r\n\r\n## The data model\r\n\r\nIn FIWARe NGSI v2 data is | 139 | over time.\r\n\r\n## The data model\r\n\r\nIn FIWARe NGSI v2 data is | ||
140 | modelled as context entities. Entities can represent\r\nlogical of | 140 | modelled as context entities. Entities can represent\r\nlogical of | ||
141 | physical things such as a sensor, a person or a weather | 141 | physical things such as a sensor, a person or a weather | ||
142 | observation.\r\nEntities have a id and a type indicating what the | 142 | observation.\r\nEntities have a id and a type indicating what the | ||
143 | entity represents. Entities\r\nthen can have various attributes | 143 | entity represents. Entities\r\nthen can have various attributes | ||
144 | providing information about them. The entity\r\ntype determines what | 144 | providing information about them. The entity\r\ntype determines what | ||
145 | attributes an entity should have. This way domain specific\r\ndata | 145 | attributes an entity should have. This way domain specific\r\ndata | ||
146 | models can be created by defining the needed entity types and | 146 | models can be created by defining the needed entity types and | ||
147 | their\r\nattributes. For example weather observation could have | 147 | their\r\nattributes. For example weather observation could have | ||
148 | attributes for\r\ntemperature, humidity and the location for the | 148 | attributes for\r\ntemperature, humidity and the location for the | ||
149 | observation. An attribute has a\r\nname and a value including data | 149 | observation. An attribute has a\r\nname and a value including data | ||
150 | type for the value. An attribute can also have\r\nmetadata such as | 150 | type for the value. An attribute can also have\r\nmetadata such as | ||
151 | timestamp for when the value was acquired or what is | 151 | timestamp for when the value was acquired or what is | ||
152 | the\r\nmeasurement accuracy for the value. The documentation for each | 152 | the\r\nmeasurement accuracy for the value. The documentation for each | ||
153 | CityIoT data set\r\nexplains what entity types the data consists of | 153 | CityIoT data set\r\nexplains what entity types the data consists of | ||
154 | and what attributes the entities have.\r\n\r\nThe entities are | 154 | and what attributes the entities have.\r\n\r\nThe entities are | ||
155 | represented as JSON. For example an entity representing an\r\nelectric | 155 | represented as JSON. For example an entity representing an\r\nelectric | ||
156 | bus from one of the CityIoT data sets looks like this with only part | 156 | bus from one of the CityIoT data sets looks like this with only part | ||
157 | of\r\nthe attributes included:\r\n\r\n {\r\n \"id\": | 157 | of\r\nthe attributes included:\r\n\r\n {\r\n \"id\": | ||
158 | \"Vehicle:TKL16\",\r\n \"type\": \"Vehicle\",\r\n | 158 | \"Vehicle:TKL16\",\r\n \"type\": \"Vehicle\",\r\n | ||
159 | \"vehicleType\": {\r\n \"value\": \"bus\"\r\n },\r\n | 159 | \"vehicleType\": {\r\n \"value\": \"bus\"\r\n },\r\n | ||
160 | \"name\": {\r\n \"value\": \"TKL16\"\r\n },\r\n | 160 | \"name\": {\r\n \"value\": \"TKL16\"\r\n },\r\n | ||
161 | \"location\": {\r\n \"type\": \"geo:json\",\r\n | 161 | \"location\": {\r\n \"type\": \"geo:json\",\r\n | ||
162 | \"value\": {\r\n \"type\": \"Point\",\r\n | 162 | \"value\": {\r\n \"type\": \"Point\",\r\n | ||
163 | \"coordinates\": [23.769203333333333, 61.49531666666667]\r\n | 163 | \"coordinates\": [23.769203333333333, 61.49531666666667]\r\n | ||
164 | },\r\n \"metadata\": {\r\n \"timestamp\": | 164 | },\r\n \"metadata\": {\r\n \"timestamp\": | ||
165 | {\r\n \"type\": \"DateTime\",\r\n | 165 | {\r\n \"type\": \"DateTime\",\r\n | ||
166 | \"value\": \"2019-04-03T14:52:18.192881Z\"\r\n }\r\n | 166 | \"value\": \"2019-04-03T14:52:18.192881Z\"\r\n }\r\n | ||
167 | }\r\n },\r\n \"speed\": {\r\n \"value\": | 167 | }\r\n },\r\n \"speed\": {\r\n \"value\": | ||
168 | 34.5,\r\n \"metadata\": {\r\n \"timestamp\": | 168 | 34.5,\r\n \"metadata\": {\r\n \"timestamp\": | ||
169 | {\r\n \"type\": \"DateTime\",\r\n | 169 | {\r\n \"type\": \"DateTime\",\r\n | ||
170 | \"value\": \"2019-04-03T14:52:19.867419Z\"\r\n }\r\n | 170 | \"value\": \"2019-04-03T14:52:19.867419Z\"\r\n }\r\n | ||
171 | }\r\n }, \r\n \"power\": {\r\n | 171 | }\r\n }, \r\n \"power\": {\r\n | ||
172 | \"value\": 75.70000000000027,\r\n \"metadata\": {\r\n | 172 | \"value\": 75.70000000000027,\r\n \"metadata\": {\r\n | ||
173 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | 173 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | ||
174 | \"value\": \"2019-04-03T14:52:20.218114Z\"\r\n }\r\n | 174 | \"value\": \"2019-04-03T14:52:20.218114Z\"\r\n }\r\n | ||
175 | }\r\n },\r\n \"chargeState\": {\r\n | 175 | }\r\n },\r\n \"chargeState\": {\r\n | ||
176 | \"value\": 87,\r\n \"metadata\": {\r\n | 176 | \"value\": 87,\r\n \"metadata\": {\r\n | ||
177 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | 177 | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n | ||
178 | \"value\": \"2019-04-03T14:52:16.938936Z\"\r\n }\r\n | 178 | \"value\": \"2019-04-03T14:52:16.938936Z\"\r\n }\r\n | ||
179 | }\r\n }\r\n }\r\n\r\n\r\n## The Orion context | 179 | }\r\n }\r\n }\r\n\r\n\r\n## The Orion context | ||
180 | broker\r\n\r\nThe Orion context broker stores the latest versions of | 180 | broker\r\n\r\nThe Orion context broker stores the latest versions of | ||
181 | all entities. Its API is\r\nused to query information about the | 181 | all entities. Its API is\r\nused to query information about the | ||
182 | entities or subscribe to changes in their\r\nattributes. The Tampere | 182 | entities or subscribe to changes in their\r\nattributes. The Tampere | ||
183 | CityIoT Orion API is available at the | 183 | CityIoT Orion API is available at the | ||
184 | URL\r\nhttps://tlt-cityiot.rd.tuni.fi/orion/\r\n\r\nTo separate the | 184 | URL\r\nhttps://tlt-cityiot.rd.tuni.fi/orion/\r\n\r\nTo separate the | ||
185 | entities of the different data sets, Orions multi tenancy\r\nfeature | 185 | entities of the different data sets, Orions multi tenancy\r\nfeature | ||
186 | is used. Data is separated into different services and under a | 186 | is used. Data is separated into different services and under a | ||
187 | service\r\nhierarchical service paths can be used for more | 187 | service\r\nhierarchical service paths can be used for more | ||
188 | fine-grained data organization.\r\nIn API calls the service and | 188 | fine-grained data organization.\r\nIn API calls the service and | ||
189 | service path are given in HTTP headers:\r\n`Fiware-Service` for the | 189 | service path are given in HTTP headers:\r\n`Fiware-Service` for the | ||
190 | service and `Fiware-ServicePath` for the service path. For\r\naccess | 190 | service and `Fiware-ServicePath` for the service path. For\r\naccess | ||
191 | control API keys are used. The API key is given in the `apikey` HTTP | 191 | control API keys are used. The API key is given in the `apikey` HTTP | ||
192 | header.\r\nDocumentation for each data set tells what service is used | 192 | header.\r\nDocumentation for each data set tells what service is used | ||
193 | and how service paths\r\nare used. You can get an API key by | 193 | and how service paths\r\nare used. You can get an API key by | ||
194 | requesting access to a data set from the\r\nmaintainer of the data | 194 | requesting access to a data set from the\r\nmaintainer of the data | ||
195 | set. As an example how all this works in practice, the\r\n[Tampere | 195 | set. As an example how all this works in practice, the\r\n[Tampere | ||
196 | electric | 196 | electric | ||
197 | ckan.energydata.rd.tuni.fi/dataset/tampere-electric-bus-pilot)\r\ndata | 197 | ckan.energydata.rd.tuni.fi/dataset/tampere-electric-bus-pilot)\r\ndata | ||
198 | set has entities representing electric buses in service | 198 | set has entities representing electric buses in service | ||
199 | public_transport\r\nunder the service path /Tampere/electric_bus. | 199 | public_transport\r\nunder the service path /Tampere/electric_bus. | ||
200 | Using the command line HTTP client\r\ncurl, this is how to get all the | 200 | Using the command line HTTP client\r\ncurl, this is how to get all the | ||
201 | electric bus entities and their attributes from\r\nOrion:\r\n\r\n | 201 | electric bus entities and their attributes from\r\nOrion:\r\n\r\n | ||
202 | curl -H 'Fiware-Service: public_transport' -H 'Fiware-ServicePath: | 202 | curl -H 'Fiware-Service: public_transport' -H 'Fiware-ServicePath: | ||
203 | /Tampere/electric_bus' -H 'apikey: your_apikey' | 203 | /Tampere/electric_bus' -H 'apikey: your_apikey' | ||
204 | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities\"\r\n\r\n## | 204 | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities\"\r\n\r\n## | ||
205 | QuantumLeap\r\n\r\nQuantumLeap stores the change history of the | 205 | QuantumLeap\r\n\r\nQuantumLeap stores the change history of the | ||
206 | entities in a timeseries database.\r\nThis can then be queried via its | 206 | entities in a timeseries database.\r\nThis can then be queried via its | ||
207 | API. The Tampere CityIoT QuantumLeap is\r\navailable at the URL: | 207 | API. The Tampere CityIoT QuantumLeap is\r\navailable at the URL: | ||
208 | https://tlt-cityiot.rd.tuni.fi/quantumleap/\r\n\r\nIt uses the same | 208 | https://tlt-cityiot.rd.tuni.fi/quantumleap/\r\n\r\nIt uses the same | ||
209 | service and service path\r\nsystem to organize entities as Orion. The | 209 | service and service path\r\nsystem to organize entities as Orion. The | ||
210 | same API key based authentication\r\nsystem is also used. See the | 210 | same API key based authentication\r\nsystem is also used. See the | ||
211 | Orion section for more details. For example to Get\r\nall values for | 211 | Orion section for more details. For example to Get\r\nall values for | ||
212 | power and speed for electric bus entity TKL15 between 14:01 and 14:02 | 212 | power and speed for electric bus entity TKL15 between 14:01 and 14:02 | ||
213 | on\r\n28th of October 2019 with curl the following command would be | 213 | on\r\n28th of October 2019 with curl the following command would be | ||
214 | used:\r\n\r\n curl -H 'Fiware-Service: public_transport' -H | 214 | used:\r\n\r\n curl -H 'Fiware-Service: public_transport' -H | ||
215 | 'Fiware-ServicePath: /Tampere/electric_bus' -H 'apikey: your_apikey' | 215 | 'Fiware-ServicePath: /Tampere/electric_bus' -H 'apikey: your_apikey' | ||
216 | ed,power&&fromDate=2019-10-28T12:01:00&&toDate=2019-10-28T12:02:00\"", | 216 | ed,power&&fromDate=2019-10-28T12:01:00&&toDate=2019-10-28T12:02:00\"", | ||
217 | "id": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | 217 | "id": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | ||
218 | "image_url": "", | 218 | "image_url": "", | ||
219 | "is_organization": true, | 219 | "is_organization": true, | ||
220 | "name": "cityiot", | 220 | "name": "cityiot", | ||
221 | "state": "active", | 221 | "state": "active", | ||
222 | "title": "CityIoT", | 222 | "title": "CityIoT", | ||
223 | "type": "organization" | 223 | "type": "organization" | ||
224 | }, | 224 | }, | ||
225 | "owner_org": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | 225 | "owner_org": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | ||
226 | "private": false, | 226 | "private": false, | ||
227 | "relationships_as_object": [], | 227 | "relationships_as_object": [], | ||
228 | "relationships_as_subject": [], | 228 | "relationships_as_subject": [], | ||
229 | "resources": [ | 229 | "resources": [ | ||
230 | { | 230 | { | ||
231 | "cache_last_updated": null, | 231 | "cache_last_updated": null, | ||
232 | "cache_url": null, | 232 | "cache_url": null, | ||
233 | "created": "2022-10-17T08:25:30.444938", | 233 | "created": "2022-10-17T08:25:30.444938", | ||
234 | "datastore_active": false, | 234 | "datastore_active": false, | ||
235 | "description": "Placeholder for the actual documentation.", | 235 | "description": "Placeholder for the actual documentation.", | ||
236 | "format": "text/markdown", | 236 | "format": "text/markdown", | ||
237 | "hash": "", | 237 | "hash": "", | ||
238 | "id": "850611d5-2b4b-4849-8a4c-bcf1e46d1c96", | 238 | "id": "850611d5-2b4b-4849-8a4c-bcf1e46d1c96", | ||
239 | "last_modified": "2022-10-17T08:25:30.411018", | 239 | "last_modified": "2022-10-17T08:25:30.411018", | ||
240 | "metadata_modified": "2022-10-17T08:25:31.107827", | 240 | "metadata_modified": "2022-10-17T08:25:31.107827", | ||
241 | "mimetype": "text/markdown", | 241 | "mimetype": "text/markdown", | ||
242 | "mimetype_inner": null, | 242 | "mimetype_inner": null, | ||
243 | "name": "dummy_spec.md", | 243 | "name": "dummy_spec.md", | ||
244 | "package_id": "73444995-4438-4443-9402-b11cf84a7060", | 244 | "package_id": "73444995-4438-4443-9402-b11cf84a7060", | ||
245 | "position": 0, | 245 | "position": 0, | ||
246 | "resource_type": null, | 246 | "resource_type": null, | ||
247 | "size": 19685, | 247 | "size": 19685, | ||
248 | "state": "active", | 248 | "state": "active", | ||
249 | "url": | 249 | "url": | ||
250 | e/850611d5-2b4b-4849-8a4c-bcf1e46d1c96/download/electric_bus_spec.md", | 250 | e/850611d5-2b4b-4849-8a4c-bcf1e46d1c96/download/electric_bus_spec.md", | ||
251 | "url_type": "upload" | 251 | "url_type": "upload" | ||
252 | }, | 252 | }, | ||
253 | { | 253 | { | ||
254 | "cache_last_updated": null, | 254 | "cache_last_updated": null, | ||
255 | "cache_url": null, | 255 | "cache_url": null, | ||
256 | "created": "2024-03-08T12:00:33.475035", | 256 | "created": "2024-03-08T12:00:33.475035", | ||
257 | "datastore_active": false, | 257 | "datastore_active": false, | ||
258 | "description": "An example of a Device entity representing a | 258 | "description": "An example of a Device entity representing a | ||
259 | door sensor.", | 259 | door sensor.", | ||
260 | "format": "JSON", | 260 | "format": "JSON", | ||
261 | "hash": "", | 261 | "hash": "", | ||
262 | "id": "49f4a884-2c69-4783-8ade-cc74551900de", | 262 | "id": "49f4a884-2c69-4783-8ade-cc74551900de", | ||
263 | "last_modified": "2024-03-08T12:00:33.444331", | 263 | "last_modified": "2024-03-08T12:00:33.444331", | ||
n | 264 | "metadata_modified": "2024-03-08T12:00:33.459736", | n | 264 | "metadata_modified": "2024-03-08T12:03:53.044792", |
265 | "mimetype": "application/json", | 265 | "mimetype": "application/json", | ||
266 | "mimetype_inner": null, | 266 | "mimetype_inner": null, | ||
267 | "name": "Door sensor Device entity example", | 267 | "name": "Door sensor Device entity example", | ||
268 | "package_id": "73444995-4438-4443-9402-b11cf84a7060", | 268 | "package_id": "73444995-4438-4443-9402-b11cf84a7060", | ||
269 | "position": 1, | 269 | "position": 1, | ||
270 | "resource_type": null, | 270 | "resource_type": null, | ||
271 | "size": 720, | 271 | "size": 720, | ||
272 | "state": "active", | 272 | "state": "active", | ||
273 | "url": | 273 | "url": | ||
274 | 49f4a884-2c69-4783-8ade-cc74551900de/download/device-doorsensor.json", | 274 | 49f4a884-2c69-4783-8ade-cc74551900de/download/device-doorsensor.json", | ||
t | t | 275 | "url_type": "upload" | ||
276 | }, | ||||
277 | { | ||||
278 | "cache_last_updated": null, | ||||
279 | "cache_url": null, | ||||
280 | "created": "2024-03-08T12:03:53.058908", | ||||
281 | "datastore_active": false, | ||||
282 | "description": "An example Device entity representing an | ||||
283 | illuminance sensor.", | ||||
284 | "format": "JSON", | ||||
285 | "hash": "", | ||||
286 | "id": "a2eda52b-9bae-475c-93b8-aa4a468c9d5a", | ||||
287 | "last_modified": "2024-03-08T12:03:53.030260", | ||||
288 | "metadata_modified": "2024-03-08T12:03:53.045025", | ||||
289 | "mimetype": "application/json", | ||||
290 | "mimetype_inner": null, | ||||
291 | "name": "Illuminance sensor Device entity example", | ||||
292 | "package_id": "73444995-4438-4443-9402-b11cf84a7060", | ||||
293 | "position": 2, | ||||
294 | "resource_type": null, | ||||
295 | "size": 486, | ||||
296 | "state": "active", | ||||
297 | "url": | ||||
298 | b-9bae-475c-93b8-aa4a468c9d5a/download/device-illuminancesensor.json", | ||||
275 | "url_type": "upload" | 299 | "url_type": "upload" | ||
276 | } | 300 | } | ||
277 | ], | 301 | ], | ||
278 | "state": "active", | 302 | "state": "active", | ||
279 | "tags": [ | 303 | "tags": [ | ||
280 | { | 304 | { | ||
281 | "display_name": "electricity", | 305 | "display_name": "electricity", | ||
282 | "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", | 306 | "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", | ||
283 | "name": "electricity", | 307 | "name": "electricity", | ||
284 | "state": "active", | 308 | "state": "active", | ||
285 | "vocabulary_id": null | 309 | "vocabulary_id": null | ||
286 | }, | 310 | }, | ||
287 | { | 311 | { | ||
288 | "display_name": "street light", | 312 | "display_name": "street light", | ||
289 | "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", | 313 | "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", | ||
290 | "name": "street light", | 314 | "name": "street light", | ||
291 | "state": "active", | 315 | "state": "active", | ||
292 | "vocabulary_id": null | 316 | "vocabulary_id": null | ||
293 | }, | 317 | }, | ||
294 | { | 318 | { | ||
295 | "display_name": "tampere", | 319 | "display_name": "tampere", | ||
296 | "id": "c4067e38-120f-428f-8175-6e7196e617b8", | 320 | "id": "c4067e38-120f-428f-8175-6e7196e617b8", | ||
297 | "name": "tampere", | 321 | "name": "tampere", | ||
298 | "state": "active", | 322 | "state": "active", | ||
299 | "vocabulary_id": null | 323 | "vocabulary_id": null | ||
300 | } | 324 | } | ||
301 | ], | 325 | ], | ||
302 | "temporal_end": "2020-05-04", | 326 | "temporal_end": "2020-05-04", | ||
303 | "temporal_resolution": "varies between the various types of data", | 327 | "temporal_resolution": "varies between the various types of data", | ||
304 | "temporal_start": "2018-10-01", | 328 | "temporal_start": "2018-10-01", | ||
305 | "title": "Tampere street lights", | 329 | "title": "Tampere street lights", | ||
306 | "type": "dataset", | 330 | "type": "dataset", | ||
307 | "url": "", | 331 | "url": "", | ||
308 | "version": "" | 332 | "version": "" | ||
309 | } | 333 | } |