Why I can't sent emails with Matlab Analysis? (Having error 429).

2 views (last 30 days)
I have doubt about why I can't receive emails.
I'm uploading data with an ESP8266, and I'm trying to send an email alert when Thingspeak is not receiving any data.
When I run the code, it only shows me a message error with the code 429.
I implemented the following code:
channelID = *********;
alertApiKey = 'TAK**************';
alertUrl = "https://api.thingspeak.com/alerts/send";
options = weboptions("HeaderFields", ["ThingSpeak-Alerts-API-Key", alertApiKey ]);
alertSubject = sprintf("ALERTA RED FRÍA");
moistureData = thingSpeakRead(channelID,'NumDays',1,'Fields',1);
if isempty(moistureData)
alertBody = 'No hay datos disponibles. Posible falla en la conexión a internet o falla eléctrica';
end
try
webwrite(alertUrl , "body", alertBody, "subject", alertSubject, options);
catch someException
fprintf("Failed to send alert: %s\n", someException.message);
end

Answers (1)

Christopher Stapels
Christopher Stapels on 19 Aug 2021
See Error Codes. 429 is too many requests. You can see the limits on the send alert page in the limitations section.
I reccomend using the no data insert condition in react to track your channel.

Communities

More Answers in the  ThingSpeak Community

Categories

Find more on ThingSpeak in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!