using esp to graph a temperature

I have a nodemcu thats wired to a DHT22. currently i have the esp send a value to a UDP server that writes it to a text file. this text file is then parsed by python/ plotly 'graphing software' to display the result on a line graph. You can view the graph here . i'm noticing there are a LOT of data points on the graph. However the temperature that i'm measuring changes rapidly. would it make sense to graph the temperature every 15 seconds or only when it changes? the temperature i'm measuring changes from 85 to 87 within like 2 minutes. so i figured i would record it every 15 seconds but i think my logic is off. does anyone have any input on this?

I'd increase measure time to 3ish to 5ish times a second and run the readings through a Kalman FIlter for smoothing, GitHub - denyssene/SimpleKalmanFilter: A basic implementation of Kalman Filter for single variable models.. The time of graph updating does not have to be the same time as the sample rate.

Idahowalker:
I'd increase measure time to 3ish to 5ish times a second and run the readings through a Kalman FIlter for smoothing, GitHub - denyssene/SimpleKalmanFilter: A basic implementation of Kalman Filter for single variable models.. The time of graph updating does not have to be the same time as the sample rate.

please elaborate why you would increase the sample rate. this log im creating will be running for a month. at 3-5 times a second would create a VERY large file?

One approach would be to sample at a high rate (whatever that means in this context), but send data in the format of time of measurement plus measurement value only when the measurement changes by some threshold amount.

If the sensor readings vary when the temperature is stable, it might be helpful to take multiple readings and take an average or a median value from the set.

@notsolowki

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

You should know better with 991 posts.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

MrMark:
One approach would be to sample at a high rate (whatever that means in this context), but send data in the format of time of measurement plus measurement value only when the measurement changes by some threshold amount.

If the sensor readings vary when the temperature is stable, it might be helpful to take multiple readings and take an average or a median value from the set.

Sorry im still having trouble understanding the logic. Im still trying to understand the best way to do this without cluttering my graph. i had fallen asleep and my graph went offline when my laptop went to sleepmode.

current i feel like my graph is cluttered and its slowing things down. i use a python script to parse the log file and it simply loads the whole thing into the chart. im not sure if this is what i want tho. i want to see detailed data but i dont want to over/under log the data. Here is a new link to my graph.

I think the confusion is that you're asking what I now see to be a Python/plotly-dash question on an Arduino forum and others have incorrectly interpreted that you have a sampling rate problem that the Arduino can affect.

MrMark:
I think the confusion is that you're asking what I now see to be a Python/plotly-dash question on an Arduino forum and others have incorrectly interpreted that you have a sampling rate problem that the Arduino can affect.

Did you miss the part where i said i'm using esp to sample the sensor? Surely you didn't because its in the Title. I actually did not ask a question about python or plotly. maybe you need to read the question again, Or go waste someone else's time . i asked to have THIS thread deleted so i could post it in Interfacing w/ Software on the Computer but instead the wrong thread was deleted. So here we are in the wrong topic for some reason. The moderator could have at least MOVED this thread. But you know it really could go in either topic.

Sample rate:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, say those X's are generated at a 100 times a second.
G, that G, happens once a second, is when to send the data for the graph.

Idahowalker:
Sample rate:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, say those X's are generated at a 100 times a second.
G, that G, happens once a second, is when to send the data for the graph.

so you think it would make sense to use the recorded values that are different than the previous values? Or i think your saying read it at a high sample rate, then in the graphing software set to use eg 'every 10th reading'.

one of the problems i see with reading and logging at a high sample rate is, my log file would be huge after a few days. i plan on letting the esp update the log file for about week straight

notsolowki:
Or i think your saying read it at a high sample rate, then in the graphing software set to use eg 'every Xth reading'.

Yup.

You can then filter the sampled data, like using a Kalman filter.


Perhaps this may be a bit more clear.

If you only want to display a number averaged over time then you will need to read the number several times, to get an average, before the number is displayed.