The MultiflexMeter import function (<importType>MultiflexMeter</importType>) imports scalar time series from the MultiflexMeter servce (https://www.multiflexmeter.nl/). The service provides timeSeries data in JSON format.
To Import MultiflexMeter data, a timeSeriesImportRun has to be configured.
The following parts of the import configuration are important:
importType: MultiflexMeter
serverUrl: https://portal.multiflexmeter.net/api/v1/timeseries/{locationId}/?resolution=30s
The tag {locationId} will be replaced by FEWS with the configured locations in the timeSeriesSet.
The username and the password of the multiflexmeter api should be provided in the global.properties.
It is assumed that all timeseries responses are in the following format.
{
"time": "2019-09-18T12:16:30Z",
"mean_value": 159
} |
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
<import>
<general>
<importType>MultiflexMeter</importType>
<serverUrl>https://portal.multiflexmeter.net/api/v1/timeseries/{locationId}/?resolution=30s</serverUrl>
<user>dummy_user</user>
<password>dummy_password</password>
<relativeViewPeriod unit="hour" start="-24" end="0" startOverrulable="true"/>
<idMapId>IdImportMultiFlex</idMapId>
<missingValue>65535.0</missingValue>
<dataFeedId>Multiflex Meter</dataFeedId>
</general>
<timeSeriesSet>
<moduleInstanceId>ImportMultiflexMeter</moduleInstanceId>
<valueType>scalar</valueType>
<parameterId>T.obs</parameterId>
<locationSetId>MultiflexMeterLocations</locationSetId>
<timeSeriesType>external historical</timeSeriesType>
<timeStep unit="nonequidistant"></timeStep>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
</import>
</timeSeriesImportRun>
|
An example of a MultiflexMeter json response can be seen here:
{
"count": 2,
"points": [
{
"time": "2019-09-18T12:14:30Z",
"mean_value": 58
},
{
"time": "2019-09-18T12:15:00Z",
"mean_value": 37
}
]
} |