Help with basics - cant even copy data to another field

3 vues (au cours des 30 derniers jours)
Denis Lukashevich
Denis Lukashevich le 26 Déc 2020
Commenté : Vinod le 29 Déc 2020
Hi. I want to use matlab to calculate some data from my channel and send it ti new field. But even simple code cannot be done. What i do wrong? Every time i getting error : "URL is incorrectly formed, or the requested feature is not supported in this version of ThingSpeak". Here it is (channel is private):
readChannelID = 1071866;
writeChannelID = 1071866;
humidityFieldID = 1;
readAPIKey = 'xxxx';
writeAPIKey = 'yyyyy';
[hum1,time] = thingSpeakRead(readChannelID,'Fields',[humidityFieldID],'ReadKey',readAPIKey);
thingSpeakWrite(writeChannelID, hum1,'Fields',5,...
'TimeStamps', timestamps,'WriteKey',writeAPIKey);

Réponses (1)

Christopher Stapels
Christopher Stapels le 28 Déc 2020
Modifié(e) : Christopher Stapels le 28 Déc 2020
Timestamps in a channel must be uniqiue. Once written, you cannot edit a feed. A feed is the collection of a timestamp and the associated fields at that timestamp. You are trying to write data with the same timestamp as existing data to the channel. You would need to clear the channel to be able to write that data again. At the time that you write the first data point, you can simultaneously write all 8 fields, but not after you have written the feed.
  1 commentaire
Vinod
Vinod le 29 Déc 2020
To add to what Christopher said, if you are looking to modify the historical data in a channel, you can do that by writing out the modified entries to a new channel.

Connectez-vous pour commenter.

Communautés

Plus de réponses dans  ThingSpeak Community

Catégories

En savoir plus sur Prepare and Analyze Data dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by