So just for testing I have simply modified my original Particle.publish
into a JSON string (I think). It will send the whole thing as a single JSON element (which was the original plan anyway to save data, as it will bw sending data very frequently).
This is the Particle.publish()
comman at the moment (please ignore how messy and ugly it is right now, I plan to make this MUCH nicer once I get everything working):
Particle.publish("w", "{\"data1\":" + getGpsDateTime() + "," + getGpsLoc() + "," + fuelSoCStr + "%," + fuelVoltStr + "V," + tempStr + "C," + getHumPres() + "," + getUvIndex() + "}");
And this is my weather.json
file:
{
"event": "w",
"url": "http://requestb.in/1l7tujd1",
"requestType": "POST",
"mydevices": "true",
"json": {
"measurements": {
"sensor1": "{{data1}}"
}
},
"noDefaults": true
}
And this is what is being returned in dashboard.particle.io
(I’m monitoring it via curl):
event: w
data: {"data":"{\"data1\":1456951141,41.2082,-73.3439,85%,3.97V,21.8C,26.7%,959.8hPa,0.016117}","ttl":"60","published_at":"2016-03-02T20:39:10.189Z","coreid":"540056000a51343334363138"}
event: hook-sent/w
data: {"data":"undefined","ttl":"60","published_at":"2016-03-02T20:39:06.263Z","coreid":"particle-internal"}
event: hook-response/w/0
data: {"data":"ok","ttl":"60","published_at":"2016-03-02T20:39:06.280Z","coreid":"particle-internal"}
I am using requestb.in
(http://requestb.in/1l7tujd1) for testing, and the output it currently gives me is:
ok
And according to (http://requestb.in/1l7tujd1?inspect) it is recieving no POST parameters, with the raw body being this:
"measurements":{"sensor1":""}}
Again, any help would be greatly appreciated, and thank you for your help thus far.