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

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





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

Register Lost password?
sp_Feed sp_TopicIcon
RFE: Save without running (or run without action)
Avatar
sandeen

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
1
December 31, 2015 - 7:01 pm
sp_Permalink sp_Print

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

Avatar
Adarsh_Murthy

Forum Posts: 59
sp_UserOfflineSmall Offline
2
January 5, 2016 - 9:10 am
sp_Permalink sp_Print

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

Avatar
sandeen

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
3
January 7, 2016 - 12:54 pm
sp_Permalink sp_Print

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

Avatar
rw950431

Forum Posts: 252
sp_UserOfflineSmall Offline
4
January 7, 2016 - 11:45 pm
sp_Permalink sp_Print

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.

Avatar
sandeen

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
5
January 9, 2016 - 10:31 pm
sp_Permalink sp_Print

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

Avatar
Rob Purser
Natick, MA

Forum Posts: 46
sp_UserOfflineSmall Offline
6
January 10, 2016 - 7:22 am
sp_Permalink sp_Print

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!

Avatar
alk0v
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
7
September 9, 2016 - 2:57 am
sp_Permalink sp_Print

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

Avatar
alk0v
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
8
September 20, 2016 - 12:35 am
sp_Permalink sp_Print

Any updates? It's really problem.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: cstapels, jacktheripper125
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

Nsneilotof

angieus2

goldiepw11

BinanceoSt

gnarender123@gmail.com

edenderest

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee