CSV Upload from the last read data | Raspberry Pi | Forum


Please consider registering

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
CSV Upload from the last read data
No permission to create posts
October 17, 2018
11:19 am
New Member
Forum Posts: 1
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline

Hello there! I need a little help in terms of logic and programming.

I have a CSV file stored on my raspberry pi 2 B+ having an Ethernet connection to ThingSpeak channel. I have written a python code, running which I am able to upload the data (a record every 15 seconds). This record contains both string and integer values. THIS IS ALL WORKING FINE. Now let's say I have around 500 rows of data and I uploaded around 200 of them in the last sitting. How can I continue/resume from row # 201 just by running the same python code again (without making any amendments). Since I want to keep it real-time, I want to run the same python code every time and the data should be APPENDED to the ThingSpeak channel starting from the last UNREAD record.

Thanks in advance!

October 17, 2018
8:29 pm

Forum Posts: 610
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

All ThingSpeak data is time series data, so you should have no problem keeping your points in order.

What process did you use to upload the first 200 points?

If you used the MATLAB thingSpeakWrite command, you would have provided timestamps. If you want the new data to be in chronological order, just provide timestamps that are in the desired order.
If you did not provide timestamps, ThingSpeak will order the points in the order that you send them.

If you used the REST API, for example, and updated one point at a time, they would have a timestamp that corresponds exactly with the time you sent them.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
40 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:

kishore.damam@gmail.com, HORLY, Wittstov, james, OMGOMG, kiran jadhav

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457