logo elektroda
logo elektroda
X
logo elektroda

No data is written to Thingspeak despite new Write API Key

pier 1032 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17761532
    pier
    Level 24  
    Hello.
    Colleagues my save to thingspeak server has stopped working.
    I did not change anything, the device works as always and today I noticed that the last write to thingspeak was 5-02-2019.
    Today I generated a new "Write API Key" and uploaded it to the device, this did not change anything.
    On the Thingspeak page in my profile no information or warnings.

    Do you know what this could be about?
  • ADVERTISEMENT
  • #2 17765305
    korteksik
    Level 10  
    Hello,
    The problem is related to a server infrastructure update. You were probably using an old version of the library to send data without waiting to receive a response from the server with an acknowledgement status.
    You should be using the new version of the recommended Thingspeak library:
    Link .

    I, however, have a problem with this library. Well, my sensors are using ESP sleep mode to save battery, because I send data every 15 minutes. The problem is that very often the server returns me an error code -301 which means "Failed to connect to ThingSpeak". The same code but without putting the ESP to sleep works fine and I get 100% data sent every time.
    Has anyone perhaps encountered this problem?
  • ADVERTISEMENT
  • #3 17765445
    pier
    Level 24  
    korteksik wrote:
    Hello,
    The problem is related to a server infrastructure update. You were probably using an old version of the library to send data without waiting to receive a response from the server with an acknowledgement status.
    You should be using the new version of the recommended Thingspeak library:
    Link .

    I, however, have a problem with this library. Well, my sensors use ESP sleep mode to save battery, because I send data every 15 minutes. The problem is that very often the server returns me an error code -301 which means "Failed to connect to ThingSpeak". The same code but without putting the ESP to sleep works fine and I get 100% data sent every time.
    Has anyone perhaps encountered this problem?
    .

    I got advice on the Thingspeak forum how to deal with this. The guy who helped me posted a link in which it is explained why it stopped working.
    My ESP is woken up every 30min and after the fix I haven't noticed any problems.
  • #4 17808462
    kaczakat
    Level 34  
    I have used my function all the time, developed by trial and error, I have not noticed anything worrying recently, and I have been collecting data for over a year. You can upload this data using post or get. The get in my opinion works much faster. For me, whether the ESP could send data after the next wake-up depended on how I put it to sleep. I don't just collect information about whether it was successful or not, because if I insisted on trying until it was successful, e.g. when switching off the WIFI modem or some kind of net failure, it drained my battery in two days, while normally it works for several months.
    Code: C / C++
    Log in, to see the code
    .
    Also, I have a LANCONTROLER-something driver and it only works with GET.
    Helpful post? Buy me a coffee.
ADVERTISEMENT