Getting -401 error code when using WritingMulitpleFields
조회 수: 26 (최근 30일)
이전 댓글 표시
I modified the WriteMultipleFields example to include a MAX31855 which measures the board temp and a K-type thermocouple. I seem to be getting the "Problem updating channel. HTTP error code -401" in my seriel monitor however it seems to updating my channel properly. I copied and pasted my API so I dont think there is a typo, especially since it updates the channel. Any ideas on how to fix this? or can it be left alone since it still works?
Also, can you change the timezone in the visualization from GMT to a different zone? I updated my profile but that didn't do it
I am using an Arduino Nano 33 IoT
댓글 수: 0
채택된 답변
Christopher Stapels
2021년 5월 17일
There are two calls to writefields in your code, I don't see a delay between them. I see a delay at the end of 20 seconds. I would expect you to get a 429 error, but can you try removing one of the calls to writefields, and see if the error stops? The channel would update correctly as you said, and then also return the error on the second call.
When you chnge your prodile time zone your charts should update to the profile timezone unless they are custom visualizations witha set timezone. Can you sign out and in and then let us know if you still see this problem?
댓글 수: 4
Christopher Stapels
2021년 5월 18일
Can you share a screen shot? When I hover on my plots, it says GMT -4 and shows the time in my local time zone.
추가 답변 (1개)
Vinod
2021년 5월 15일
What is most likely happening is you are making requests to the server far exceeding your allowed data rate. One out of every 15 or more requests is being accepted and updates your channel. The other requests get a 401 and are rejected. These numbers assume you have a free license.
You must immediately reduce your rate of updating ThingSpeak to less than one update every 15s. Otherwise, it will be treated as a deliberate abuse of service and appropriate actions taken.
커뮤니티
더 많은 답변 보기: ThingSpeak 커뮤니티
참고 항목
카테고리
Help Center 및 File Exchange에서 Act on Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!