RFE: Save without running (or run without action) | ThingSpeak Apps | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
RFE: Save without running (or run without action)
No permission to create posts
December 31, 2015
7:01 pm
Avatar
sandeen

Silver
Members
Forum Posts: 8
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

I have some MATLAB Analysis apps that run daily at midnight via TimeControl. The problem is, if I want to modify the app, the only option is "run and save" - and because they write data points, and there is no facility to delete data points, it's a conundrum - I pollute the target channel.

It'd be nice to be able to do a "save and sandbox run" or "save and run with writes disabled" or something, in order to make a change, verify its operation, but not mess with associated TimeControl actions.

Thanks,
-Eric

January 5, 2016
9:10 am
Avatar
Adarsh_Murthy

MathWorks
Members
Forum Posts: 62
Member Since:
August 25, 2015
sp_UserOfflineSmall Offline

Hi Eric,

Thanks for the feedback. We will consider adding an option to run in "sandbox" mode and also delete individual data points in a future release.

In the meanwhile, a couple options that I use in this situation are:

1. Comment the 'thingSpeakWrite()' line until I am satisfied with the code in the App. Uncomment it after and "Run and save" it again.
2. If I need to write the data to a channel, I create a new channel to verify the workflow. After verifying the workflow and the data, I change the writechannelID to point to the desired channel and then "Run and Save" it again.

Thanks,
Adarsh

January 7, 2016
12:54 pm
Avatar
sandeen

Silver
Members
Forum Posts: 8
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

Yeah, the problem is, it is set to run at midnight, to analyze daily numbers. So I'd need to wait until a bit before midnight, disable the time control, save&run it at midnight, then re-enable the time control after midnight.

It's not exactly convenient. 😉

Thanks,
-Eric

January 7, 2016
11:45 pm
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Or you could add a little bit of logic to your code that discovers the time of day and only writes to the real channel when the time is right (see http://au.mathworks.com/help/matlab/ref/clock.html)

Obviously you need to test the logic on a seperate channel until you are happy that it works..

As a last resort you could remove polluted data by downloading the whole channel as CSV, removing the extraneous points in a spreadsheet, R or your language of choice, deleting all the channel data then re-importing the clean version.

January 9, 2016
10:31 pm
Avatar
sandeen

Silver
Members
Forum Posts: 8
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

Oh, that's a good idea. 😉 That'll work for now. Thanks for the suggestion.

January 10, 2016
7:22 am
Avatar
Rob Purser
Natick, MA

MathWorks
Members
Forum Posts: 46
Member Since:
August 22, 2015
sp_UserOfflineSmall Offline

I often lead my "once a day" analysis with code like:

[lastvalue,dateLastAnalyzed] = thingSpeakRead(30040,'ReadKey','yadayada','Field',2,'URL', 'http://api.thingspeak.com');

if dateLastAnalyzed < datetime('today','TimeZone','UTC')
...

Senior Development Manager for IoT and Hardware Interfacing for MATLAB at MathWorks.  Visit ThingSpeak.com to explore the IoT Analytic platform that speaks MATLAB made for engineers and scientists.  You can collect, analyze, and act in 5 minutes or less!

September 9, 2016
2:57 am
Avatar
alk0v
New Member
Members
Forum Posts: 2
Member Since:
September 9, 2016
sp_UserOfflineSmall Offline

Hi, i have same problem, with time-scheduled scripts, just separate "Save" and "Run" buttons.

September 20, 2016
12:35 am
Avatar
alk0v
New Member
Members
Forum Posts: 2
Member Since:
September 9, 2016
sp_UserOfflineSmall Offline

Any updates? It's really problem.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

harriettlf60, ShaToow, Aleftinfenny, DiaBentee, hugo11dom@gmail.com, Pisaruk530

Administrators: Hans: 387, lee: 457