Status show updated time but data not showing in channel
Mostrar comentarios más antiguos
Hi, my channel upated time showed current time and date, but data did not appear in channe and last entry was 5 hours ago
10 comentarios
Christopher Stapels
el 11 de Jun. de 2025
Are you able to update the channel manually? (using the web browser and the syntax from the api keys tab of your channel)
Innosens
el 11 de Jun. de 2025
Innosens
el 11 de Jun. de 2025
Christopher Stapels
el 11 de Jun. de 2025
my channels seem to be updating fine at present. I looked at public channels and found at least this ine that is updating https://thingspeak.mathworks.com/channels/357142
The manual update syntax is
https://api.thingspeak.com/update?api_key=WRITEAPIKEY&field1=1010
Innosens
el 12 de Jun. de 2025
André
el 17 de Dic. de 2025
I have similar problems in my private channel.
Single row updates work fine and nearly instantanious but multi row updates seem to last hours.
The Problem appeared the first time on last Friday 12th December, since Monday constantly occuring and worse.
André
el 18 de Dic. de 2025
@Vinoid, Thanks for your interest regarding this problem. Yes, the problem ist still existent. Please refer to my seperate 'answer'.
André
el 18 de Dic. de 2025
Oh, but now after writing this. I restarted the test. and everything worked fine!
So I cannot say if it is gone forever, but by now...
Respuestas (2)
Christopher Stapels
el 12 de Jun. de 2025
0 votos
Glad you got your data stream working again. Since I didn't see any change in behavior in any of my channels, I suspect it has something to do with your system Often network connectivity for devices can be unpredictable. You may be able to add tracking of signal strength into your code.
Its rare but I have heard of devices having long tern connectivity issues, if your code is written to never reconnect, that may be an issue. Most of the times I saw those type of errors, it was fixed in the wifi library. knowing the hardware you are using might help.
One more possibility is that whatever sensor data you are mesuring could have changed. For example, if you were measuring tempuratere, and it got really hot, then you might have an extra character in the temperature that would change the nature of the psot and possible break it. If you share more information about your process, it would help diagnose the issue.
André
el 18 de Dic. de 2025
0 votos
I tried to illustrate the problem with an example yesterday evening. Sorry for using the answer function but I felt to have not enougth space in the comment function for this large example.
Therefore I created a new channel and implemented more or less following.
- show actual rows: 44
- insert 4 rows
- show actual rows: 44
- insert a single row
- show actual rows: 45
- wait for the missing rows
- ... about three hours later
- show actual rows: 49
I think this delay isn't normal and I guess I would have detected it in my project. Any help is apreciated.
Example Script:
% Access Keys for the data
ChID= 3206566; %new Test Channel
RKey= 'xxxxx';
WKey= 'xxxxx';
% Parameter
batchSize= 4;
% Get current state
data= thingSpeakRead(ChID, ReadKey=RKey, NumDays=10, OutputFormat='TimeTable');
rows= size(data, 1);
fprintf('%s, Rows before batch test: %i\n', datestr(now), rows)
targetRows= rows+batchSize+1;
% Write batch test
ts= datetime('now')-minutes(batchSize-1):minutes(1):datetime('now');
val= randi(10,numel(ts),3);
result= thingSpeakWrite(ChID, Values=val, TimeStamp=ts, WriteKey=WKey)
pause(20); %to ensure 15s before next write
% Get state after batch test
data= thingSpeakRead(ChID, ReadKey=RKey, NumDays=10, OutputFormat='TimeTable');
rows= size(data, 1);
fprintf('%s, Rows after batch test: %i\n', datestr(now), rows)
% Write single row test
ts= datetime('now');
val= [9 9 9];
result= thingSpeakWrite(ChID, Values=val, TimeStamp=ts, WriteKey=WKey)
% Get state after single row test
data= thingSpeakRead(ChID, ReadKey=RKey, NumDays=10, OutputFormat='TimeTable');
rows= size(data, 1);
fprintf('%s, Rows after single row test: %i\n', datestr(now), rows)
% wait for rows reaching the table
while rows<targetRows
data= thingSpeakRead(ChID, ReadKey=RKey, NumMinutes=24*60, OutputFormat='TimeTable');
rows= size(data, 1);
fprintf('%s, Current rows: %i\n', datestr(now), rows);
pause(120);
end
fprintf('%s, Now all rows can be found: %i\n', datestr(now), rows)
% print inserted data
data(end-batchSize:end,:)
Output
17-Dec-2025 20:54:07, Rows before batch test: 44
result =
'{"success":true}'
17-Dec-2025 20:54:28, Rows after batch test: 44
result =
struct with fields:
Field1: '9'
Field2: '9'
Field3: '9'
Field4: []
Field5: []
Field6: []
Field7: []
Field8: []
Latitude: []
Longitude: []
ChannelID: 3206566
Created: 17-Dec-2025 20:54:28
LastEntryID: 45
Altitude: []
17-Dec-2025 20:54:28, Rows after single row test: 45
17-Dec-2025 20:54:28, Current rows: 45
17-Dec-2025 21:02:29, Current rows: 45
17-Dec-2025 21:04:29, Current rows: 45
17-Dec-2025 21:06:29, Current rows: 45
...
17-Dec-2025 23:54:30, Current rows: 49
17-Dec-2025 23:56:30, Now all rows can be found: 49
ans =
5×3 timetable
Timestamps Spalte1 Spalte2 Text3
____________________ _______ _______ _____
17-Dec-2025 20:51:07 9 7 10
17-Dec-2025 20:52:07 10 1 10
17-Dec-2025 20:53:07 2 3 2
17-Dec-2025 20:54:07 10 6 10
17-Dec-2025 20:54:28 9 9 9
2 comentarios
After posting this I had a completely nice run of this test. But the output of the next one is completely strange! The rows become randomly less again. It looks like thingspeak has some long lasting synchronization problems on its backbone servers. The script is still running, for more the 10 Minutes already.
Update: It became to stange now. The data found in the loop became less and less. I ask for 10 days of data and created the channel yesterday. So it cannot be the other end of the data.
Then I stopped the loop and asked with NumPoints=8000. There a warning says me that so much data isn't in the channel and it gives me nearly all. But a single row I insertet this mornig in between others is still (or again) missing. So I have now clue. I have updated the output with my tests now...
(sorry for so many logs, but it's to strange)
Another update: Sorry I've found my mistake. In the loop I queried 24 hours, only. The test from yesterday is still valid, because between cration and test was less than 24 hours. So we are back at still missing this misterious single row, right now. I'll update again, when it appears.
New output makes no sense anymore. I cleared it.
Vinod
el 18 de Dic. de 2025
Putting this out here for any future readers of this thread - when a number of points are batched up and written using the /bulk_update endpoint or thingSpeakWrite, the channel is updated in the background. In this workflow, the channel is "eventually consistent" and not "immediately" updated. The reasoning behind this being that if a device or process is batching up the data and sending it, there is an implicit assumption that it is not "real time". If you need the channel to be updated in "real time", sending in one point at the time of measurement using the /update endpoint is the way to do it.
I'll work to add a note in the documentation to clarify this.
Comunidades de usuarios
Más respuestas en ThingSpeak Community
Categorías
Más información sobre Write Data to Channel en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!