Server side summing/averaging | General | 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
Server side summing/averaging
No permission to create posts
December 30, 2014
2:09 am
Avatar
larsilund
New Member
Members
Forum Posts: 4
Member Since:
December 29, 2014
sp_UserOfflineSmall Offline

Viewing channel data in detail as well as aggregated is a common use of time seried data. The automatic summing and averaging features on the channel feeds are great, but the limit of 8000 underlying data point limit is a real showstopper. With measurements taken at 16 s intervals the aggregated feeds are limited to less than two days.

The suggested solution on this forum is to download the data, aggregate them, and upload the data to a new channel. This is of course possible, but requires both programing skills and and an available suitable computer (iPads wont do). The user also har to do this processing on a regular basis (a scheduled job) in order to keep the aggregated channels up to date.

It woud therefore be great if this could be done server side. Provide every field in the channel setup with a summing option (checkboxes for hourly and daily, and a sum/average/median/... dropbox). The server could then automatically do the summing/averaging/etc. to a "hidden channel" at the end of every day/hour. Aggregated request could then get data from this "hidden channel" instead of real time summing/averaging. This would probably reduce the server overall load.

When this option is changed for a field the server could que a job resumming the field to the hidden channel.

This would make this great server even greater, and extend the possibilities to do both coarse and detailed graphs on the same data series. Great for both temperature and energy monitoring.

December 30, 2014
9:21 am
Avatar
lee

Admin
Forum Posts: 457
Member Since:
March 14, 2011
sp_UserOfflineSmall Offline

Hi Lars,

We do some of what you're suggesting on a daily basis already. For example, if you set a sum/average/median value of 1440 (or daily), we store that data in a separate "hidden channel" that can then be quickly requested again. The first time the request is made, the response will be slow since the data has to be calculated, but on subsequent requests of precalculated data the response will be fast.

Here's an example: http://api.thingspeak.com/channels/9/feeds.json?days=10&sum=daily .

lee

December 30, 2014
4:26 pm
Avatar
larsilund
New Member
Members
Forum Posts: 4
Member Since:
December 29, 2014
sp_UserOfflineSmall Offline

Does that mean that the limit of 8000 underlying values do not exist when requests are made for 1440/daily?
Can i make requests for daily sums for longer periods?
Is there another limit for such feed requsts?

To make great applications based on any tool you must know the strengths and limitations of that tool.

I would appreciate well documented limitations. A well-documented error return when the limits are exceeded would also be appreciated. Just returning null values does not give many hints for debugging.

Lars

December 31, 2014
9:09 am
Avatar
lee

Admin
Forum Posts: 457
Member Since:
March 14, 2011
sp_UserOfflineSmall Offline

Hi Lars,

Yes the 8000 results limit does not apply for daily feeds if sum/average/median/timescale are used. You can make requests for as many days as you want; there is no limit for these requests.

We will work on improving our documentation and returned errors.

lee

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
24 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

Team_mafia, icXu, emorphistechno, VTVMART, manimozhi, adamhebrew

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457