Help with basics - cant even copy data to another field

1 visualizzazione (ultimi 30 giorni)
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);

Risposte (1)

Christopher Stapels
Christopher Stapels il 28 Dic 2020
Modificato: Christopher Stapels il 28 Dic 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 Commento
Vinod
Vinod il 29 Dic 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.

Accedi per commentare.

Community

Più risposte nel  ThingSpeak Community

Categorie

Scopri di più su Prepare and Analyze Data in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by