I wan to create custom report and sensor dashboard?

I want to create report for current month yield, how much input given and analysis what is the cost for per quantity. Also, i have multiple sensors like temperature, humidity, AQI and soil moisture. i want to create dashboard for this sensor data. if any one refer idea or guide me. thank you.

2 Likes

On the Sensor Dashboard, you are probably currently better off handling this outside of farmOS unless you want to build a custom Dashboard module yourself. I did some experimenting with integrating Node-Red dashboards into farmOS and it was based on another users module for integrating Grafana. There is a discussion here:

None of this was ever fully completed or used in a production environment so bare that in mind, and it relies on iframes. Also it was on farmOS 2.x but shouldn’t need much changing to work on farmOS 3.x.

1 Like

I agree it’s worth thinking about solutions outside of farmOS. If you really want something in farmOS then I would recommend learning how to build routes + controllers in Drupal:

You can basically create any custom pages you want. It is more “Drupal” development than “farmOS” development specifically. If you want to build something that is generally useful/shareable with others in the farmOS community, then there are more considerations. But if you just want something custom for yourself, you have a lot of freedom in a custom module. It just becomes a Drupal development effort.

2 Likes

For some broader farmOS context…

We have talked about making the farmOS dashboard itself “configurable”, which would allow users to pick and choose which “blocks” they want to show on it. Maybe we could even allow multiple dashboards to be created, with different sets of blocks for different purposes/people! This doesn’t exist yet, but it would be a great feature IMO.

If that were done, then other modules could provide blocks. For example, the Sensor module could provide ways to create dashboard blocks. I can imagine a lot of other types of blocks that would be useful.

As for reports of yield by month, cost per quantity, etc… that’s going to depend a lot on the data that you’re collecting, and how it is formatted. You will need to make sure it’s being collected in a way that allows building those reports. So you may need custom forms to ensure the data is collected correctly first.

farmOS is a very generalizable record keeping system - it is not opinionated about what your data looks like. This is good because it’s flexible, and can be used in many different ways. But it also makes it harder to make general purpose “reports” because that requires more strict data formatting.

I would recommend reading about “conventions” to understand the considerations…

1 Like