...
Configuring the Import
De import type and have has to be configured in the Import Configuration. A basic example where one location and parameter are imported can be seen in the following XML configuration. The Sencrop API only allows retrieving 1000 measurements for each request. This means the relative view period should never contain more time steps than 1000, otherwise measurments might be missed.
To configure locations, the device id's are required. If they are not known, they can be retrieved by running Delft-FEWS in debug mode. The ids will be written to the log.
Code Block | ||||
---|---|---|---|---|
| ||||
<?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>Sencrop</importType> <serverUrl>https://api.sencrop.com/v1/</serverUrl> <user>$SENCROP<user>dummy_APPLICATION_ID$<username</user> <password>$SENCROP<password>dummy_APPLICATION_SECRET$<password</password> <relativeViewPeriod unit="hour" start="-120" end="0" startOverrulable="true"/> <idMapId>IdImportSencrop</idMapId> <dataFeedId>Sencrop</dataFeedId> </general> <timeSeriesSet> <moduleInstanceId>Import_Sencrop</moduleInstanceId> <valueType>scalar</valueType> <parameterId>RELATIVE_HUMIDITY</parameterId> <locationId>33</locationId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="nonequidistant" /> <readWriteMode>add originals</readWriteMode> </timeSeriesSet> </import> </timeSeriesImportRun> |
...