Hi all,
I’m successfully using a Notehub route to send data from one device (Swan+n/c-F) to a ThingSpeak channel. Now I want to add multiple routes so each device sends its data to its own ThingSpeak channel.
How would I implement that? Is it as simple as creating a separate route for each device and giving each JSONata expression its own API key? Or do you somehow use the HTTP headers to distinguish and route each event to the right channel using a single ThingSpeak route?
I’ve read through the ThingSpeak routing tutorial and I’ve searched the forum for clues, and as is probably blatantly obvious I’m pretty new to JSON and the logic of the inner workings of routing code, so any suggestions for additional tutorials or a particular doc I should read would be awesome.
My seven devices will send all the same info and all the ThingSpeak channels will be set up with the same fields. Below is a copy of my working JSONata expression.
thanks!!
…Norm…
{
“api_key”:“”,
“field1”: body.airTmpC,
“field2”: body.humid,
“field3”: body.wTmpC@Sonde,
“field4”: body.DO,
“field5”: body.EC,
“field6”: body.Salty,
“field7”: body.TDS,
“field8”: body.pH
}