Hi, I’ve hit a roadblock with my first TTN implementation and would appreciate any guidance please.
I’m generally following the approach described in the published example, Collect Agricultural Data over The Things Network for passing data from my Arduino based device via TTN to ThingSpeak for visualisation. My issue is that the TTN Integration for ThingSpeak does not successfully pass the decoded payload data to my ThingSpeak channel. Some details:
I am still at proof-of-concept stage and yet to put effort into robustness etc. and the device currently sends an unchanging encoded payload. The upstream application data payload (weather observation data) is successfully decoded on TTN:
using a simple decoder script:
function Decoder(bytes, port) {
var epochtime = ((bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0] );
var temp = ((bytes[5] << 8) | bytes[4])/10.0;
var humidity = ((bytes[7] << 8) | bytes[6])/10.0;
var baropress = ((bytes[9] << 8) | bytes[8])/10.0 + 1000.0;
var rainfall = ((bytes[11] << 8) | bytes[10])/10.0;
var windspeed = ((bytes[13] << 8) | bytes[12])/10.0;
var winddirn = (bytes[15] << 8) | bytes[14];
var lat = -38.293;
var long = 144.996;
var height = 105;
return {
field1: epochtime,
field2: temp,
field3: humidity,
field4: baropress,
field5: rainfall,
field6: windspeed,
field7: winddirn
};
}
The ThingSpeak channel is in place and I have been able to directly import a file of arbitrary test data and have also used the ThingSpeak API directly to POST data into individual fields. These are shown in the following screen capture from the Channel (the data input via individual API calls is circled).
My ThingSpeak integration on TTN is configured with the same write API key & channel credentials and is reported on the TTN Console as Running (v2.7.10). However, no data appears in my channel from TTN - all data in the channel is confirmed as being from my input directly to ThingSpeak.
I’m in Australia, configured on meshed-router and meshed-handler, and using the Australian console console.thethings.meshed.com.au.
With only two parameters to configure in the Integration and in the absence of error reporting, I’m at an impasse. Search of earlier Forum posts suggest this should all be straightforward now with the ThingSpeak Integration, so I’d greatly appreciate any guidance as to where I have taken a miss-step or not understood. Thanks.