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!