Optimizing Sequences with Data Records

I am looking to create a sequence that first tests all of my plants using the soil moisture sensor, then waters the plants that need it. Right now, I am doing each plant individually, mounting and unmounting each tool each time because I do not know if I can access previously collected data records. Is there a way to check a sensor, save it’s data in some sort of array, and check the array at a later point when the water head is mounted? This would save so much time!

To do this with sequences put your plants in a group in the farm designer.

Create a parent sequence that loads your soil sensor tool.

Create a child sequence called SoilTest that uses an external variable. Set the parent sequence to call the child sequence with your group of plants.

In the child sequence (the loop) check if the soil is dry. If it is set the plant status to unwatered or something if it isn’t set the plant status to watered.

(I may have got the next bit wrong but I’ll have a go)

Create another group called PlantsToWater make sure the group only contains the plants that need watering based on the plant status. I think there may be a filter you can use.

Create another child sequence called Water Plants with another external variable.

Change the parent sequence to unload the soil sensor and load the watering tool then call Water Plants passing the PlantsToWater group.

In the Water Plants child sequence water each plant.

Lastly in the parent sequence unload the watering tool.

Hope that works.

Thanks for the advice! I’ll use that idea.

That’s a great idea, @whitecaps but I think there is one last missing piece- “Group Criteria”. Currently the MARK AS step is only useful if you are building an application that uses the FarmBot API and can read plant data from outside the application. That is to say, MARK AS is currently “write only” from within the application and there is at present no way to read the status written (3rd party software developers are able to read this data externally via the API, however). Obviously, this is less than ideal. So why did we add a MARK AS step if there is no way to read it? The reason is that we are not finished adding a “Criteria Editor” to the “Groups” panel in the Farm Designer. I’ve attached a sneak peek screenshot at the bottom of this message.

Criteria based groups will work similar to a search query- you set the search terms and the group will dynamically include only the plants that match the provided criteria. You can additionally add plants to the group manually, the same way that groups work today. This would be perfect for the use case that @whitecaps mentions (I can add a “watered” / “unwatered” status to the sequence editor later this week).

I can’t provide a release date estimate, but I will say that we are very close, and I am working on this feature all week and it will almost certainly be included in the next release.

I hope this answers your question @DanJones, sorry to keep you waiting on this much anticipated feature!


Hi @RickCarlino
any updates here?
I tried to use groups and also “Mark As”, but as you mentioned it doesnt help much within the web app, if you can’t read the value.
If you could read the value, it would be possible also to “mark” which tool is loaded and make decisions on that.

Another point if working with groups: If i plant with a sequence taht uses groups, I cannot use MarkAs to mark the plants as “planted”, MarkAs doesnt accept external variables.

MarkAs could be so powerful, if it would be readable and accept external variables as well.


@mbuchberger1967 There were some holdups in the QA phase for this one, unfortunately. The feature is complete but some changes to the UI are still required. We decided to delay the release instead of introducing technical debt with a rushed release.

As for the “mark as” step, we will support the use of variables, but that work has not started yet. Our team of two developers (including myself in that figure) is still working on the criteria groups feature first. Once that has been released we can begin work on a more robust MARK AS step.

Hi @RickCarlino,
thank you so much for the quick response and for the preview to the criteria editor…
this is higly appreciated.
Take care

1 Like

Hi @RickCarlino
I noticed the new MarkAs commands, appreciate this. I see that I can set which tool is mounted. But I don’t get how to make use of this information in my sequence logic? How can I check which tool is mounted, or unmout the tool to the right slot if I know which one is mounted?
Thx for any tips.

@mbuchberger1967 This iteration of MARK AS doesn’t expose that functionality yet. The main focus for this particular release was to improve management of point groups. The ability to read the tool mount will be added in a future release. It’s currently possible to view this information via the API (advanced users). It’s also possible to detect if a tool is physically connected via tool verification (though it will not specify which tool currently). We do plan to add this to the application, though our current focus is fixing stall detection on Express and increasing the stability of firmware updates. I will keep you posted and sorry for the delay!

1 Like