Precision Agriculture Data Visualization and Farm Automation

Hi there,

I’m new to FarmOS and I’m interested in data visualization within the platform — something similar to what we see in precision agriculture. Is this possible?

I’m running a self‑hosted Docker installation and everything seems to be working correctly.

I’m also a researcher at the Federal University of Pelotas working with agricultural instrumentation. In our project, we are developing a robot that will move around the field and measure different conditions, such as soil moisture.

Is it possible to visualize the robot moving around the field in FarmOS? I have it set up as an equipment asset, and it has child sensor assets. The sensor has a data stream.

I’m able to send data to the sensor’s data stream. Now I want to move the robot and send its coordinates to FarmOS. Can FarmOS record both the sensor measurements and the robot’s position? The goal is to generate a heat map using the sensor data and visualize it inside FarmOS.

Another question: when I click on the sensor or the data stream, FarmOS only shows me a map (zoomed out) and the sensor/data stream record, but not the measurements themselves (for example, a line chart).

Is there a better way to visualize this data, or is it limited to logs? Is there any way to generate a heat map? Can the dashboard be customized?

I come from the Home Assistant ecosystem and I’m looking for something equivalent for farm management. I was imagining that FarmOS would be able to do something similar. Also, is FarmOS capable of triggering any kind of automation when certain conditions occur — for example, pressing a button on a dashboard or running an action based on time, since it uses cron?

2 Likes

Hi @DenTod - welcome to the community! :slight_smile:

Sure! Anything is possible!

At it’s core, farmOS is just a web application, so anything that’s possible with HTML, CSS, and JavaScript is possible in farmOS. And because it is modular, you can package whatever kinds of add-on UI you want and offer it to others in the community as a farmOS module.

The “core” farmOS project aims to provide a flexible platform and data model that can represent records for all kinds of farming contexts, but tries to remain unopinionated about very specific use-cases. Instead, it leaves it up to “downstream” developers to build add-on modules for their needs, which they can offer back to the rest of the community.

There is a lot of flexibility within modules to add and modify farmOS interfaces, and provide visualizations, reports, data entry forms, etc.

Very cool! The way I would probably approach this is by creating a module for your specific data stream, which adds a map to visualize the data you’re collecting.

farmOS uses OpenLayers for building maps in the UI, and we’ve built a wrapper library around it called farmOS-map which provides some helper methods for adding new layers of different types. The README.md for that project has a lot of good information in it.

We also have documentation for building modules here: farmOS module development | farmOS

And some specific examples of adding maps in farmOS here: Maps | farmOS

So all the building blocks should be there, for the most part! It’s just a matter of building what you want with them. :slight_smile:

One way to do this would be to use multiple data streams, all associated with the same sensor asset. So for example, you could have one for latitude, one for longitude, and one for each sensor measurement.

Note that the “basic” data stream type simply stores values in the farmOS database, but it’s also possible to write your own data stream types that store data elsewhere (or in more customized database table schemas).

Here are two OpenLayers heat map examples:

farmOS v1 had basic charting of sensor data, but that was dropped during the upgrade to v2 due to dependency and licensing debates, and there is an open issue to restore it here: Client Challenge

Similarly, this issue aims to add graphs to the quantity report: Client Challenge

Yes! Modules can insert blocks into the dashboard. All of the existing dashboard blocks are added that way. I can refer you to examples if you need.

Some people are using them both, in a complimentary way. Some forum topics on the subject:

Sure, module can provide form (with buttons) that do whatever you want, including sending HTTP requests to other services (eg: a Raspberry Pi running locally that listens for requests, triggers actuators, etc. They can also implement Drupal’s cron hook to run things on a schedule basis. See: Client Challenge

Hope that gets you started! Looking forward to seeing what you build! :slight_smile:

1 Like