Hi @scruffr and @aguspg,
OK, started from scratch and created a simple version of my code based on @aguspg ‘s new example. I followed the guide on using the integrations manager – my hook, called “BINGO” looks like this
In the code provided by @aguspg he has a String variable called temp, I created one from my compiled incoming string called “staTstring”.
The relevant code is as follows:
Particle.publish(“BINGO”, staTstring, PRIVATE);
delay (5000);
When I load the code and look at the Particle console, I get constant
“error status 404 from things.ubidots.com” messages
which when expanded returns:
{“data”:“error status 404 from things.ubidots.com”,“ttl”:“60”,“published_at”:“2016-09-07T02:03:17.900Z”,“coreid”:“particle-internal”,“name”:“hook-error/BINGO/0”}
The Ubidots page does not create a new variable…
I do see BINGO being published, and the data attributed to it is correct from the sensor. The console looks like this…
OK, so now if I replace the basic code with @scruffr ‘s previously suggested code
char msg[64];
snprintf(msg, sizeof(msg), “{“STATIC_PRESSURE”:”%d"}", staTConvert);
Particle.publish(“BINGO”, msg, PRIVATE);
I get this error;
{“pressure”: [{“status_code”: 400, “errors”: {“value”:
which when expanded returns
{“data”:"{“pressure”: [{“status_code”: 400, “errors”: {“value”: ["’{“STATIC_PRESSURE”:“691”}’ value must be a float."]}}]}",“ttl”:“60”,“published_at”:“2016-09-07T02:10:59.840Z”,“coreid”:“particle-internal”,“name”:“hook-response/BINGO/0”}
HOWEVER – A new variable recognising my Photon IS created in Ubidots – but has no data. As the error message stated the value must be a float - I converted the staTConvert integer to a float - but same result.
Sorry for being longwinded – but really confused by this. Hope you guys have the patience to help.