FarmOS integration, test case


#1

@mdc Had a discussion with Dorn and Mike today about possible useful features within the Our Sci platform, and specifically the app, with FarmOS.

FarmOS already has a native app under development here: https://github.com/farmOS/farmOS-mobile-app . Their focus is on creating a similar experience to the web-based FarmOS on the phone, and making that experience off-line compatible. This includes viewing your farm and assets, but also pushing data (observations, for example) through the app.

There are two potential areas of collaboration which seem to make sense to me:

  1. Using Our Sci app, connect to a FarmOS instance to pull data via API. Use cases would be providing a GPS point and pulling all activities (polygons, observations, etc.) from this area. Or pulling farm metadata or history from this field (planting history, for example). Then, the data can be pushed back to the FarmOS instance. This is particularly useful for Noble for example.

  2. Use Our Sci’s flexible display features (javascript + development environment) either in Our Sci’s app or forked into FarmOS app, to display FarmOS data w/ real-time context.

Use case

A user collects soil carbon data in a field. They use a handheld reflectometer, connecting to the Our Sci app. Before they collect the data, they login to their FarmOS instance. When they begin collecting the data, the app connects to FarmOS instance, pulls the field information, farm name, and 5 year planting history and includes this with the data. User samples soil and takes measurement. They add some additional survey-type information (like visual soil texture). Then the app displays map w/ carbon datapoints in that field over the last 2 year pulled from FarmOS instance, as well as the current datapoint, and the difference between the two (average increase/decrease in carbon).

Once visually confirmed to be a good data point, the user submits the data to the FarmOS instance via the API (possibly as an observation, or a sensor type), and submits it to the Our Sci database which contains carbon datapoints from a wide arrange of farm and non-farm projects.


#2

@gbathree for the implementation of mentioned features the only one which needs some additional thinking is how to integrate user / login into the oursci application, as the only way this is currently possible would be that the user logs in every time the processor runs.

One option would be to have the account information entered in the settings screen and then make it available in the sensor / processor script using a function such as app.env('farmos.credentials').

Also we need to keep in mind that while the sensor script only runs once for sensor data collection, the processor runs everytime, so we need to figure out when the best point in time is to send data to the farmos backend api.