Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The MultiflexMeter import function (<importType>MultiflexMeter</importType>) imports scalar time series from the MultiflexMeter servce (https://www.multiflexmeter.nl/). The services provides timeSeries data in JSON format.

Configuring the Import

To make the importer known to FEWS, the import module has to be declared in the moduleInstanceDescriptors.xml in the RegionConfigFiles directory of the FEWS configuration:

Code Block
xml
xml
<import>
    <general>
        <importType>MultiflexMeter</importType>
        <serverUrl>https://portal.multiflexmeter.net/api/v1/timeseries/{locationId}/?resolution=30s</serverUrl>
        <user>$MULTIFLEX_METER_USER$</user>
        <password>$MULTIFLEX_METER_PASSWORD$</password>
        <relativeViewPeriod unit="hour" start="-120" end="0" startOverrulable="true"/>
        <idMapId>IdImportMultiFlex</idMapId>
        <dataFeedId>Multiflex Meter</dataFeedId>
    </general>
    <timeSeriesSet>
        <moduleInstanceId>ImportMultiflexMeter</moduleInstanceId>
        <valueType>scalar</valueType>
        <parameterId>water_distance_from_device</parameterId>
        <locationId>mfm1040</locationId>
        <timeSeriesType>external historical</timeSeriesType>
        <timeStep unit="minute" multiplier="30"/>
        <readWriteMode>add originals</readWriteMode>
    </timeSeriesSet>
</import>

An example of a MultiflexMeter json response can be seen here:

Code Block
xml
xml
{
  "count": 2,
  "points": [
    {
      "time": "2019-09-18T12:10:00Z",
      "mean_value": 65535
    },
    {
      "time": "2019-09-18T12:10:30Z",
      "mean_value": 65535
    }
  ]
}