f | { | f | { |
| "author": "", | | "author": "", |
| "author_email": "", | | "author_email": "", |
| "creator_user_id": "c028eea2-1878-47b8-843b-aa298066c249", | | "creator_user_id": "c028eea2-1878-47b8-843b-aa298066c249", |
| "data_owner": "Tampere", | | "data_owner": "Tampere", |
n | "groups": [], | n | "groups": [ |
| | | { |
| | | "description": "This group collects together data related to the |
| | | city of Tampere.", |
| | | "display_name": "Tampere", |
| | | "id": "07adac22-b527-4417-82b9-41c7c24e6f4c", |
| | | "image_display_url": "", |
| | | "name": "tampere", |
| | | "title": "Tampere" |
| | | } |
| | | ], |
| "id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", | | "id": "1d3a382c-32d0-4a81-a574-aeac0237d82a", |
| "isopen": false, | | "isopen": false, |
| "license_id": "internal", | | "license_id": "internal", |
| "license_title": "For internal research and education use", | | "license_title": "For internal research and education use", |
| "maintainer": "Ville Heikkil\u00e4", | | "maintainer": "Ville Heikkil\u00e4", |
| "maintainer_email": "ville.heikkila@tuni.fi", | | "maintainer_email": "ville.heikkila@tuni.fi", |
| "metadata_created": "2022-12-20T10:13:33.153585", | | "metadata_created": "2022-12-20T10:13:33.153585", |
n | "metadata_modified": "2022-12-20T10:14:17.415772", | n | "metadata_modified": "2024-03-22T15:43:28.035798", |
| "name": "tampere-viinikka-smart-street-light-pilot", | | "name": "tampere-viinikka-smart-street-light-pilot", |
n | "notes": "Data from smart street lights located at Viinikka in | n | "notes": "Data collected from a smart streetlight pilot in Tampere. |
| Tampere including electrical measurements. See the | | About 400 smart\r\nstreetlights were piloted in the Viinikka area |
| | | between 2019 and 2022. each\r\nindividual streetlight provided data |
| | | such as electrical measurments, illuminance\r\nlevel and pole angle. |
| | | These streetlights could also then be controlled\r\nindividually. See |
| [CityIoT](https://ckan.energydata.rd.tuni.fi/organization/cityiot) | | \r\n[CityIoT](https://ckan.energydata.rd.tuni.fi/organization/cityiot) |
| project for general information about how the measurements are stored | | project for\r\ngeneral information about how the measurements are |
| and can be used.\r\n\r\nNote: this has not yet been fully | | stored and can be used.\r\n\r\n## Data model\r\n\r\nThe data model |
| documented.", | | uses entity types from the official FIWARE |
| | | amodels.readthedocs.io/en/latest/StreetLighting/doc/introduction.html) |
| | | data\r\nmodel with some modifications and also custom entity types. |
| | | The used entity\r\ntypes are the following.\r\n\r\n- |
| | | eadthedocs.io/en/latest/StreetLighting/Streetlight/doc/spec.html):\r\n |
| | | Used to represent the individual streetlights. Some new attributes |
| | | were added\r\n for example voltage, intensity, activePower, and |
| | | poleAngleDrift.\r\n- |
| | | en/latest/StreetLighting/StreetlightControlCabinet/doc/spec.html):\r\n |
| | | Represents streetlight control cabinets which control a group of |
| | | individual streetlights.\r\n- AmbientLightSensor: Custom entity type |
| | | for representing light sensors that are\r\n related to |
| | | SwitchingGroups.\r\n- SwitchingGroup: Represents all the 400 |
| | | streetlights and 6 streetlight control\r\n cabinets.Contains for |
| | | example the common configuration for the group.\r\n\r\n## Notes about |
| | | the data\r\n\r\n- This data was originally collected into a different |
| | | FIWARE platform operated\r\n by the company who implemented the |
| | | pilot. Using the subscription system of the\r\n Orion context broker, |
| | | it was then transfered also to the Tampere University\r\n FIWARE |
| | | platform.\r\n- The data contains some initial test entities that have |
| | | no data or only little\r\n data from beginning of 2019. These |
| | | entities were replaced with different ones\r\n later. So for example |
| | | although there are 400 streetlights, there are 984\r\n Streetlight |
| | | entities used to represent them during various phases of the\r\n |
| | | pilot.\r\n- The Switchinggroup entity with id GroupAllOLC has |
| | | references to the\r\n Streetlight and streetlightControlCabinet |
| | | entities that were in use at\r\n least from 2020-05-11 until the end |
| | | of the pilot.\r\n- Many entities that were in use until the end of the |
| | | pilot were created on\r\n 2019-05-17.\r\n- The time interval varies |
| | | for the different attributes. For example it is about\r\n 1.5 minutes |
| | | for poleAngleDrift of Streetlight entities and energyConsumed of\r\n |
| | | StreetlightControlCabinet entities. It is about 15 minutes for\r\n |
| | | illuminanceLevel and powerState of Streetlight entities. It is about |
| | | one hour\r\n for intensity, voltage and activePower of streetlight |
| | | entities.\r\n- The Streetlight entities have references to |
| | | StreetligthGroup entities but\r\n these entities do not |
| | | exist.\r\n\r\n## Accessing the data\r\n\r\nThe data is stored in the |
| | | Tampere University CityIoT platform. The used FIWARR\r\nservice is |
| | | streetlight and all entities there are under the service |
| | | path\r\n/Tampere/viinikka.\r\n\r\n### Examples\r\n\r\nGet the most |
| | | recent data about control cabinet \r\n\r\n curl -X GET |
| | | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities/KV-0131\" --header |
| | | \"Fiware-Service: streetlight\" --header \"Fiware-Servicepath: |
| | | /Tampere/viinikka\" --header \"apikey: your_apikey\"\r\n\r\nfind out |
| | | the streetlight entity ids which has KV-0131 as a controller |
| | | cabinet:\r\n\r\n curl -X GET |
| | | 00&type=Streetlight&q=refStreetlightControlCabinet~=KV-0131&attrs=id\" |
| | | --header \"Fiware-Service: streetlight\" --header |
| | | \"Fiware-Servicepath: /Tampere/viinikka\" --header \"apikey: |
| | | your_apikey\"\r\n\r\nGet activePower measurements for Streetlight |
| | | KV-0121-318 on 21st of May 2019.\r\n curl -X GET |
| | | ctivePower?fromDate=2019-05-21T00:00:00Z&toDate=2019-05-21T23:59:59Z\" |
| | | --header \"Fiware-Service: streetlight\" --header |
| | | \"Fiware-Servicepath: /Tampere/viinikka\" --header \"apikey: |
| | | your_apikey\"\r\n", |
| "num_resources": 0, | | "num_resources": 0, |
| "num_tags": 3, | | "num_tags": 3, |
| "organization": { | | "organization": { |
| "approval_status": "approved", | | "approval_status": "approved", |
| "created": "2022-10-17T09:15:18.177419", | | "created": "2022-10-17T09:15:18.177419", |
n | "description": "The CityIoT project collected smart city related | n | "description": "The [CityIoT project](https://www.cityiot.fi/) |
| data in Tampere about street lights, electric buses and bus passenger | | collected smart city related data\r\nin Tampere about street lights, |
| analytics. This data is stored in a [FIWARE](https://www.fiware.org/) | | electric buses and bus passenger analytics. This\r\ndata is stored in |
| based platform. Then explain a bit about FIWARE and offer links to | | a [FIWARE](https://www.fiware.org/) based platform. FIWARE is\r\na |
| more information such as APIs and data model. Describe also the | | collection of standards and components for creating smart solutions. |
| CityIoT FIWARe platform and explain how it can be accessed.", | | The\r\nplatform is available at the URL |
| | | https://tlt-cityiot.rd.tuni.fi/. The data is\r\navailable via the HTTP |
| | | based APIs offered by the platform. To access any of the\r\ndata sets |
| | | an API key is required. If you are interested in using any of |
| | | the\r\nCityIoT data sets, contact the person marked as the maintainer |
| | | of the data set. \r\n\r\nIn order to get the data and make use of it |
| | | some understanding is required about\r\nthe following 3 aspects of the |
| | | CityIoT platform:\r\n\r\n1. The [NGSI v2 |
| | | pecification](https://fiware.github.io/specifications/ngsiv2/stable/): |
| | | defines the API used by the main FIWARE component\r\nthe Orion context |
| | | broker and also the entity based data model used by all |
| | | FIWARE\r\ncomponents.\r\n2. The [Orion context |
| | | broker](https://fiware-orion.readthedocs.io/en/master/): Has the most |
| | | recent version of the data i.e. NGSI v2\r\nentities. This data can be |
| | | queried or subscribed to so that you get notified\r\nwhen the data |
| | | changes.\r\n3. |
| | | [QuantumLeap](https://quantumleap.readthedocs.io/en/latest/): Stores |
| | | NGSI v2 entity data into a timeseries data base. It allows\r\nthen the |
| | | querying of this historic data via an HTTP API.\r\n\r\nSo in short, |
| | | understand the NGSI v2 data model so you know what kind of |
| | | data\r\nstructures you are dealing with. Use Orion if you want a |
| | | programmatic way to\r\nlist all available data entities, query their |
| | | current state or subscribe to\r\nchanges in their state. Use |
| | | QuantumLeap if you want to explore how the entities\r\nhave changed |
| | | over time.\r\n\r\n## The data model\r\n\r\nIn FIWARe NGSI v2 data is |
| | | modelled as context entities. Entities can represent\r\nlogical of |
| | | physical things such as a sensor, a person or a weather |
| | | observation.\r\nEntities have a id and a type indicating what the |
| | | entity represents. Entities\r\nthen can have various attributes |
| | | providing information about them. The entity\r\ntype determines what |
| | | attributes an entity should have. This way domain specific\r\ndata |
| | | models can be created by defining the needed entity types and |
| | | their\r\nattributes. For example weather observation could have |
| | | attributes for\r\ntemperature, humidity and the location for the |
| | | observation. An attribute has a\r\nname and a value including data |
| | | type for the value. An attribute can also have\r\nmetadata such as |
| | | timestamp for when the value was acquired or what is |
| | | the\r\nmeasurement accuracy for the value. The documentation for each |
| | | CityIoT data set\r\nexplains what entity types the data consists of |
| | | and what attributes the entities have.\r\n\r\nThe entities are |
| | | represented as JSON. For example an entity representing an\r\nelectric |
| | | bus from one of the CityIoT data sets looks like this with only part |
| | | of\r\nthe attributes included:\r\n\r\n {\r\n \"id\": |
| | | \"Vehicle:TKL16\",\r\n \"type\": \"Vehicle\",\r\n |
| | | \"vehicleType\": {\r\n \"value\": \"bus\"\r\n },\r\n |
| | | \"name\": {\r\n \"value\": \"TKL16\"\r\n },\r\n |
| | | \"location\": {\r\n \"type\": \"geo:json\",\r\n |
| | | \"value\": {\r\n \"type\": \"Point\",\r\n |
| | | \"coordinates\": [23.769203333333333, 61.49531666666667]\r\n |
| | | },\r\n \"metadata\": {\r\n \"timestamp\": |
| | | {\r\n \"type\": \"DateTime\",\r\n |
| | | \"value\": \"2019-04-03T14:52:18.192881Z\"\r\n }\r\n |
| | | }\r\n },\r\n \"speed\": {\r\n \"value\": |
| | | 34.5,\r\n \"metadata\": {\r\n \"timestamp\": |
| | | {\r\n \"type\": \"DateTime\",\r\n |
| | | \"value\": \"2019-04-03T14:52:19.867419Z\"\r\n }\r\n |
| | | }\r\n }, \r\n \"power\": {\r\n |
| | | \"value\": 75.70000000000027,\r\n \"metadata\": {\r\n |
| | | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n |
| | | \"value\": \"2019-04-03T14:52:20.218114Z\"\r\n }\r\n |
| | | }\r\n },\r\n \"chargeState\": {\r\n |
| | | \"value\": 87,\r\n \"metadata\": {\r\n |
| | | \"timestamp\": {\r\n \"type\": \"DateTime\",\r\n |
| | | \"value\": \"2019-04-03T14:52:16.938936Z\"\r\n }\r\n |
| | | }\r\n }\r\n }\r\n\r\n\r\n## The Orion context |
| | | broker\r\n\r\nThe Orion context broker stores the latest versions of |
| | | all entities. Its API is\r\nused to query information about the |
| | | entities or subscribe to changes in their\r\nattributes. The Tampere |
| | | CityIoT Orion API is available at the |
| | | URL\r\nhttps://tlt-cityiot.rd.tuni.fi/orion/\r\n\r\nTo separate the |
| | | entities of the different data sets, Orions multi tenancy\r\nfeature |
| | | is used. Data is separated into different services and under a |
| | | service\r\nhierarchical service paths can be used for more |
| | | fine-grained data organization.\r\nIn API calls the service and |
| | | service path are given in HTTP headers:\r\n`Fiware-Service` for the |
| | | service and `Fiware-ServicePath` for the service path. For\r\naccess |
| | | control API keys are used. The API key is given in the `apikey` HTTP |
| | | header.\r\nDocumentation for each data set tells what service is used |
| | | and how service paths\r\nare used. You can get an API key by |
| | | requesting access to a data set from the\r\nmaintainer of the data |
| | | set. As an example how all this works in practice, the\r\n[Tampere |
| | | electric |
| | | ckan.energydata.rd.tuni.fi/dataset/tampere-electric-bus-pilot)\r\ndata |
| | | set has entities representing electric buses in service |
| | | public_transport\r\nunder the service path /Tampere/electric_bus. |
| | | Using the command line HTTP client\r\ncurl, this is how to get all the |
| | | electric bus entities and their attributes from\r\nOrion:\r\n\r\n |
| | | curl -H 'Fiware-Service: public_transport' -H 'Fiware-ServicePath: |
| | | /Tampere/electric_bus' -H 'apikey: your_apikey' |
| | | \"https://tlt-cityiot.rd.tuni.fi/orion/v2/entities\"\r\n\r\n## |
| | | QuantumLeap\r\n\r\nQuantumLeap stores the change history of the |
| | | entities in a timeseries database.\r\nThis can then be queried via its |
| | | API. The Tampere CityIoT QuantumLeap is\r\navailable at the URL: |
| | | https://tlt-cityiot.rd.tuni.fi/quantumleap/\r\n\r\nIt uses the same |
| | | service and service path\r\nsystem to organize entities as Orion. The |
| | | same API key based authentication\r\nsystem is also used. See the |
| | | Orion section for more details. For example to Get\r\nall values for |
| | | power and speed for electric bus entity TKL15 between 14:01 and 14:02 |
| | | on\r\n28th of October 2019 with curl the following command would be |
| | | used:\r\n\r\n curl -H 'Fiware-Service: public_transport' -H |
| | | 'Fiware-ServicePath: /Tampere/electric_bus' -H 'apikey: your_apikey' |
| | | ed,power&&fromDate=2019-10-28T12:01:00&&toDate=2019-10-28T12:02:00\"", |
| "id": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | | "id": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", |
| "image_url": "", | | "image_url": "", |
| "is_organization": true, | | "is_organization": true, |
| "name": "cityiot", | | "name": "cityiot", |
| "state": "active", | | "state": "active", |
| "title": "CityIoT", | | "title": "CityIoT", |
| "type": "organization" | | "type": "organization" |
| }, | | }, |
| "owner_org": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", | | "owner_org": "ede7b870-2dff-4a89-889e-1bb3980ffa6f", |
| "private": false, | | "private": false, |
| "relationships_as_object": [], | | "relationships_as_object": [], |
| "relationships_as_subject": [], | | "relationships_as_subject": [], |
| "resources": [], | | "resources": [], |
| "state": "active", | | "state": "active", |
| "tags": [ | | "tags": [ |
| { | | { |
| "display_name": "electricity", | | "display_name": "electricity", |
| "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", | | "id": "0c58cb6b-5845-4112-9871-6adda7eaac59", |
| "name": "electricity", | | "name": "electricity", |
| "state": "active", | | "state": "active", |
| "vocabulary_id": null | | "vocabulary_id": null |
| }, | | }, |
| { | | { |
| "display_name": "street light", | | "display_name": "street light", |
| "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", | | "id": "90cb5931-2582-4ea0-a5dd-c0aa32bea5a4", |
| "name": "street light", | | "name": "street light", |
| "state": "active", | | "state": "active", |
| "vocabulary_id": null | | "vocabulary_id": null |
| }, | | }, |
| { | | { |
| "display_name": "tampere", | | "display_name": "tampere", |
| "id": "c4067e38-120f-428f-8175-6e7196e617b8", | | "id": "c4067e38-120f-428f-8175-6e7196e617b8", |
| "name": "tampere", | | "name": "tampere", |
| "state": "active", | | "state": "active", |
| "vocabulary_id": null | | "vocabulary_id": null |
| } | | } |
| ], | | ], |
t | "temporal_resolution": "", | t | "temporal_end": "2022-07-10", |
| | | "temporal_resolution": "varies from 1.5 min to 1 hour", |
| | | "temporal_start": "2019-01-11", |
| "title": "Tampere Viinikka smart street light pilot", | | "title": "Tampere Viinikka smart street light pilot", |
| "type": "dataset", | | "type": "dataset", |
| "url": "", | | "url": "", |
| "version": "" | | "version": "" |
| } | | } |