Combing data from different buckets

I have a greenhouse with 30 moisture sensors. I want to show only the average soil moisture readings from the 30 sensors at any given time, so I need only one dashboard chart that shows the average reading from 30 sensors over time. [ I will also create a blueprint dashboard to see battery level, moisture, temperature, conductivity values for each sensor].

Need to set the alert level for low soil moisture based on the average soil moisture value for the 30 sensors.

How do I do this? Thanks in advance for all the suggestions.

Hi @surya.sarda ,

I will guide you through the concept, then let you try implement that out, if you have any doubts I will be assisting you.

1. Setting up the environment

Create a HTTP device which you will be using to store data (in this case average data). Call it settings_dev or anything that helps you relate to that.

2. Developing the logic

The idea here is to create an ACTION to run each 1h (or any period you want to). That action will trigger an ANALYSIS which will contain a script logic to fetch data from that hour and divide by the amount of readings (or any average logic you want here) (1).

Send then for example variable moisture_avg to the settings_dev to store the data.

You need then to display moisture_avg on a chart, you can either use normal dashboards or use the blueprint dashboard creating a tag for the settings_dev (e.g. device_type - settings).

(1) Use this getData property it will help you.

You can always chech on our SDK, it will help you tons.


Thanks, Guilherme. I will go over the documentation & try things out, will let you know if I have any questions.

1 Like