[SOLVED] Possible to record/display high/low variables for temp/humidity sensor?

Hi all

Started my first project this week and want to expand use.

I was able to read temp humidity sensor on 8266 but only live data …can’t see any historical data.

How would I go about recording sensor data over 24 hour period the showing 24 hr high and 24 hour low?

Would I have to setup db?
Is there already a widget that can be repurposed?

Any suggestions would be greatly appreciated

History graph will store data for 3 months based on 1 minute updates.

Anything more than this requires a bit of code on your part.
Pseudo
If X > current_max …
if X < current_min …

Unfortunately that data gets averaged out (even on Local Server), thus losing true MIN/MAX. My solar graph had spiked 2.5 amp readings showing as less than 0.5 amp in as little as an hour. Basicly made the History Graphing Widget useless except as a broad trend visual (i.e. ohhh… nice wiggly line :wink: )

@Gunner my understanding is that as long as the readings are at 1 minute intervals or longer then there shouldn’t be any averaging of data. If you need to read data more frequently you could hold the highest value in each 1 minute period before allocating to a virtual pin for graphing purposes.

I don’t recall my polling rate of the sensors at the time, must have been <1min. I gave up and switched to a simple Graph, but I will give it another try with something around 2-5 minutes I guess.

Thanks.

@Morty http://docs.blynk.cc/#widgets-displays-history-graph

Ahh, my solar sketch was still polling my DHT11 every minute all along… so I loaded up a History Graph and voila!

About as accurate as my DHT11… which is to say, not very ;)… but better then the averaging I had seen with my Amp readings (which must have been <1min).

Yup… I recall it raining here and there over the last few days :umbrella:

Is this what you are looking for @Morty?

This is true for 1h and 6h scales. Longer scale will show averaging data depending on its granularity.

This is true for 1h and 6h and 1d scales for new graph :wink:

I suspected that was the case but your docs are far from clear on this as they only refer to your server only being able to save 1 data point per minute.

How are you currently handling the 1 hour granularity that covers 1 day to 1 week?
Are you simply taking a plot once every hour or the more accurate average of the 1 minute data points averaged over 60 minutes (as they are on your server in any case)?

So, for Local Server users… how do we get pure, unadulterated, average-free graphing, for all scales… Will enabling raw data storage do the trick?

We’re taking average. In the future, user will be able to select data aggregation method. (e.g. min, max or average).

@Costas actually this is stated in docs - http://docs.blynk.cc/#widgets-displays-history-graph.

More details:
Every data point that comes to the server is stored in 3 fields. 1 minute, 1 hour, 1 day. This is 3 granularities.
Let’s say you sent temp 36 at 01:00:00 and sent 38 at 01:01:00. As output you’ll see:
2 points (36 and 38) on 1h, 6h graph.
1 point (37) at 1d, 1w graph.
1 point (37) at 1m, 3m graph.

Right now we’are improving this. And new graph will have also “live” option with historical, raw data (wihtout any aggregation). But only last 60 points. In case you need only raw data you have to install local server and enable DB storage. As raw data is very expensive in terms of storage, backups, traffic, etc.

Also this limitation has UX reasons. Mobile screens are small so you actually can’t see more than ~100 points on the single graph. So there is no actual reason to return 43200 (30 * 24 * 60) points for 1m graph. You can’t see them all on small screen. Also this 43k of points is 1MB of data. And this will take some time to download, especially on 3g.

Average of hourly plots or average of minute plots over each hour?

average of minute plots

1 Like

I know where the docs are, they are just not very clear :-)[quote=“Dmitriy, post:12, topic:16044”]
1 point (37) at 1d, 1w, 1m graph.
1 point (37) at 3m graph.
[/quote]

Shouldn’t that be?

1 point (37) at 1d, 1w, graph.
1 point (37) at 1m, 3m graph.

You’re right. For the new graph we changed this too. So soon it will be like:

1h, 6h, 1d - minute granularity
1w, 1m, 3m - hour granularity.

1 Like

@Dmitriy and @Eugene if you have a minute can you take a look at my Blynk graph in this GitHub issue thread https://github.com/olehs/PZEM004T/issues/22

What would be your interpretation of the voltage data shown in the 6h plot:

  1. Faulty Energy monitoring hardware.
  2. Actual power drop by Electric company from 240V to 120V for around 40 minutes.
  3. Some weird Blynk averaging covering values of 240V and 0V to show 120V.

@Gunner and other Blynkers I would be interested in your thoughts too.

1 Like

Since we plot averages, we can’t know for sure whether it was actual power drop to 120V or an average of 240V and 0V.
But this issue about to be improved with the new Graph when you’ll be able to select aggregation method.

@Eugene just trying to ensure your new Graphing will be as near perfect as possible :slight_smile:

The reason I was pushing for a detailed explanation of your current (no pun intended) averaging is that the raw csv data over the 50 minute period shows the “gradual” fall from 240V in minute intervals over 5 minutes, level at 120V for 40 minutes and the “gradual” increase back to 240V over 5 minutes.

This doesn’t imply 0V was recorded from my understanding of your averaging.

@Costas I see. I agree this favors assumption that values were gradually falling from 240V to 120V rather that occasional 0V. But, who knows.

1 Like