0

Non-realtime data?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Non-realtime data?

by samr on Fri Apr 12, 2019 12:44 pm

Is there a way to upload non-realtime data to AIO? If I have an array of sensors on something that for various reasons can't connect to AIO and upload sensor data in realtime, but instead logs time and geolocation stamped sensor data to an SD card on a datalogging shield, can I use the API to upload that sensor data to AIO feeds after the fact from say a python script on a computer that is reading from the SD card? When I upload later, do I have the opportunity to set the timestamp and geolocation information for the sensor readings so that the data when viewed/read will have the correct timestamps and geo location info?

If this is possible, any pointers to documentation would be appreciated!

samr
 
Posts: 40
Joined: Tue May 14, 2013 3:03 pm

Re: Non-realtime data?

by brubell on Mon Apr 15, 2019 10:43 am

can I use the API to upload that sensor data to AIO feeds after the fact from say a python script on a computer that is reading from the SD card?


Yep, you might want to write a Python script to do this. Keep in mind, you will get rate-limited if you send too much data to Adafruit IO - keep the script within the limit.

When I upload later, do I have the opportunity to set the timestamp and geolocation information for the sensor readings so that the data when viewed/read will have the correct timestamps and geo location info?


Absolutely - check out the request body of the createData API endpoint. Specifically, created_at (datetime of data creation) and lat/lon/ele (to set the geolocation of the data point).

https://io.adafruit.com/api/docs/#operation/createData

brubell
 
Posts: 531
Joined: Fri Jul 17, 2015 10:33 pm

Re: Non-realtime data?

by samr on Mon Apr 15, 2019 9:09 pm

Is there someplace that defines the format for the created_at, lat, lon, and ele string values?

What is the format of the datetime string that you pass for created_at?

Are the latitude and longitude in (a) degrees, minutes, and seconds (e.g., lat='40° 26\' 46" N' or lon='79° 58\' 56" W'); or (b) in degrees and decimal minutes (e.g., lat='40° 26.767\' N' or lon='79° 58.933\' W'); or (c) decimal degrees (e.g., lat='40.446° N' or lon='79.982° W')? And do the strings include N/S/E/W designations? Or do they used signed values to indicate N/S of the equator and E/W of the prime meridian?

Is the ele an integer? A float? Does it have units ("127m" for 127 meters?)

samr
 
Posts: 40
Joined: Tue May 14, 2013 3:03 pm

Please be positive and constructive with your questions and comments.