Traceability from seed to product

I have been playing with FarmOS on my own farm for a few years and I have seen that is has great potential for managing data that relates to farming activities. I have recently been employed as the manager/grower of a licensed hydroponic greenhouse cannabis farm and I would like to motivate for the integration of FarmOS as the primary data management tool.

My thinking is that I can record the origin and details of my seeds as a Plantings asset with a unique code. Each time I use from the seeds I would generate a seedlings log which comes of the Plantings asset. This would then generate a transplantings log with a location (tunnel number) which will be linked to all inputs/activities/observations and then finally a harvest log. As this goes on there will be plant selection for cloning and propagation which relates back to the parent seed and would be able to be traced through the lineage tab within the FarmOS hierarchy. Ultimately setting up sensors in the tunnels which provide data on the environmental fluctuations within the tunnel will be neccessary and these data can be used alongside the production logs to refine the production system and provide insight into pest pressure and growth variations.

Things I think would be useful are:

  • If there were ways that barcodes could be scanned using the field kit as part of the tracking module like one can set up with the Open Data Kit (ODK select).

Is anyone doing this for plants in nurseries of any other specific reason?

3 Likes

Hi @MorgsBrew - yes that’s how I would recommend tracking things!

We have discussed the idea of barcodes or other ID tracking (RFID, QR code, etc), and how that would be great to have accessible in Field Kit (perhaps as a new “asset lookup” field module in the future). There is an old related discussion here (actually the first issue in the farmOS issue queue!): https://www.drupal.org/project/farm/issues/2396617

Another piece that will be useful is creating a dedicated “Seed” asset type: https://www.drupal.org/project/farm/issues/3022158

For now, though, just tracking the seed info in the Planting asset itself should work fine. The “Seed” asset type will mainly be useful for tracking seed inventory, which maybe isn’t necessary in your case.

1 Like

I have a prototype of a seed asset type which we’ve been using to track inventory in a small local seed bank. I’ve been trying to iron out more of the details before sharing the module, but might be able to get the current (alpha) version published sooner if it would be timely with folks need…

3 Likes

I am using the method I detailed above but have some questions. When I interact with a specific “Planting” (a seed type), does it make a difference in the way it is handled if I don’t always do so from the “Assets” page to create a seedling/input/activity/transplanting/harvest?

For example, if I create an input log and then link it to a seeding defining the asset and location of the seeding is it the same as going through the Assets page?

To create an output of a single asset (seed batch) that contains all the information related to the time it spent in the system I use the reports page and select the single asset?

So far it’s looking good i Just hope I dont lose ‘stuff’ along the way by not having them linked up properly.

1 Like

if I create an input log and then link it to a seeding defining the asset and location of the seeding is it the same as going through the Assets page?

Yes! Going through the assets page essentially just auto-fills the asset reference for you in the log creation form, so you don’t have to go through that extra step. But it creates the same log in the end, either way.

To create an output of a single asset (seed batch) that contains all the information related to the time it spent in the system I use the reports page and select the single asset?

Do you mean with the “Quantity Report”? If so, yes! I think that would work! You would just filter by Asset Name, and also by Measure (time). So if you are recording time quantities on each log, then it will show all of those that are associated with the asset. Then you can export that as a CSV to tally it up.

So far it’s looking good i Just hope I dont lose ‘stuff’ along the way by not having them linked up properly.

Great! Yea the “linking up” is pretty simple at its core. One very basic way to think about it is: Logs are responsible for all* of the links. The log is what references the asset, and the area. By themselves, Assets and Areas don’t have any links to logs, it’s always the other way around. That’s why I always say “logs are the meat and potatoes of the record keeping”. :slight_smile:

(* I say “all” but there are exceptions to this… but for all intents and purposes I think it answers your question.)

1 Like

Hi Morgan
Fancy seeing you here!
Total necromancy of this thread but people still find it by searching for relevance (like I did now).

We are now using farmOS in this way by tracking everything from the vehicle trip to buy that seed, store it, sow it, track it and produce a resulting product (with product asset now).

Can I recommend you use labelling on your assets (in real life) that link to the farmOS page for that product. I print QR codes that open up the asset page for the traceable entity, from which anyone can then see the parameters and logs for that one thing.

2 Likes

Hi everyone! Thank you for creating this. I think it will be a great improvement if we use it correctly. I’m new to FarmOS and setting it up to manage a small plant nursery. I’d love some advice on how to best structure the setup to track the following workflow:
My propagation stages:

  • New seedlings / cuttings — plants entering the system
  • Media change — substrate is changed during early growth
  • Move to pots / sold bare root — plant either gets potted up or sold as a cutting/T
  • Sold in pot — final sale as a potted plant

I also need to track losses at any stage:

  • Contaminated plants
  • Discarded plants (for any reason — rot, pests, failed cuttings, etc.)

Workflow questions:

What asset and log types would you recommend for modelling these stages? I tried the inventory, but I couldn’t add the different varieties that way. I could only do that on the seedlings. So, I wonder if I should be using Seeding logs, Movement logs, and Activity logs, or is there a better combination?
Is there a recommended way to mark a plant as contaminated or discarded mid-workflow without losing the historical record?
Any tips on using Quantities or Inventory tracking?

Also, we currently have a report on Looker studio, connected to googlesheets that where we keep the data.
Has anyone attempted to connect FarmOS to Google Looker Studio for reporting purposes? We’re currently trying to set up FarmOS data into a Google Sheet via the API as an intermediate step, and then use that sheet as the data source for Looker Studio dashboards.
Specifically, we’d love to know:

Has anyone built a working FarmOS → looker studio sync via the REST or JSON:API?
Is that even possible?

We’re running FarmOS v2 self-hosted. Any examples, module recommendations, workflow templates, or integration tips would be hugely appreciated. Thanks in advance!

2 Likes

Thanks for posting this question @Tania! I think it will be helpful to everyone to walk through some ways this could work in farmOS!

Two high level strategies occur to me;

  1. Track each plant with a separate plant asset - using groups and some custom reporting to track the overall counts.
  2. Track “batches” of plants with a single plant asset - using inventory to keep track of the counts.

The second one is probably a better fit, but has a few caveats.

  • It will be harder to keep track of per-plant operations - like if you needed to break up the media changes into multiple days of work within a single “batch”, you wouldn’t be able to use the plant records themselves to tell which ones had already been repotted (just within the farmOS data).
  • It could be a bit trickier to handle some cases if you need absolute “traceability”. e.g. if you wanted to create a single “batch” of plants from two different seed sources (and still know in farmOS which are derived from which seed), you would either need to model that in farmOS as two separate plant assets or create some other mechanism.

Just to elaborate a bit on what I’m imagining you could do with that second strategy to track this with a small number of plant assets in farmOS and the inventory system…

You would create plant type taxonomy terms for each of your varieties - perhaps with some parent terms to keep things organized.

For each of your existing “batches” of inventory, you would create a plant asset with the plant type set to one of those terms.

For each of those plant assets you would create a log (probably an observation) that records the initial inventory with a count indicating how many seedlings/pots/etc are in that batch.

From there, transplanting, input, and/or activity logs can be used to record the natural progression of those batches towards being ready for sale.

When plants are sold or lost to contamination/discarded, a sale, activity, or observation log can decrement the inventory for those batches.

Batches that become empty can be archived so they do not clutter your current inventory list.

When new batches are created, the parent will either be an existing plant asset or a seed asset. The seed assets could have a parent set to another batch if you harvested them yourself or could be created without a parent and instead have a purchase log that indicates the provenance of the seed.


Hopefully that helps.

Maybe somebody else will chime in on connecting farmOS with Google sheets or this Looker Studio since I don’t have any experience doing that.

2 Likes

Welcome @Tania!

@Symbioquine’s overview is great - start by thinking through that! :slight_smile:

If you go the inventory route, I wanted to mention that Inventory Quick Form, which is configurable so you can make some standardized instances of that for different purposes. More info here:

https://farmos.org/blog/2024/inventory-quick-form/

Here are some thoughts…

A CSV importer (either using the default asset/log importers or making a single custom one) might be an easy/fast way to get plant assets (and their location) into the system on an ongoing basis.

These could be input logs, perhaps. And if they are moving to a new location the input logs can also be “movements” (Movements and location | farmOS).

Sale logs are provided by the farmOS Ledger module (add-on): https://www.drupal.org/project/farm_ledger

Observation logs (which may also be inventory adjustments) would probably be my suggestion.

Never heard of Looker Studio, but here is an example of connecting Google Sheets to the farmOS API by @ktohalloran: Google Apps Script proof-of-concept for connecting farmOS API to Google Sheets

farmOS v4 has just been released. v2 is no longer supported so I would recommend getting updated to v3 and then to v4 as soon as you can! Especially if you want that Inventory Quick Form I described above… :wink:

1 Like

Thank you SO much for all the ideas. I hope I’ll be back with some questions

2 Likes