My Node-Red and FarmOS project

Personally, I think it’s a bit of an anti-pattern to make scanning the QR code directly trigger the action. It should probably open a page/tool of some kind where you can at least confirm before any changes are made.

That’s interesting!

I’ve been pretty happy with Binary Eye or just Firefox for scanning QR codes.

The main reason Asset Link has a QR scanner is that it allows navigation to happen without a reload - and/or when offline. It also could allow Asset Link to intercept/interpret URLs that don’t even point at the farm’s domain. e.g. re-use QR codes alread on equipments or feed to open those assets in farmOS / Asset Link.

2 Likes

I agree, but it does nothing until the user choose to open the url after scanning.
And besides, it’s usually only me working on the farm.
I’m planning to implement alerting if the log is saved. That way I’m noticed if someone scans it.

Maybe it’s possible to have the url open a form before sending the log. Could be a useful way to add comments etc.

With my email alternative, I could check for the sender’s address, and verify the user. That way my neighbors won’t be playing tricks on me :rofl:, and I could add multiple users if I would.

I would love to try Asset Link one time. Haven’t found time to try setting it up.

Simple html form in the template node?
Or just a confirmation button with a preview of what is about to be posted?

1 Like

Yep. Something like that

@Farmer-Ed
Could you help me get this straight?

I’m trying to GET one specific log. The log name is stored in a global variable. (Should use ID, I know)
bilde

bilde

What should I fill in the current_batch_name variable?

No matter what I try, I get this error:
TypeError: filter.includes is not a function

The name of the Global Variable which contains the filter.

Example for filtering by status

1 Like

Thanks.
I actually had the filter correct, but the API was a bit different than the previous farmOS node.
Didn’t work if API was entered directly. Had to be a variable.

1 Like

It needs to be a variable if you choose “variable as source” from the drop down, there should be an “enter below option too”

The idea of loading into a variable is the filters can be applied by other nodes in the flow.

These are not really my intended V2 nodes but just a mock up using subflows, the published version may end up being vastly different. But since they are subflows they are fully editable from within Node Red if you want to make any changes.

Well, some lessons learned the last months
Thank’s to good help from @Farmer-Ed
I’ve come along nice with my dashboard now. It’s beginning to be useful.
It even shows the power price.

There is a health card for Vet to fill out. He/she then gets a copy on mail, and if it’s a sow, the sow is created as an animal asset in farmOS, if it does not already exist.
Group medications are assigned to an animal asset representing the group.

Health cards are medical logs categorized as Health card.
If theres a withholding period, the asset is flagged and displayed on the dashboard.

Pig healt

Disease observations are entered through the dashboard from a mobile with very little effort.
The disease observation is a pending medical log.
All pending medical logs are displayed under the Health section on the dashboard.

I also get a notification on my phone when a disease is registered.

I’ve also made the growth monitoring work fine.
It shows me the average weight when saving it to the current pig batch for later investigation.

1 Like

Good work @pat
You may be passing me out on the UI front now.

Finally!! :slight_smile:
Thanks.

Have to work out the refresh of the main tab, but that’s details.
It’s not refreshing automatic. Over time it does, but that’s not good enough.
I also notice a difference between Firefox and Brave. In Brave it sometimes updates immediately. Or I can tap the update button to refresh. On Firefox I usually have to switch tab and back.

It’s also too tied up to my farmOS instance, so I should make it a bit more flexible.

I think with building UI’s using these kind of blocks, there is always some limitation or compromise.
I’ve played a little with UiBuilder it could solve a lot of problems but it’s a lot more involved.

Dashboards could be a lot more flexible, but there is more code involved HTML/Vue.js etc. so more learning :wink: Depends how far you want to go down the rabbit hole.

Yea. I noticed uibuilder.
Not for me yet. I’ll rather focus on bringing more functionality to the table.

1 Like

Yea, truth be told my current plan is not much different, just looking a little further down the road in case I need something more custom.

Always good to know the possibilities.

1 Like

Updated repo with the flow for creating batches.
Batches are animal assets designed to be archived after the batch is passed on to the next stage.
So, the batch is an asset to collect all events happeing during that period.

1 Like

Added menus now, on the health records.

  • Create healthcard.
  • Treatment initiated, (If no healthcard needed)
  • Pig has recovered, (mark log as done.)
  • Pig is killed. (mark log as done, and add comment)
2 Likes