Hi, Particle community, I’m start with Webhooks few days ago.
I try to use thingboards.org for dashboard and visual data,I install a Community version in aws server 1G RAM and 40G ssd, five bucks a month, looks great!
I use the follow code in my Electron:
char data[256];
t = Time.now(); //Unix Format
snprintf(data, sizeof(data), "{\"rain\":%i,\"battery\":%i,\"temp\":%i,\"time\":%ld}",pulses, stateOfCharge, temperatureC,t);
Particle.publish("telemetry",data, PRIVATE);
I want to send data to thingsboards with the particle timestamp, this json format :
{"ts":1451649600512, "values":{"key1":"value1", "key2":"value2"}}
is required, look at Unix Timestamp “ts”.
I configure this json webhook :
{
"ts": "{{time}}",
"values": {
"Webhook": "{{{PARTICLE_EVENT_NAME}}}",
"rain": "{{rain}}",
"Bateria": "{{battery}}",
"Temperatura": "{{temp}}",
"Time": "{{time}}",
"Published": "{{PARTICLE_PUBLISHED_AT}}"
}
}
if I replace the "{{time}}"
for a unix timestamp, "ts":1451649600512
, whitout quotes, all is ok.
Is posible using the json webhook with integers?
thanks in advance
I spend all the day looking for answer :(((