How to send by HTTP method (POST) many values to one field with diferent timestamps?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Martin Olda
el 8 de Feb. de 2022
Comentada: Christopher Stapels
el 8 de Feb. de 2022
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 ...
0 comentarios
Respuesta aceptada
Vinod
el 8 de Feb. de 2022
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 comentarios
Christopher Stapels
el 8 de Feb. de 2022
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.
Más respuestas (0)
Comunidades de usuarios
Más respuestas en ThingSpeak Community
Ver también
Categorías
Más información sobre ThingSpeak en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!