# ▣🔗 Asset Link - Use-case Drive

**URL:** <https://farmos.discourse.group/t/asset-link-use-case-drive/1516>\
**Category:** Development\
**Created:** [February 8, 2023, 7:19pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516 "2023-02-08T19:19:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 8, 2023, 7:19pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/1 "2023-02-08T19:19:00Z")

</div>

**TL;DR;** Please tell me your use-cases for mobile/offline record keeping and I might implement demonstration Asset Link plugins for some of them.

**Context:** I’m reaching a point in Asset Link development where I need to stretch a bit and experiment implementing a bunch of plugins to help verify that the API and extension model is sufficiently flexible.

For background, check out: [▣🔗 Asset Link dev log](https://farmos.discourse.group/t/asset-link-dev-log/1175)

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 8, 2023, 8:04pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/2 "2023-02-08T20:04:11Z")

</div>

Two off the top of my head, because they are part of my daily routine… 🙂

- Recording egg harvests
- Recording precipitation from a rain gauge

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 8, 2023, 10:46pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/3 "2023-02-08T22:46:22Z")

</div>

Being able to take quick pictures and associate them with logs is also something I want to be able to do a lot of the time.

---

<div class="post-metadata">

**Author:** ![Farmer-Ed](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/farmer-ed/32/662_2.png) [@Farmer-Ed](https://farmos.discourse.group/u/Farmer-Ed)\
**Post date:** [February 9, 2023, 7:27am UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/4 "2023-02-09T07:27:36Z")

</div>

Here’s a few I’m working on/planned for my own project so don’t build on account of me, but ideas just the same.

- Inventory usage (Bales/feed, medicine cabinet etc.)
- Livestock Weighing (Possible bluetooth scales / EID integration?)
- Livestock Fertility (Heats / Service / Births etc)
- Feed/medical group creation (maybe EID reader)
- Grazing / silage Plans

I guess most of what I’ve seen of Asset Link has been data entry but some reports screens might be nice too.

- Livestock Due Dates / Recent Births
- Medical Reports (meat/other produce withdrawal dates)
- Current Stock / mobs
- Grazing / silage Plans
- Soil / other Lab Tests
- Fertilizer application

My ideas may be a little livestock centric 🤔

---

<div class="post-metadata">

**Author:** ![Farmer-Ed](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/farmer-ed/32/662_2.png) [@Farmer-Ed](https://farmos.discourse.group/u/Farmer-Ed)\
**Post date:** [February 9, 2023, 7:30am UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/5 "2023-02-09T07:30:12Z")

</div>

Agreed from what testing I have done with Asset Link, the camera / photo integration is one of the most interesting features.

---

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [February 9, 2023, 8:24am UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/6 "2023-02-09T08:24:37Z")

</div>

Awesome!!

Since I’ve never tried it, it’s not easy to think of use cases apart from general recordkeeping.  
But crop related recordkeeping comes to my mind. I haven’t used farmOS for crops yet, but I will start this year.  
I think Asset Link can contribute here.

The plant/seed is an asset beeing “moved around” (Seeded, harvested, sold)  
Walking in the fields, it’s interesting to see seed rates, what’s been done, and when.  
Maybe also see planned tasks, not yet done.  
Could also be nice to easily switch between other fields/seasons.

Adding images of the crop, weeds, etc

Example :  
The cover-crop goes bad and you want to add some info about that for later reference.  
then it’s nice to have a summary of what’s done in the field, seeding rates etc…  
The summary should have the dates for the tasks, but also show days from seeding.  
If there’s comments (notes) to the tasks, the user should be able to see that in the summary too. (E.g: “Lowered the seeding depth at the east side” - Nice to know this when evaluating the cover-crop.

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 5:00pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/7 "2023-02-09T17:00:52Z")

</div>

> [@mstenta](#):
>
> Being able to take quick pictures and associate them with logs is also something I want to be able to do a lot of the time.

[**QuickPhotoObservation.alink.vue**](https://gist.github.com/symbioquine/5593a2000dbd4762c090449ad89fb231#file-quickphotoobservation-alink-vue)

[https://user-images.githubusercontent.com/30754460/217884383-c984b6bc-b178-4dbd-a03a-0cf7f4fdb27c.webm](https://user-images.githubusercontent.com/30754460/217884383-c984b6bc-b178-4dbd-a03a-0cf7f4fdb27c.webm)

The ingress to this probably isn’t quite right. If the observations are “about an asset” then the ingress for this should be an action button on the asset, but this demonstrates capturing photos and creating logs with them pretty well.

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 7:09pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/8 "2023-02-09T19:09:33Z")

</div>

> [@mstenta](#):
>
> - Recording egg harvests

I implemented this one as a demonstration some time ago, but it still works:

> <https://gist.github.com/symbioquine/7f1d67f504ab427c5d7e673baee01c65>

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 7:15pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/9 "2023-02-09T19:15:07Z")

</div>

> [@mstenta](#):
>
> - Recording precipitation from a rain gauge

I guess this would be pretty much the same as the egg harvest one, except it might use [some sort of number input](https://quasar.dev/vue-components/input#input-of-number-type).

The main things that those plugins might then be missing are:

- Improvements to the conditions under which they’re shown (The chicken one is just looking for “chicken” in the name of the asset and presumably, the rain gauge one would also need to determine whether an equipment asset is a rain gauge before showing the button.)
- Maybe a way to specify the date so the plugins could be used to save data for previous days
- Maybe a way to show if an existing record has already been created for this asset

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 7:23pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/10 "2023-02-09T19:23:21Z")

</div>

> [@pat](#):
>
> The plant/seed is an asset beeing “moved around” (Seeded, harvested, sold)

Asset Link already comes with a [default plugin for moving an asset](https://github.com/symbioquine/farmOS_asset_link/blob/e40406f4d9476c19eccb896eccc06bb64387c437/alinkjs/packages/assetlink-default-plugins/plugins/MoveAssetActionProvider.alink.vue) which creates activity logs for the movements. It wouldn’t be hard to write a more full-featured version that allows for creating some of those other log types and populating key/relevant fields.

> [@pat](#):
>
> Walking in the fields, it’s interesting to see seed rates, what’s been done, and when.

Asset Link includes a proximity search which uses the current geolocation to show nearby assets so I think the thing that would be missing here is showing the seed rate on the asset page in Asset Link once you select one of those nearby assets from the proximity search.

> [@pat](#):
>
> Maybe also see planned tasks, not yet done.

We’d need to decide where/when these should show? At a per-asset level? Per-user? Overall for the whole farm?

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 9, 2023, 7:24pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/11 "2023-02-09T19:24:14Z")

</div>

> [@Symbioquine](#):
>
> the rain gauge one would also need to determine whether an equipment asset is a rain gauge before showing the button

Ah interesting… in the case of precip observations, I actually don’t reference an asset at all. So maybe that complicates the entrypoint into this form? If I recall from the dev call today your photo observation demo created a log without an asset reference, right? But in this case it would just be a question of: “how do you get to the precip form” perhaps…

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 8:29pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/12 "2023-02-09T20:29:25Z")

</div>

> [@Symbioquine](#):
>
> > [@pat](#):
> >
> > Maybe also see planned tasks, not yet done.
> 
> We’d need to decide where/when these should show? At a per-asset level? Per-user? Overall for the whole farm?

If it were on a per-asset level, it might look like this:

[PendingAssetLogs.alink.vue](https://gist.github.com/symbioquine/5eb4f5d44cd46864455726419a33eea7)

 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/e/e2fb856bc34be1c11d2cf0c94ff516a2f83575b1.jpeg)

_Note 1: I just marked a bunch of test logs as pending here so there’d be something to show, in the real-world hopefully these logs would be more interesting._

_Note 2: A next-step would probably be to implement some widget decorator plugins to render the (relative?) date and completion status along with the log name._

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 8:58pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/13 "2023-02-09T20:58:11Z")

</div>

> [@mstenta](#):
>
> If I recall from the dev call today your photo observation demo created a log without an asset reference, right? But in this case it would just be a question of: “how do you get to the precip form” perhaps…

Yeah, that’s true.

There’s nothing stopping you from creating stand-alone pages in asset link though;

[ObserveRainfall.alink.vue](https://gist.github.com/symbioquine/cc2cde744de6a5fc555f669094198fae)

**/alink/observe-rainfall**

 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/a/aebd4af59bd50b170468e010cd0156049abb1371.png)

Then you could have a QR code for that page next to your rain guage:

[https://farm.example.com/alink/observe-rainfall](https://farm.example.com/alink/observe-rainfall)

 ![qrcode_farm-example-com](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/f/f6fbceb7dd332f3e08ff02b1c375e0e2f6d4c6f2.png)

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 9:19pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/14 "2023-02-09T21:19:00Z")

</div>

> [@Symbioquine](#):
>
> [**QuickPhotoObservation.alink.vue**](https://gist.github.com/symbioquine/5593a2000dbd4762c090449ad89fb231#file-quickphotoobservation-alink-vue)
> 
> [https://user-images.githubusercontent.com/30754460/217884383-c984b6bc-b178-4dbd-a03a-0cf7f4fdb27c.webm](https://user-images.githubusercontent.com/30754460/217884383-c984b6bc-b178-4dbd-a03a-0cf7f4fdb27c.webm)
> 
> The ingress to this probably isn’t quite right. If the observations are “about an asset” then the ingress for this should be an action button on the asset, but this demonstrates capturing photos and creating logs with them pretty well.

During the dev call today, I demonstrated splitting the “quick actions” menu into its own plugin and making the “quick photo observation” plugin work both via that menu and via an action on the assets;

[**QuickRecordMenu.alink.vue**](https://gist.github.com/symbioquine/5593a2000dbd4762c090449ad89fb231#file-quickrecordmenu-alink-vue)

[**QuickPhotoObservation.alink.vue**](https://gist.github.com/symbioquine/5593a2000dbd4762c090449ad89fb231#file-quickphotoobservation-alink-vue)

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 9, 2023, 10:39pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/15 "2023-02-09T22:39:46Z")

</div>

I did a rudimentary port of the [Pasture Condition Score quick form](https://github.com/mstenta/farm_nrcs/blob/aacb38984ab53dfa2e5a45fb4b6ee738052016f8/modules/quick_pcs/src/Plugin/QuickForm/PCS.php) ([context](https://farmos.discourse.group/t/pasture-condition-scores/1520)) to an Asset Link plugin:

[**RecordPastureConditionScore.alink.vue**](https://gist.github.com/symbioquine/5fdd2b8a2bbe5fc099c25714a7ea927f#file-recordpastureconditionscore-alink-vue)

[https://user-images.githubusercontent.com/30754460/217954911-741fff4e-cdab-463d-bfb3-e5c9cf582a43.webm](https://user-images.githubusercontent.com/30754460/217954911-741fff4e-cdab-463d-bfb3-e5c9cf582a43.webm)

_Note: I didn’t include the date field, but that would be trivial to add - just a [QDate widget](https://quasar.dev/vue-components/date) whose output gets formatted as RFC3339 and passed as part of creating the observation log._

```plaintext
import { formatRFC3339 } from 'assetlink-plugin-api';

```

---

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [February 10, 2023, 11:04am UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/16 "2023-02-10T11:04:57Z")

</div>

> [@Symbioquine](#):
>
> If it were on a per-asset level, it might look like this:

I think itss a good look.  
Standing in the field, it’s the asset that’s in focus.

On the other hand, a short glimpse of what’s left to do for all fields is also nice sometimes.  
But pr asset is most important.

Maybe the treeview would be a nice way of showing the logs for different seasons.

Impressive speed on the app in demo. How would that be on a hosted farmOS?  
I think this could affect how things should be layd out.

Eg.  
A tree-view with Seasons at top level, could get quite big. Comparing the drilling logs for 2 or three seasons could make room for a lot of scrolling and tapping.  
Maybe expose all seeding logs for all seasons with the tap of a button?

Main menu:  
Archive  
Move  
Rename  
View logs

Within the treeview window:  
Submenu:  
View seeding logs for all seasons  
View harvesting logs fro all seasons

Or:  
View the complete tree for current season, and tap an icon behind the log title to view matching logs in all seasons… That would filter out the stuff the user don’t need at the moment.

Did that make sense?  
My point is that it should be easy to compare different things without a lot of going back and forth.  
There should propably be a limit for how many seasons to work with. 2 or 3 seasons would be enough for most cases.

---

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [February 10, 2023, 11:28am UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/17 "2023-02-10T11:28:05Z")

</div>

When I refreshed my self on the Asset Link - Dev log, I remembered @walt was quite interesting in asset link too. If I’m not completlly wrong, his needs could maybe melt in with mine.

---

<div class="post-metadata">

**Author:** ![walt](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/walt/32/13_2.png) [@walt](https://farmos.discourse.group/u/walt)\
**Post date:** [February 10, 2023, 12:13pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/18 "2023-02-10T12:13:41Z")

</div>

Thanks, @pat , for the reminder. In fact, i remain super-interested to have a mobile app that will sync w/ my Farmier-hosted instance, supporting two simple use-cases, i.e.:

1. Agile recording of observations in the field, often accompanied by photo; voice recording of text would be a nice option (since typing on glass in field w/ dirty hands is often complicated); and
2. Easy access to records (e.g. maintenance logs) and notes (e.g. documentation of procedures to follow) related to the subject asset; nice to have would be context-sensitive auto-retrieve of asset record, based on scannable QR code (e.g. on a piece of equipment) or geo-location (e.g. a tree that is being treated for disease).

Don’t have time ATM to think through other UseCases, but these are the needs that, if addressed reasonably soon, would bring me the greatest relief i can imagine right now!

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [February 10, 2023, 1:30pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/19 "2023-02-10T13:30:11Z")

</div>

> [@Symbioquine](#):
>
> Then you could have a QR code for that page next to your rain guage:

Love this idea!!!

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [February 10, 2023, 3:32pm UTC](https://farmos.discourse.group/t/asset-link-use-case-drive/1516/20 "2023-02-10T15:32:13Z")

</div>

@pat & @walt I really appreciate the input!

I have a few comments and clarifying questions;

> [@pat](#):
>
> Impressive speed on the app in demo. How would that be on a hosted farmOS?

It could definitely be slower on a weak connection or with a wimpy device. I’ve made an effort to use local data first wherever possible, but I fully expect there will be lots of room for optimization in terms of accounting for low network/device performance.

> [@pat](#):
>
> Maybe the treeview would be a nice way of showing the logs for different seasons.
> 
> …
> 
> A tree-view with Seasons at top level, could get quite big. Comparing the drilling logs for 2 or three seasons could make room for a lot of scrolling and tapping.
> 
> …
> 
> There should propably be a limit for how many seasons to work with. 2 or 3 seasons would be enough for most cases.

I like the idea of a tree view of logs! I think I actually have a branch somewhere for Asset Link with a rough implementation kind of like that, but I hadn’t thought to organize them by season as the top-level. (Just “Recent”, “Pending”, and “Past Due”)

This brings up two points;

- Season isn’t a required log field - what to do with the logs that don’t specify a season?
- As you say, the seasons list could be quite long - perhaps there’d be an argument for allowing seasons to be archived or some other mechanism to only show the most relevant ones

> [@pat](#):
>
> View the complete tree for current season, and tap an icon behind the log title to view matching logs in all seasons… That would filter out the stuff the user don’t need at the moment.
> 
> Did that make sense?  
> My point is that it should be easy to compare different things without a lot of going back and forth.

I’m curious to understand this a bit better… maybe you’d be willing to draw a mockup or something?

> [@walt](#):
>
> Agile recording of observations in the field, often accompanied by photo; voice recording of text would be a nice option (since typing on glass in field w/ dirty hands is often complicated);

When you say “voice recording of text” are you thinking of having the audio file uploaded or a text transcript? Both?

> [@walt](#):
>
> Easy access to records (e.g. maintenance logs)

I think this is the bit that overlaps most with what Pat was describing. I’m definitely planning on more first-class UI around displaying/creating logs in Asset Link soon.

> [@walt](#):
>
> notes (e.g. documentation of procedures to follow) related to the subject asset

How is this kind of notes/documentation currently stored and accessed for your operation?

> [@walt](#):
>
> nice to have would be context-sensitive auto-retrieve of asset record, based on scannable QR code (e.g. on a piece of equipment) or geo-location (e.g. a tree that is being treated for disease)

I think these are already roughly working in Asset Link - obviously contingent on existing QR code format and sufficient device location accuracy.

[Next page](https://farmos.discourse.group/t/asset-link-use-case-drive/1516.md?page=2)
