Data Collection on Deman

Edward on 5 Nov 2023
Latest activity Reply by Edward on 7 Nov 2023

I am collecting Data at 1 minute intervals using esp8266, the data is then sent to Thingspeak on the minute intervals. However I would like to store the data collection on the esp Ram. I am using batteries to power the circuits , if I can store the data and send it on demand I can save quite a bit of battery energy (used up by wifi) - (I already use sleep mode between intervals). As well as using Thingspeak to visuliase the data, I also use a third part app called Thingview which 'feeds' off thingspeak. I am looking for a way to trigger the 'data send' upon opening thinkspeak chanel,so rather than sending every minute it might need to be accessed two or three times a day, is this possible?
Thanks Edward
Edward
Edward on 6 Nov 2023
Thanks Chris
I dont think this example adresses the crux of the query.
What I am trying to achieve is store the data for a period of time on the ESP8266 and only send it when I send a trigger from thingspeak .The example here stores the data but sends it a preset intervals which is not what I am looking for.
Thanks Edward
Christopher Stapels
Christopher Stapels on 5 Nov 2023
Its a terrific idea.
This example shows what you need though it doesnt go into WiFi sleep in between writes
Let us know if that helps.
Christopher Stapels
Christopher Stapels on 6 Nov 2023
Aha, sorry about that. If your device is asleep, I dont think you will be able to to trigger it from ThingSpeak. But you could have the device sleep and wake up intermittantly and check a flag at a ThingSpeak channel. If the flag is high, then write the data.
Is the data expensive to collect? In most cases, I have the device report regularly, and then just query that data that I want.
I have this MQTT read write example that shows how to drigger a measurement form ThingSpeak, but I dont think it fits your needs either.
Edward
Edward on 7 Nov 2023
I am transmitting the data via wif and using wifi consumes quite a bit of battery, Another way I found was I think as you say put a flag in one of the fields and as you say if it matches the condition in the code it will send data - not tried it yet but will do soon
thanks
Edward
4
Posts
8
Replies