Ajay Kumar in MATLAB Answers
上次活动时间: 2025-5-11

Basically, I am getting temperature values and trying to send an email alert whenever the temperature exceeds a specific point. But however the code runs but yet I am facing an error that says Error using matlab.internal.webservices.HTTPConnector/copyContentToByteArray (line 373) The server returned the status 429 with message "Too Many Requests" in response to the request to URL https://api.thingspeak.com/alerts/send. Error in readContentFromWebService (line 46) byteArray = copyContentToByteArray(connection); Error in webwrite (line 139) [varargout{1:nargout}] = readContentFromWebService(connection, options); Error in Customer Temperature Email Trigger (line 10) webwrite(alertUrl , "body", alertBody, "subject", alertSubject, options); I am also attaching the code. channelID = 1614947; alertApiKey = 'PRIVATE_ALERT_API_KEY'; alertUrl="https://api.thingspeak.com/alerts/send"; options = weboptions("HeaderFields", ["ThingSpeak-Alerts-API-Key", alertApiKey ]); temperature = thingSpeakRead(channelID,'NumDays',30,'Fields',1); recentvalue = temperature(end) alertSubject = sprintf("Temperature Alert"); alertBody = sprintf(" The temperature of the customer entering the store is high : ",recentvalue); if recentvalue > 32 webwrite(alertUrl , "body", alertBody, "subject", alertSubject, options); end Basically the other articles tell me that I have to enter a delay or a pause because the free version of thingspeak has limitations. Any idea on what I could do to make sure the code runs with minimal amount of delay?

关于 ThingSpeak

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.