Status show updated time but data not showing in channel

34 ビュー (過去 30 日間)
Innosens
Innosens 2025 年 6 月 11 日
編集済み: André 約5時間 前
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 件のコメント
André
André 約9時間 前
@Vinoid, Thanks for your interest regarding this problem. Yes, the problem ist still existent. Please refer to my seperate 'answer'.
André
André 約9時間 前
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...

サインインしてコメントする。

回答 (2 件)

Christopher Stapels
Christopher Stapels 2025 年 6 月 12 日
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.
  4 件のコメント
Innosens
Innosens 約19時間 前
this is the public channel 1293177
Innosens
Innosens 約19時間 前
This issue has been recurring since last week, and it is happening every day.

サインインしてコメントする。


André
André 約9時間 前
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
  1 件のコメント
André
André 約9時間 前
編集済み: André 約5時間 前
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.

サインインしてコメントする。

コミュニティ

その他の回答  ThingSpeak コミュニティ

カテゴリ

Help Center および File ExchangeWrite Data to Channel についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by