Responsive image Responsive image

CityIoT - Alusta

6Aika: Tulevaisuuden toimijariippumaton dataintegraatioalusta · cityiot.fi

Tälle sivustolle on koottu teknisiä tietoja pilotointialustasta, sen komponenteista ja avoimesta datasta. Sivuston sisältöä muokataan ja laajennetaan hankkeen edetessä.

Lisätietoja hankkeesta sivustolla cityiot.fi.

Rajoitukset

Alusta on jatkuvan kehitystyön alla. Alustan käyttäjien on suositeltavaa varautua seuraaviin tilanteisiin.

  • Alustalle tallennettu data ei välttämättä säily
  • Alusta ei välttämättä ole saavutettavissa kaiken aikaa
  • Pääsyä alustan toimintoihin on rajoitettu
  • Käytettävät komponentit saattavat vaihtua

Pilotointialusta

Yleinen kuvaus pilotointialustasta ja datavirroista


Yleinen kuvaus alustasta


IoT-laitteen ja Context brokerin välinen kommunikaatio


https://github.com/telefonicaid/iotagent-node-lib#device-to-ngsi-mapping

Lähde: FIWARE IoT Agent Framework - Device to NGSI Mapping


Datalähteen integraatio

1. Suunnittelu

Toimivan kokonaisuuden kannalta on tärkeää suunnitella käytettävät tietorakenteet ja tiedon ryhmittely kunnolla. Onnistunut suunnittelu mahdollistaa kerätyn datan sujuvan ja monipuolisen hyödyntämisen.

Tässä esimerkissä otetaan huomioon vain yksittäinen mittauspiste eikä sen ympärille tuoda kaikkea kuvaavan kontekstin luomiseksi.

A) Liittyvä dokumentaatio
B) Datamallit
C) Suunnittelussa otettava huomioon
  • Datan hyödyntäjä tarvitsee datan lisäksi myös niin sanottua metadataa eli tietoa datasta. Alla muutamia esimerkkejä.
    • Mistä data on peräisin?
    • Milloin yksittäinen arvo on syntynyt?
    • Mikä on mittalaitteen virhemarginaali?
    • Millä laitteella mittaus on tehty?
    • Missä yksiköissä mittaustulos ilmoitetaan?
D) Esimerkki - Ilmanlaatu
{
    "id": "rio202",
    "type": "AirQualityObserved",
    "TimeInstant": {
        "type": "ISO8601",
        "value": "2018-11-14T09:10:06.00Z",
        "metadata": {}
    },
    "co2": {
        "type": "Number",
        "value": 1198,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-14T09:10:06.877Z"
            },
            "description": {
                "type": "Text",
                "value": "Room 202 - Carbon dioxide concentration"
            },
            "unitCode": {
                "type": "Text",
                "value": "59"
            }
        }
    },
    "relativeHumidity": {
        "type": "Percentage",
        "value": "26.6",
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-14T09:10:06.877Z"
            },
            "description": {
                "type": "Text",
                "value": "Room 202 - Relative humidity"
            },
            "unitCode": {
                "type": "Text",
                "value": "P1"
            }
        }
    },
    "temperature": {
        "type": "Number",
        "value": 21.1,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-14T09:10:06.877Z"
            },
            "description": {
                "type": "Text",
                "value": "Room 202 - Temperature"
            },
            "unitCode": {
                "type": "Text",
                "value": "CEL"
            }
        }
    },
    "voc": {
        "type": "Number",
        "value": 107,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-14T09:10:06.877Z"
            },
            "description": {
                "type": "Text",
                "value": "Room 202 - Total Volatile Organic Compound"
            },
            "unitCode": {
                "type": "Text",
                "value": "61"
            }
        }
    }
}

2. Entiteetin rekisteröinti

Uuden entiteein rekisteröintiin vaaditaan

A) Rekisteröinti

Entiteetin rekisteröinti

curl -X 'POST' -H 'Content-Type: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' -d '{"source": {"type": "Text", "value": "Pointer to a physical place where data has been collected."}, "type": "AirQualityObserved", "id": "b3ea", "location": {"type": "geo:json", "value": {"type": "Point", "coordinates": [65.0459409, 25.586883]}}}' 'http://{PLATFORM_DOMAIN}:8000/orion/v2/entities'

Edellä oleva auki purettuna

POST http://{PLATFORM_DOMAIN}:8000/orion/v2/entities

Headers: 
{
  "Fiware-Service": "air_quality_def8",
  "Content-Type": "application/json",
  "Fiware-ServicePath": "/air"
}

Payload: 
{
  "source": {
    "type": "Text",
    "value": "Pointer to a physical..."
  },
  "type": "AirQualityObserved",
  "id": "b3ea",
  "location": {
    "type": "geo:json",
    "value": {
      "type": "Point",
      "coordinates": [
        65.0459409,
        25.586883
      ]
    }
  }
}
B) Rekisteröidyn entiteetin hakeminen Orion Contecxt Brokerilta
curl -X 'GET' -H 'Accept: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' 'http://{PLATFORM_DOMAIN}:8000/orion/v2/entities/b3ea'

Vastaus pyyntöön

{
  "id": "b3ea",
  "location": {
    "metadata": {},
    "type": "geo:json",
    "value": {
      "coordinates": [
        65.0459409,
        25.586883
      ],
      "type": "Point"
    }
  },
  "source": {
    "metadata": {},
    "type": "Text",
    "value": "Pointer to a physical..."
  },
  "type": "AirQualityObserved"
}

3. Palvelukonfiguraation rekisteröinti IoT Agentille

Uuden palvelukonfiguraation rekisteröintiin vaaditaan

A) Rekisteröinti

Palvelukonfiguraation rekisteröinti

curl -X 'POST' -H 'Content-Type: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' -d '{"services": [{"apikey": "sensors-def8", "resource": "/iot/d", "entity_type": "AirQualityObserved", "cbroker": "http://{PLATFORM_DOMAIN}:8000/orion"}]}' 'http://{PLATFORM_DOMAIN}:8000/idasmgmt/iot/services'

Edellä oleva auki purettuna

POST http://{PLATFORM_DOMAIN}:8000/idasmgmt/iot/services

Headers: 
{
  "Fiware-Service": "air_quality_def8",
  "Content-Type": "application/json",
  "Fiware-ServicePath": "/air"
}

Payload: 
{
  "services": [
    {
      "apikey": "sensors-def8",
      "resource": "/iot/d",
      "entity_type": "AirQualityObserved",
      "cbroker": "http://{PLATFORM_DOMAIN}:8000/orion"
    }
  ]
}

4. Sensorin tai useita sensoreita sisältävän laitteen rekisteröinti IoT Agentille

Uuden sensorin tai useita sensoreita sisältävän laitten rekisteröintiin vaaditaan

A) Rekisteröinti

Laitteen rekisteröinti

curl -X 'POST' -H 'Content-Type: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' -d '{"devices": [{"protocol": "UL20", "entity_name": "b3ea", "entity_type": "AirQualityObserved", "timezone": "Europe/Helsinki", "attributes": [{"type": "Number", "name": "temperature", "object_id": "temp"}, {"type": "Percentage", "name": "relativeHumidity", "object_id": "humidity"}, {"type": "Percentage", "name": "CO2", "object_id": "co2"}, {"type": "Text", "name": "airQualityLevel", "object_id": "aql"}, {"type": "Number", "name": "airQualityIndex", "object_id": "aqi"}], "device_id": "b3ea-118a"}]}' 'http://{PLATFORM_DOMAIN}:8000/idasmgmt/iot/devices'

Edellä oleva auki purettuna

POST http://{PLATFORM_DOMAIN}:8000/idasmgmt/iot/devices

Headers: 
{
  "Fiware-Service": "air_quality_def8",
  "Content-Type": "application/json",
  "Fiware-ServicePath": "/air"
}

Payload: 
{
  "devices": [
    {
      "protocol": "UL20",
      "entity_name": "b3ea",
      "entity_type": "AirQualityObserved",
      "timezone": "Europe/Helsinki",
      "attributes": [
        {
          "type": "Number",
          "name": "temperature",
          "object_id": "temp"
        },
        {
          "type": "Percentage",
          "name": "relativeHumidity",
          "object_id": "humidity"
        },
        {
          "type": "Percentage",
          "name": "CO2",
          "object_id": "co2"
        },
        {
          "type": "Text",
          "name": "airQualityLevel",
          "object_id": "aql"
        },
        {
          "type": "Number",
          "name": "airQualityIndex",
          "object_id": "aqi"
        }
      ],
      "device_id": "b3ea-118a"
    }
  ]
}

5. Attribuuttien metadatan täydentäminen

Metadatan lisäämiseen tarvitaan

A) Metadatan lisääminen laitteiden rekisteröinnin tuottamille attribuuteille

Metadatan lisääminen lämpötilaa kuvaavalle attriuutille

curl -X 'PUT' -H 'Content-Type: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' -d '{"type": "Number", "value": 0, "metadata": {"unitCode": {"type": "Text", "value": "CEL"}, "description": {"type": "Text", "value": "Temperature is a physical quantity expressing hot and cold. Temperature is measured with a thermometer, historically calibrated in various temperature scales and units of measurement. [Wikipedia]"}}}' 'http://{PLATFORM_DOMAIN}:8000/orion/v2/entities/b3ea/attrs/temperature'

Edellä oleva auki purettuna

PUT http://{PLATFORM_DOMAIN}:8000/orion/v2/entities/b3ea/attrs/temperature

Headers: 
{
  "Fiware-Service": "air_quality_def8",
  "Content-Type": "application/json",
  "Fiware-ServicePath": "/air"
}

Payload: 
{
  "type": "Number",
  "value": 0,
  "metadata": {
    "unitCode": {
      "type": "Text",
      "value": "CEL"
    },
    "description": {
      "type": "Text",
      "value": "Temperature is a physical..."
    }
  }
}
B) Lisättyn metadatan tarkistaminen

Curl-esimerkki pyynnöstä

curl -X 'GET' -H 'Accept: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' 'http://{PLATFORM_DOMAIN}:8000/orion/v2/entities/b3ea'

Vastaus pyyntöön

{
  "CO2": {
    "metadata": {
      "description": {
        "type": "Text",
        "value": "Carbon dioxide is..."
      }
    },
    "type": "Percentage",
    "value": " "
  },
  "TimeInstant": {
    "metadata": {},
    "type": "ISO8601",
    "value": " "
  },
  "airQualityIndex": {
    "metadata": {
      "description": {
        "type": "Text",
        "value": "Air quality index..."
      },
      "referenceSpecification": {
        "type": "URL",
        "value": "https://airnow.gov/index.cfm"
      }
    },
    "type": "Number",
    "value": 0
  },
  "airQualityLevel": {
    "metadata": {
      "description": {
        "type": "Text",
        "value": "Overall qualitative level..."
      },
      "referenceSpecification": {
        "type": "URL",
        "value": "https://airnow.gov/index.cfm"
      }
    },
    "type": "Text",
    "value": " "
  },
  "id": "b3ea",
  "location": {
    "metadata": {},
    "type": "geo:json",
    "value": {
      "coordinates": [
        65.0459409,
        25.586883
      ],
      "type": "Point"
    }
  },
  "relativeHumidity": {
    "metadata": {
      "description": {
        "type": "Text",
        "value": "Relative humidity is..."
      }
    },
    "type": "Percentage",
    "value": " "
  },
  "source": {
    "metadata": {},
    "type": "Text",
    "value": "Pointer to a physical place where data has been collected."
  },
  "temperature": {
    "metadata": {
      "description": {
        "type": "Text",
        "value": "Temperature is a physical..."
      },
      "unitCode": {
        "type": "Text",
        "value": "CEL"
      }
    },
    "type": "Number",
    "value": 0
  },
  "type": "AirQualityObserved"
}

6. Datalähetyksen testaus

Datan lähettämiseen tarvitaan

A) Datan lähetys UltraLight2.0 protokollaa hyödyntäen

Datan lähetys

curl -X 'POST' -H 'Content-Type: text/plain' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' -d 'temp|17.6|humidity|0.32|co2|0.05784|aql|moderate|aqi|64.0' 'http://{PLATFORM_DOMAIN}:8000/idasdata/iot/d?k=sensors-def8&i=b3ea-118a'

Edellä oleva auki purettuna

POST http://{PLATFORM_DOMAIN}:8000/idasdata/iot/d?k=sensors-def8&i=b3ea-118a

Headers: 
{
  "Fiware-Service": "air_quality_def8",
  "Content-Type": "text/plain",
  "Fiware-ServicePath": "/air"
}

Payload: 
temp|17.6|humidity|0.32|co2|0.05784|aql|moderate|aqi|64.0

7. Viimeisimmän datan hakeminen Context Brokerilta

A) Ajantasaisimman kontekstitiedon hakeminen Context Brokerilta
curl -X 'GET' -H 'Accept: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' 'http://{PLATFORM_DOMAIN}:8000/orion/v2/entities/b3ea'

Vastaus pyyntöön

{
  "CO2": {
    "metadata": {
      "TimeInstant": {
        "type": "ISO8601",
        "value": "2018-07-02T10:42:24.814Z"
      },
      "description": {
        "type": "Text",
        "value": "Carbon dioxide is..."
      }
    },
    "type": "Percentage",
    "value": "0.05784"
  },
  "TimeInstant": {
    "metadata": {},
    "type": "ISO8601",
    "value": "2018-07-02T10:42:24.00Z"
  },
  "airQualityIndex": {
    "metadata": {
      "TimeInstant": {
        "type": "ISO8601",
        "value": "2018-07-02T10:42:24.814Z"
      },
      "description": {
        "type": "Text",
        "value": "Air quality index..."
      },
      "referenceSpecification": {
        "type": "URL",
        "value": "https://airnow.gov/index.cfm"
      }
    },
    "type": "Number",
    "value": 64
  },
  "airQualityLevel": {
    "metadata": {
      "TimeInstant": {
        "type": "ISO8601",
        "value": "2018-07-02T10:42:24.814Z"
      },
      "description": {
        "type": "Text",
        "value": "Overall qualitative level..."
      },
      "referenceSpecification": {
        "type": "URL",
        "value": "https://airnow.gov/index.cfm"
      }
    },
    "type": "Text",
    "value": "moderate"
  },
  "id": "b3ea",
  "location": {
    "metadata": {},
    "type": "geo:json",
    "value": {
      "coordinates": [
        65.0459409,
        25.586883
      ],
      "type": "Point"
    }
  },
  "relativeHumidity": {
    "metadata": {
      "TimeInstant": {
        "type": "ISO8601",
        "value": "2018-07-02T10:42:24.814Z"
      },
      "description": {
        "type": "Text",
        "value": "Relative humidity is..."
      }
    },
    "type": "Percentage",
    "value": "0.32"
  },
  "source": {
    "metadata": {},
    "type": "Text",
    "value": "Pointer to a physical..."
  },
  "temperature": {
    "metadata": {
      "TimeInstant": {
        "type": "ISO8601",
        "value": "2018-07-02T10:42:24.814Z"
      },
      "description": {
        "type": "Text",
        "value": "Temperature is a physical..."
      },
      "unitCode": {
        "type": "Text",
        "value": "CEL"
      }
    },
    "type": "Number",
    "value": 17.6
  },
  "type": "AirQualityObserved"
}

6. Datan pitkäaikaisvarastointi STH-Comet komponenttia hyödyntäen

Varastointi toteutetaa tilaamalla dataa koskevat muutokset Orion Context Brokerilta. Ilmoitukset ohjataan STH-Comet komponentille.

Muutosten tilaamiseen tarvitaan

A) Muutosten tilaaminen
curl -X 'POST' -H 'Content-Type: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' -d '{"throttling": 5, "notification": {"attrsFormat": "legacy", "http": {"url": "http://{STH_COMET_HOST}/notify"}, "attrs": ["temperature", "relativeHumidity"]}, "expires": "2019-07-01T10:00:00.00Z", "description": "Subscription to collect data available via FiwareServicePath /air with Entity type AirQualityObserved", "subject": {"entities": [{"idPattern": ".*", "type": "AirQualityObserved"}], "condition": {"attrs": ["temperature", "relativeHumidity"]}}}' 'http://pan0108.panoulu.net:8000/orion/v2/subscriptions'

Edellä oleva auki purettuna

POST http://{PLATFORM_DOMAIN}:8000/orion/v2/subscriptions

Headers: 
{
  "Fiware-Service": "air_quality_def8",
  "Fiware-ServicePath": "/air",
  "Accept": "application/json"
}

Payload: 
{
  "throttling": 5,
  "notification": {
    "attrsFormat": "legacy",
    "http": {
      "url": "http://{STH_COMET_HOST}/notify"
    },
    "attrs": [
      "temperature",
      "relativeHumidity"
    ]
  },
  "expires": "2019-07-01T10:00:00.00Z",
  "description": "Subscription to collect data available via FiwareServicePath /air with Entity type AirQualityObserved",
  "subject": {
    "entities": [
      {
        "idPattern": ".*",
        "type": "AirQualityObserved"
      }
    ],
    "condition": {
      "attrs": [
        "temperature",
        "relativeHumidity"
      ]
    }
  }
}

Datan hyödyntäminen

1. Oulun säätila

A) Muutosten tilaaminen Context Brokerilta

Muutosten tilaaminen on suositeltu tapa ajantasaisimman datan seuraamiseen. Muutokset voi tilata Orion Context Brokerin Subscribtion APIn kautta.

A) Muutosten tilaaminen
curl -X 'POST' -H 'Content-Type: application/json' -H 'Fiware-Service: air_quality_def8' -H 'Fiware-ServicePath: /air' -d '{"throttling": 5, "notification": {"http": {"url": "http://{RECEIPENT_HOST}/notify"}, "attrs": ["temperature", "relativeHumidity"]}, "expires": "2019-07-01T10:00:00.00Z", "description": "Subscription to collect data available via FiwareServicePath /air with Entity type AirQualityObserved", "subject": {"entities": [{"idPattern": ".*", "type": "AirQualityObserved"}], "condition": {"attrs": ["temperature", "relativeHumidity"]}}}' 'http://pan0108.panoulu.net:8000/orion/v2/subscriptions'

Edellä oleva auki purettuna

POST http://{PLATFORM_DOMAIN}:8000/orion/v2/subscriptions

Headers: 
{
  "Fiware-Service": "air_quality_def8",
  "Fiware-ServicePath": "/air",
  "Accept": "application/json"
}

Payload: 
{
  "throttling": 5,
  "notification": {
    "http": {
      "url": "http://{RECEIPENT_HOST}/notify"
    },
    "attrs": [
      "temperature",
      "relativeHumidity"
    ]
  },
  "expires": "2019-07-01T10:00:00.00Z",
  "description": "Subscription to collect data available via FiwareServicePath /air with Entity type AirQualityObserved",
  "subject": {
    "entities": [
      {
        "idPattern": ".*",
        "type": "AirQualityObserved"
      }
    ],
    "condition": {
      "attrs": [
        "temperature",
        "relativeHumidity"
      ]
    }
  }
}
B) Ajantasaisimman säätiedon hakeminen Context Brokerilta
curl -X 'GET' -H 'Accept: application/json' -H 'Fiware-Service: weather' -H 'Fiware-ServicePath: /oulu' 'http://{PLATFORM_DOMAIN}:8000/orion/v2/entities/0e72'

Vastaus pyyntöön

{
    "id": "0e72",
    "type": "WeatherObserved",
    "TimeInstant": {
        "type": "ISO8601",
        "value": "2018-11-09T13:24:22.00Z",
        "metadata": {}
    },
    "atmosphericPressure": {
        "type": "Number",
        "value": 1023,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-09T13:24:22.939Z"
            },
            "unitCode": {
                "type": "Text",
                "value": "A97"
            }
        }
    },
    "dateObserved": {
        "type": "DateTime",
        "value": "2018-06-14T10:18:16.00Z",
        "metadata": {}
    },
    "name": {
        "type": "Text",
        "value": "OpenWeathermapAPI",
        "metadata": {}
    },
    "relativeHumidity": {
        "type": "Number",
        "value": 93,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-09T13:24:22.939Z"
            },
            "unitCode": {
                "type": "Text",
                "value": "P1"
            }
        }
    },
    "source": {
        "type": "Text",
        "value": "RaspberryPi",
        "metadata": {}
    },
    "temperature": {
        "type": "Number",
        "value": 6,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-09T13:24:22.939Z"
            },
            "unitCode": {
                "type": "Text",
                "value": "CEL"
            }
        }
    },
    "weatherType": {
        "type": "Text",
        "value": "Rain",
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-09T13:24:22.939Z"
            }
        }
    },
    "windDirection": {
        "type": "Number",
        "value": 140,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-09T13:24:22.939Z"
            },
            "unitCode": {
                "type": "Text",
                "value": "DD"
            }
        }
    },
    "windSpeed": {
        "type": "Number",
        "value": 2.1,
        "metadata": {
            "TimeInstant": {
                "type": "ISO8601",
                "value": "2018-11-09T13:24:22.939Z"
            },
            "unitCode": {
                "type": "Text",
                "value": "MTS"
            }
        }
    }
}
C) Säätietojen hakeminen STH-Comet pitkäaikaisvarastosta - Raakadata
curl -X 'GET' -H 'Accept: application/json' -H 'Fiware-Service: weather' -H 'Fiware-ServicePath: /oulu' 'http://{PLATFORM_DOMAIN}:8000/comet/STH/v1/contextEntities/type/WeatherObserved/id/0e72/attributes/temperature?lastN=5'

Vastaus pyyntöön

{
  "contextResponses": [
    {
      "contextElement": {
        "attributes": [
          {
            "name": "temperature",
            "values": [
              {
                "recvTime": "2018-11-09T13:04:15.965Z",
                "attrType": "Number",
                "attrValue": "6"
              },
              {
                "recvTime": "2018-11-09T13:09:19.842Z",
                "attrType": "Number",
                "attrValue": "6"
              },
              {
                "recvTime": "2018-11-09T13:14:20.523Z",
                "attrType": "Number",
                "attrValue": "6"
              },
              {
                "recvTime": "2018-11-09T13:19:22.420Z",
                "attrType": "Number",
                "attrValue": "6"
              },
              {
                "recvTime": "2018-11-09T13:24:22.939Z",
                "attrType": "Number",
                "attrValue": "6"
              }
            ]
          }
        ],
        "id": "0e72",
        "isPattern": false,
        "type": "WeatherObserved"
      },
      "statusCode": {
        "code": "200",
        "reasonPhrase": "OK"
      }
    }
  ]
}
D) Säätietojen hakeminen STH-Comet pitkäaikaisvarastosta - Aggregoidut aikasarjat
curl -X 'GET' -H 'Accept: application/json' -H 'Fiware-Service: weather' -H 'Fiware-ServicePath: /oulu' 'http://{PLATFORM_DOMAIN}:8000/comet/STH/v1/contextEntities/type/WeatherObserved/id/0e72/attributes/temperature?aggrMethod=max&aggrPeriod=hour&dateFrom=2018-10-10T00:00:00.000Z&dateTo=2018-10-10T23:59:59.999Z'

Vastaus pyyntöön

{
  "contextResponses": [
    {
      "contextElement": {
        "attributes": [
          {
            "name": "temperature",
            "values": [
              {
                "_id": {
                  "origin": "2018-10-10T00:00:00.000Z",
                  "resolution": "hour"
                },
                "points": [
                  {
                    "offset": 0,
                    "samples": 12,
                    "max": 7
                  },
                  {
                    "offset": 1,
                    "samples": 12,
                    "max": 8
                  },
                  {
                    "offset": 2,
                    "samples": 12,
                    "max": 8
                  },
                  {
                    "offset": 3,
                    "samples": 12,
                    "max": 7
                  },
                  {
                    "offset": 4,
                    "samples": 12,
                    "max": 7
                  },
                  {
                    "offset": 5,
                    "samples": 12,
                    "max": 7
                  },
                  {
                    "offset": 6,
                    "samples": 12,
                    "max": 8
                  },
                  {
                    "offset": 7,
                    "samples": 12,
                    "max": 8
                  },
                  {
                    "offset": 8,
                    "samples": 12,
                    "max": 9
                  },
                  {
                    "offset": 9,
                    "samples": 12,
                    "max": 9
                  },
                  {
                    "offset": 10,
                    "samples": 12,
                    "max": 9
                  },
                  {
                    "offset": 11,
                    "samples": 12,
                    "max": 9
                  },
                  {
                    "offset": 12,
                    "samples": 12,
                    "max": 9
                  },
                  {
                    "offset": 13,
                    "samples": 12,
                    "max": 9
                  },
                  {
                    "offset": 14,
                    "samples": 12,
                    "max": 9
                  },
                  {
                    "offset": 15,
                    "samples": 12,
                    "max": 8
                  },
                  {
                    "offset": 16,
                    "samples": 12,
                    "max": 7
                  },
                  {
                    "offset": 17,
                    "samples": 12,
                    "max": 7
                  },
                  {
                    "offset": 18,
                    "samples": 12,
                    "max": 6
                  },
                  {
                    "offset": 19,
                    "samples": 12,
                    "max": 6
                  },
                  {
                    "offset": 20,
                    "samples": 12,
                    "max": 6
                  },
                  {
                    "offset": 21,
                    "samples": 12,
                    "max": 6
                  },
                  {
                    "offset": 22,
                    "samples": 12,
                    "max": 6
                  },
                  {
                    "offset": 23,
                    "samples": 12,
                    "max": 6
                  }
                ]
              }
            ]
          }
        ],
        "id": "0e72",
        "isPattern": false,
        "type": "WeatherObserved"
      },
      "statusCode": {
        "code": "200",
        "reasonPhrase": "OK"
      }
    }
  ]
}

Yhteys

CityIoT - Alusta

6Aika: Tulevaisuuden toimijariippumaton dataintegraatioalusta · cityiot.fi