The Farm21 import function (<importType>Farm21</importType>) imports data from the Farm21 API. (since 2021.01).
See also: https://www.farm21.tech/field-sensor
Example JSON file
Each sensor has a unique id. It can be retrieved from the GUI (https://www.farm21.tech/field-sensor) in the groups and sensors when clicking on the sensor id. This is the id the FEWS location id should be mapped to with id mapping.
Mapped json fields
From the json fields, the following parts will be mapped to FEWS:
- id: locationId
- reading.soil_moisture_10: value of the soil moisture 10 parameter.
- reading.soil_moisture_20: value of the soil moisture 20 parameter.
- reading.soil_moisture_30: value of the soil moisture 30 parameter.
- reading.soil_temperature: value of the soil temperature parameter.
- reading.humidity: value of the humidity parameter.
- reading.air_temperature: value of the air temperature parameter.
Configuring the Import
De import type and have 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.
For the password a key has to be generated using the portal of Farm21.
The group id will soon be available on the portal as well. It is required to configure the URL. The groupid is part of the configured URL and should be changed to the group id to be used.