How to send by HTTP method (POST) many values to one field with diferent timestamps?

조회 수: 1 (최근 30일)
I need to send the one POST (by arduino) a day from solar device.I think I have bad syntax.Can you help me to correct it?
Write twice in the field1, but different values and different times ...

채택된 답변

Vinod
Vinod 2022년 2월 8일
I think you are looking to collect a bunch of data and upload a number of points in a single POST request. Take a look at this documentation: https://www.mathworks.com/help/thingspeak/bulkwritejsondata.html
  댓글 수: 2
Martin Olda
Martin Olda 2022년 2월 8일
I did, but it is not same situation, it has to be written in one row-for example for browser...
Christopher Stapels
Christopher Stapels 2022년 2월 8일
You cannot write to the same channel for two different times in the same post unless you use the bulk endpoint that Vinod suggested. Your arduino can handle a bulk update via HTTP POST, it does not need to be one line for a browser. See this example. You can use an app like POSTMAN to test the syntax.
If you want to have two values simultaneously, why not put the second value in another channel? Or you could put it in field 2 of the same channel and use field 3 for the timestamp, and then create a custom MATLAB visualization to display that data.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 Read Data from Channel에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by