I have a TimeControl to trigger Matlab Analysis that fetches some external data to write to my ThingSpeak channels. It has been working just fine, until around May 6 2023 11:30AM UTC when it stopped working all of a sudden.
I could see in my Matlab Analysis that it Timed out. I fixed the issue in the Analysis. It ran just fine (manually). But when I set it up to be triggered from the TimeControl, it didn't work, even if I changed the frequency or made it a one-time thing. I even removed the TimeControl and made a new one but still nothing works. The Last Ran field remains empty even after the supposed trigger time.
Can someone please look into this issue? Thank you very much in advance.

댓글 수: 8

Perky Whale
Perky Whale 2023년 5월 7일
Same thing has happened to all my time controls, as of around 11:20 UTC. I'm surprised more people aren't raising this issue.
Time controls have just stopped running.
N Nowag
N Nowag 2023년 5월 7일
Same with me.
Ahmed bin Ali
Ahmed bin Ali 2023년 5월 7일
Same with me
Deniz B
Deniz B 2023년 5월 7일
Same with me too.
I even deleted and recreated my time controls but still not working. Matlab analysis' work fine when manually triggered.
Ser Gio
Ser Gio 2023년 5월 7일
same issue. Last TimeControl ran at May 6 2023 11:24 AM UTC. It´s configured to run each 20minutes.
Hope it can be fixed.
Same problem here, last TimeControl at May 6 2023 11:26 AM UTC.
Perky Whale
Perky Whale 2023년 5월 8일
편집: Perky Whale 2023년 5월 8일
Looks like it's up and running again as of about half an hour ago. 🤙
Vince Nguyen
Vince Nguyen 2023년 5월 8일
Cool, thanks! Waiting for an official explanation for why this happened

댓글을 달려면 로그인하십시오.

 채택된 답변

Christopher Stapels
Christopher Stapels 2023년 5월 8일

1 개 추천

TimeControls are working fine as of May 8 12:45 UTC. If you continue to see missing TimeControls, please comment here.

댓글 수: 25

Ser Gio
Ser Gio 2023년 5월 9일
Thank you !!
Vince Nguyen
Vince Nguyen 2023년 5월 9일
Do you know what happened and if it might happen again in the future? Thanks!
Over more than 6 years of using ThingSpeak, this is the first time I have experienced a timeControl not running when planned. We have addressed the issue and expect TimeControls to continue to be as reliable as they have been in the past.
Perky Whale
Perky Whale 2023년 6월 21일
So it turns out this hasn't been fully fixed, at least for me. I have a time control running a matlab analysis every 10 minutes, it often doesn't run up to 4 or 5 times in a row. There are no errors in the analysis, it's the time control just not running.
Thanks for the update. Can you share what your analysis code does so we can verify that part? I will check the logs to see if there is any indication.
Perky Whale
Perky Whale 2023년 6월 22일
It reads JSON data from a public weather station, parses some stuff and updates a thingspeak channel. Whenever the time control fails, I can run the analysis manually with no issues. The time control also shows the last time it ran, which can show 50 minutes ago despite it being a 10 minute frequency. The analysis never shows any error.
Is there any other process that updates the same channel?
We arent seeing extra records of any failed TimeControls right now.
Perky Whale
Perky Whale 2023년 6월 22일
This is what I'm seeing currently for the time control. There's nothing else updating the channel.
Recurrence Last Ran Run At
Every 10 minutes 2023-06-23 1:43 am 2023-06-23 2:12 am
Could you comment out the weather API part and just have it write a static value to the channel for a few cycles? Just to see if it is more consistant.
You dont have fuzzy timing set on the TimeControl do you?
Perky Whale
Perky Whale 2023년 6월 22일
I don't have the option for fuzzy timing for 10 minute intervals, only 15 and up I think.
I just successfully manually ran the matlab analysis 3 times in the couple of minutes before the time control was due to trigger, no problems with the code and it ran fine. The time control failed to run the analysis at 02:52 when it was due. It now says last ran 01:43, run at 03:02.
I could write static values to be sure but it does look like the time control just isn't running the analysis.
Perky Whale
Perky Whale 2023년 6월 22일
I should add that I've previously deleted this time control and created another to do the same thing but it didn't fix it.
Thats good that you tried a new timeControl and tested the code seperately. Can you try the static write only experiment when you get a chance?
Perky Whale
Perky Whale 2023년 6월 22일
I changed the time zone from local (Wellington NZ) to UTC and it hasn't skipped a beat since. A bug in the timezone coding maybe? That would explain why there are no alerts for a time control failing to run if it's not being prompted to run. Just a guess :)
Neat, thanks for the troubleshooting! Ill try out that time zone with my account and see.
Vince Nguyen
Vince Nguyen 2023년 8월 9일
Hello, TimeControl stopped working again for me. The last time it ran for me was 2023-08-09 6:46 AM GMT. It was working just fine these days but stopped again all of a sudden.
Thanks @Vince Nguyen. I see some missing TimeControls for my account as well. Ill report it to the appropriate authorities and post here if we get more news.
Service went down last night, should be restarted within an hour.
N Nowag
N Nowag 2023년 8월 9일
Thanks Chris for the update.
TimeControls running at 11:11 EST this morning
Vince Nguyen
Vince Nguyen 2023년 8월 9일
It's working again now, thanks a lot for your help
chris weedon
chris weedon 2023년 10월 16일
I'm having a similar problem. I run the time control on my data once every 24 hours at 11pm (GMT) it appears to work for a few days then stops.
The issue we had back in May with TimControls has been corrected. Mine are definitely running fine now, and since then. If your time control is stopping, it may be due to MATLAB code that is not able to run correctly. If your code has an error, eventually ThingSpeak will stop the TimeControl execution. If your code has a sporadic error, perhaps you arent seeing it at set up time. You could consider recording the output to a channel to see if it rac correctly, ot put try catch loops in your code to make sure it completes even if there is a code failure.
chris weedon
chris weedon 2023년 10월 16일
If I run it manually it works fine without showing any errors. The code itself reads my weather station data and calculates the Min, Max and Average temperatures and outputs it to another channel.
I am not sure how to add catch loops in the code
We should probably start a new thread for this.But Ill put a quick example here. If you get stuck, please start a new post. If you wanted to catch an error for example with the thingSpeakRead command, you could use the following.
Since you dont have acess to the code when its triggered by timeControl, in the catch part at the bottom, you could replace
disp(ME.message)
with something like
thingSpeakWrite(channelId, ME.message,, 'WriteKey', writeKey);
that way the error message would get recorded to a channel.
try
thingSpeakRead(channelID, data, 'WriteKey', writeKey);
catch ME
disp(ME.message);
end
I recently had an error form reading data and calculating the mean because in some instances, I didnt realize there wasnt any data to read and the code was failing. You might try wrapping the calculaiton part of your code in a try catch loop. It wont make the calculation fail, but it will make it so the code continues running even when it hits the error.
chris weedon
chris weedon 2023년 10월 18일
thanks it seems to be working, I'll keep an eye on it

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

도움말 센터File Exchange에서 Visualize Data에 대해 자세히 알아보기

태그

질문:

2023년 5월 7일

댓글:

2023년 10월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by