logo elektroda
logo elektroda
X
logo elektroda

[Solved] [ThingSpeak] - How to retrieve the time since the last record

grzechoo1 594 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18608027
    grzechoo1
    Level 11  
    Hi,
    Due to the fact that in the free version of ThingSpeak there is a limitation on the frequency of records, I am trying to develop a method to synchronise several separate modules transmitting to the same channel.
    I don't want to get into NTP for now, as I'm a strong beginner.
    I have come up with an idea, but in order to do so, I need a feedback from the server about the time elapsed since the last write in seconds.
    Is there any way to extract this from the server?
    I know it is possible to download the data into .json or .xml, but how do I further extract what I need from this? As long as I can find the data there at all.

    Greetings
    grzechoo

    Added after 12 [minutes]:

    Hello again and apologies :( .
    I've already found it after I let the post go, but maybe it will be useful to someone else:

    https://uk.mathworks.com/help/thingspeak/readlastentryage.html

    An additional question arises here, however, because I keep getting a "-1" return, i.e. no access.

    Does this method only work on public channels?

    Greetings
    sinoo
  • ADVERTISEMENT
  • #2 18608108
    grzechoo1
    Level 11  
    Hi,
    Due to the fact that in the free version of ThingSpeak there is a limitation on the frequency of records, I am trying to develop a method to synchronise several separate modules transmitting to the same channel.
    I don't want to get into NTP for now, as I'm a strong beginner.
    I have come up with an idea, but in order to do so, I need a feedback from the server about the time elapsed since the last write in seconds.
    Is there any way to extract this from the server?
    I know it is possible to download the data into .json or .xml, but how do I further extract what I need from this? As long as I can find the data there at all.

    Greetings
    grzechoo

    Added after 12 [minutes]:

    Hello again and apologies :( .
    I've already found it after I let the post go, but maybe it will be useful to someone else:

    https://uk.mathworks.com/help/thingspeak/readlastentryage.html

    An additional question arises here, however, because I keep getting a "-1" return, i.e. no access.

    Does this method only work on public channels?

    Greetings
    sinoo

    Added after 8 [minutes]:

    https://api.thingspeak.com/channels/{channelID}/feeds/last_data_age.txt?api_key={read API key}
ADVERTISEMENT