Adafruit IO Feed variable value?

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
KarakoramJosh
 
Posts: 1
Joined: Wed Aug 04, 2021 7:33 am

Adafruit IO Feed variable value?

Post by KarakoramJosh »

Good afternoon everyone

I hope this is a simple one - I'm trying to write some data to IO from a Feather FONA using the MQTT library. I've successfully written data in a CSV format with the output VALUE, LONGITUDE, LATITUDE. It's written, seemingly automatically, to IO with the column headers "Created at", "Value", and "Location".
Image

My first question is how to split the "Location" data to be Longitude and Latitude, as is seen in this screenshot from one of the many tutorials out there.

Image

My second question, building on the first, is how to define my own data variables in IO. For instance, if I wanted to save satellite angle? Do I need to write this to another feed?

Thank you!

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Adafruit IO Feed variable value?

Post by brubell »

My first question is how to split the "Location" data to be Longitude and Latitude, as is seen in this screenshot from one of the many tutorials out there.
The location data should be sent separately as lat/lon/ele fields (see: https://io.adafruit.com/api/docs/#create-data):

Code: Select all

{
  "id": "string",
  "value": "string",
  "feed_id": 0,
  "feed_key": "string",
  "created_at": "datetime",
  "location": {},
  "lat": 0.0,
  "lon": 0.0,
  "ele": 0.0,
  "created_epoch": 0,
  "expiration": "datetime"
}
My second question, building on the first, is how to define my own data variables in IO. For instance, if I wanted to save satellite angle? Do I need to write this to another feed?
Ideally, define it in another feed. You could store it as IO-formatted JSON, too. https://io.adafruit.com/api/docs/cookbo ... oring-json

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”