Good to have this discussion…
In my case I would be happy to have raw data stored as a CSV for instance. I will have to temperature, humidity and light level (being 0 or 1, threshold can be defined on sensor).
Something like
PIN1, timestamp, 1
PIN2, timestamp, 123
PIN3, timestamp, 0
PIN1, timestamp, 0
PIN2, timestamp, 456
PIN3, timestamp, 0
DISCONNECTED, timestamp
CONNECTED, timestamp
Where PIN1/3 is a switch or a digital readout and PIN2 is for instance the temp or some other value.
- Timestamps being saved is essential of course.
- You might think about adding info whether this is incoming input from the app or outgoing data from the controller.
- Having system status info logged like connects/disconnects or similar might be good in case there’s inconsistent data.
As for averaging and so on: I think that raw data is sufficient. If you are able to grab that you can mess arround with the data in whatever way you want and need. I don’t need blynk to act as some analysing tool - just my oppion of course. Others might look for the usual stuff like
- average over a time span
- min/max values
But I think this is not what blynk was made for, at least not with regard to the logging feature. Having this for the graph widget might be nice… but that thing only shows so few data points, that this is not critical as you can get it by just looking at it.
As for the frequency: I’m quite modest here (for the time being). I would log data once per minute. The DHT is slow anyway. But others (and myself for some other project and can’t forsee) will need faster rates… so everything we can get is fine…
So far I had a play with this code, sorry - in German. Basically it stores DHT-data on the ESP directly and displays it as a webpage and even graphically with the google api. But I’d love to switch to blynk for the logging and skip the graph as I don’t get parts of the code and thus can’t adept it and I’d like to have the option to log other sensor data as well.
Thanks