Versions Compared

Key

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

...

This is a proposed format for bulk uploading sensors. To be vetted and verified with Ensemble folks.

Column

Valid inputs

Possible errors

ID

1 <= id.length <= 20

“Sensor with id <id> already exists.”

“Sensor id invalid, must be between 1 and 20 characters”

Name

1 <= name.length <= 100

“Sensor name invalid, must be between 1 and 100 characters”

Lat_long

-90 <= lat <= 90

-180 <= long <= 180

“Invalid format for lat_long, must be: 1.2345, 6.7890”

“Invalid lat entry, must be between -90 and 90.”

“Invalid long entry, must be between -180 and 180.”

Reading_types

At least 1 of the following:

soil_moisture_content, water_potential,

temperature

“Invalid type detected, must be: soil_moisture_content, water_potential, or temperature.”

Depth

0 <= depth <= 500; must be a decimal value. Assumed to be cm.

“Invalid depth, must be a decimal value between 0 and 500.”

Brand

String: < 100 length

“Brand must be fewer than 100 characters.”

Model

String: < 100 length

“Model must be fewer than 100 characters.”

Sensor

ESIDNameName

External ID

Latitude

Longitude

Reading_types

Depth

Brand

Model

Part_number

hardware_version

Description

How the sensor will be labelled in LiteFarm.

The sensor’s unique external id. This is the identity that will be used to register the sensor with external services and receive readings associated with this sensor.

How the sensor will be labelled in LiteFarm.

The latitude for the sensor.

The longitude for the sensor.

Comma delimited list of sensor reading types. Valid values are:

  • soil_water_content

  • soil_water_potential

  • temperature

Assumed to be in cm, only 1 depth per sensor. For this project depths can be 10, 20, 30, 50.

The brand of sensor.

The model of sensor.

Required?Data typeRequired

String

RequiredStringRequired

Decimal

RequiredDecimalRequired

Specific strings

RequiredDecimal

OptionalString

Optional

OptionalString

String

String

Required?

Required

Optional

Required

Required

Required

Optional

Optional

Optional

Optional

Optional

Example

WERKTX

“Sensor 1”

“WERKTX”

-31.3624425225411483624425

-64.210475444875952104754448

soil_water_content, soil_water_potential, temperature

10

“Ensemble Scientific”

“Model ABC”

“ESA-12345”

“B”

Notes

For this project, Morten / Mark will provide us this list.

Where the sensor has been placed in the ground.

Where the sensor has been placed in the ground.

Will need to be grouped on the map. This should be default behaviour since sensors are points.

Not needed for registering with Ensemble. Will already be populated in their cloud.

Not needed for registering with Ensemble. Will already be populated in their cloud.

Not needed for registering with Ensemble. Will already be populated in their cloud.

Not needed for registering with Ensemble. Will already be populated in their cloud.

Definition of a sensor: A device with a single id, name, lat / long, and depth. Must have at least one reading parameter, but may have several. Optionally has a brand and model. Ensemble requires a part_number and hardware_version to register it with their service.

When uploading, LiteFarm needs to perform validation on the uploaded content.

Validation

1 <= name.length <= 100

1 <=

id.length

<= 20

-90 <=

lat

<= 90

-180 <=

long

<= 180

At least 1 of the following:

soil_moisture_content, water_potential,

temperature

0 <=

depth

<= 1000

String: < 100 length

String: < 100 length

String: < 100 length

String: < 100 length

Error

“Invalid sensor name, must be between 1 and 100 characters”

“Sensor with external id: <id> already exists.”

“Invalid external id, must be between 1 and 20 characters”

“Invalid latitude value, must be between -90 and 90. and fewer than 10 decimals”

“Invalid longitude value, must be between -180 and 180. and fewer than 10 decimals”

“Invalid reading type detected, valid values include:

  • soil_moisture_content

  • water_potential

  • temperature.”

“Invalid depth, must be a decimal value between 0 and 1000.”

“Invalid brand, must be fewer than 100 characters.”

“Invalid model, must be fewer than 100 characters.”

“Invalid part_number, must be fewer than 100 characters.”

“Invalid hardware_version, must be fewer than 100 characters.”

Notes

May need to group sensors with same / similar lat / long on the map. This should be default behaviour since sensors are points.

For this project depths can be 10, 20, 30, 50.

If this is “Ensemble Scientific”, it should activate the need to register this sensor during the bulk creation endpoint.

Definition of a sensor: A device with a single id, name, lat / long, and depth. Must have at least one reading parameter, but may have several. Optionally has a brand and model. Ensemble requires a part_number and hardware_version to register it with their service.

Validation should be performed at least via the API and potentially through the UI as well.

...