[SOLVED] Particle Webhook - Variables Created but no Data Passed

I am sending a long Webhook from Particle (still less than 255 characters) and the variables are created on Ubidots but no values are created under the variables and no response is coming back.

Any suggestions on how to start to figure this out?

Here is the Webook format:

{
  "ccsTemp": "{{ccsTemp}}",
  "ccsCO2": "{{ccsCO2}}",
  "ccsTVOC": "{{ccsTVOC}}",
  "bmeTemp": "{{bmeTemp}}",
  "bmeBarometric": "{{bmeBarometric}}",
  "bmeHumidity": "{{bmeHumidity}}",
  "reset": "{{resetCount}}"
}

and here is what gets sent from the Particle Console:

{"data":"{\"ccsTemp\":95.50, \"ccsCO2\":0.00, \"ccsTVOC\":0.00,\"bmeTemp\":25.21,  \"bmeBarometric\":1017.42,\"bmeHumidity\":42.26,\"resets\":3}","ttl":60,"published_at":"2018-05-22T21:27:49.962Z","coreid":"30002b001851353338363036","name":"Environmental_Hook"}

here is what Ubidots sends as a response:

{"data":"{\"ccstvoc\":[{\"status_code\":204}],\"bmetemp\":[{\"status_code\":204}],\"bmebarometric\":[{\"status_code\":204}],\"bmehumidity\":[{\"status_code\":204}],\"resets\":[{\"status_code\":400,\"errors\":{\"value\":[\"A valid number is required.\"]}}],\"ccstemp\":[{\"status_code\":204}],\"c","ttl":60,"published_at":"2018-05-23T03:52:35.437Z","coreid":"30002b001851353338363036","name":"Ubidots Hook"}

And the variables are created on Ubidots:

Is there an issue sending float values?
Am I sending too many values at once?
Am I exceeding the max length of a Webhook?

Thank you in advance for any help.

Chip

Hello @chipmc,

As I can note in the response of the server, you are sending a value that is not supported for the Ubidots Backend which is “resets” variable. Can you let me know which type of variable have “resets” assigned?

Based on the reason that one of the parameters of the payload is not allowed, the Ubidots backend rejects the all the data which is being sent and it creates the device empty. To check this, you can force the request in order to post the other variables and see how the only variable which is not going to be posted is the reset one; for this, you should add the force parameter which is carefully explained in the Ubidots Rest API.

All the best,
Maria C.

@mariahernandez,

OK, Figured it out and it was very basic. changed {{resetCount}} to {{reset}} and it worked.

Chip

1 Like