Location data along fields vs channel settings
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
George Popovici
am 10 Jul. 2020
Kommentiert: George Popovici
am 14 Jul. 2020
Hello,
Could you please help in explaining what is the difference between location data along the 8 available fields and location data on channel settings? Shouldn't be it be the same data?
Below is an example:
I set the location data:
POST /update.json HTTP/1.1
Host: api.thingspeak.com
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: XX
api_key=XX&lat=45.01&lon=27.01&1=44.444&elevation=10.1
I get the data from channel fields:
{
"channel": {
"id": 1094740,
"name": "Caravan_ESP32",
"latitude": "44.412",
"longitude": "26.123",
"field1": "Humidity",
"field2": "Temperature",
"field7": "boot_count",
"field8": "h_thres",
"created_at": "2020-07-06T13:59:32Z",
"updated_at": "2020-07-10T06:11:42Z",
"last_entry_id": 11298
},
"feeds": [
{
"created_at": "2020-07-10T05:51:33Z",
"entry_id": 11298,
"field1": "44.444",
"latitude": "45.01",
"longitude": "27.01",
"elevation": "10.1"
}
]
}
I get the data from channel settings:
{
"id": 1094740,
"name": "Caravan_ESP32",
"description": "",
"latitude": "44.412",
"longitude": "26.123",
"created_at": "2020-07-06T13:59:32Z",
"elevation": "",
"last_entry_id": 11298,
"public_flag": false,
"url": "",
"ranking": 30,
"metadata": "",
"license_id": 0,
"github_url": null,
"tags": [],
"api_keys": [
{
"api_key": "XX",
"write_flag": true
},
{
"api_key": "XX",
"write_flag": false
}
]
}
As you can see above, location data is different. When I write location data as above, I would like to see it updated in the channel location. Is this possible?
Thanks,
George
0 Kommentare
Akzeptierte Antwort
Vinod
am 10 Jul. 2020
The lat-lon of the channel is where the channel is located. The lat-lon of the feed is where the actual feed was measured.
To take a concrete example, say you had one channel for your farm. On your farm you had multiple sensors (maybe an autonomous lawn mower?). Each sensor might make a reading at a different GPS location, but, your farm itself (and the channel) doesn't move. The channel lat-lon is used to show the map on the channel view. The feed lat-lon may be used to overlay the location of each individual sensor reading on the map, like this example.
5 Kommentare
Weitere Antworten (0)
Communitys
Weitere Antworten in ThingSpeak Community
Siehe auch
Kategorien
Mehr zu Read Data from Channel finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!