single variable to overwrite in thingspeak
5 views (last 30 days)
Show older comments
I would like to have a single variable in thingspeak which is like a 1 second heartbeat which is a number counting up by one every second and this would be sent to Thingspeak- I just need one instance of this number so overwriting this one numbe is all I need not trending it.
deleting and writing a single value to thingspeak would work but deleting a channel is not a bit brutal and there can be delays - the Ideal would be a standalone thingspeak variable or an abilty to update the Entry_id 1 of a channel.
My end goal is to write normal data to a channel every 10 minutes but have this heartbeat somewhere in thingspeak showing me that the device is alive. Writing the heartbet to the Status would create entries to the channel that I don't want.
any thoughts ?
0 Comments
Answers (1)
Christopher Stapels
on 13 Feb 2024
This is a bit convoluted, but It can give you a somewhat more rapid response within a few seconds. ThingSpeak doesnt have a variable storage similar to what you describe, but you could look into the Particle devices.
Here is my suggerstion. Have the device read a channel every second or so (or use MQTT subscribe). If the channel has a value of 0, do nothing. If the channel has a value of 1, then the device writes back to that channel or another channel. In this way, you will be able to check that the device is alive.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!