Versions Compared

Key

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

Sensors are a generic term for any device that takes measurements from its environment and records them for observation. There are numerous use cases on a farm where sensors can be useful. Perhaps most top of mind is measuring rainfall in order to better understand how much water your crops are getting.

...

Sensor

Name

Latitude

Longitude

Reading_types

External_ID

Depth

Brand

Model

Description

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_potential

  • temperature

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.

Assumed to be in cm, only 1 depth per sensor.

The brand of sensor.

The model of sensor.

Data type

String

Decimal

Decimal

Specific strings

String

Decimal

String

String

Required?

Required

Required

Required

Required

OptionalOptional

Required

Optional

Optional

Example

“Sensor 1”

-31.3624425

-64.2104754448

soil_water_potential, temperature

“WERKTX”

10

“Ensemble Scientific”

“Model ABC”

Upload Validation

1 <= name.length <= 100

-90 <=

lat

<= 90

-180 <=

long

<= 180

At least 1 of the following:

  • soil_water_potential

  • temperature

1 <=

id.length

<= 40

0 <=

depth

<= 1000

String: < 100 length

String: < 100 length

Error

“Invalid sensor name, must be between 1 and 100 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_water_potential

  • temperature

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

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

“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.”

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.

...

Sensor_reading

reading_id

location_id

Read_time

created_at

reading_type

value

unit

valid

Description

A unique identifier for this reading.

The location that represents the sensor that created this reading.

The timestamp when this reading was captured on the integrated device.

The timestamp when this reading was created in the LiteFarm database.

The reading type which (should) corresponds with a partner_reading_type

The numerical value of the reading.

The unit that when combined with the value represents the reading.

Boolean value on whether this reading has passed some sort of external QA process.

Required?

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Example

“ce7c5f2c-c77c-11ed-86ec-0242ac120002”

“2ec78a8a-a993-11ed-ac8f-0242ac120002”

2023-03-20 23:55:21.739103+00

2023-03-21 00:10:37.243388+00

“temperature”

20.191444

“Celsius”

FALSE

Notes

Why doesn’t this reference a partner_reading_type?

The above architecture could probably be streamlined.

...