telegraf/plugins/inputs/webhooks/particle
DazWilkin 558afe7f04 Fixed Go tests 2016-07-31 18:26:58 -07:00
..
README.md Add Particle Webhook Plugin 2016-07-31 16:56:28 -07:00
particle_webhooks.go Fixed Go formatting 2016-07-31 17:30:34 -07:00
particle_webhooks_mocks.go Fixed Go formatting 2016-07-31 17:30:34 -07:00
particle_webhooks_models.go Fixed Go formatting 2016-07-31 17:30:34 -07:00
particle_webhooks_test.go Fixed Go tests 2016-07-31 18:26:58 -07:00

README.md

Particle Webhook

Particle Webhook Plug-in for Telegraf

Particle events can be sent to Webhooks. Webhooks are configured using Integrations. Assuming your Particle publishes an event called MY_EVENT, you could configure an Integration with:

  1. "Event Name" set to MY_EVENT
  2. "URL" set to http://MY_IP:1619/particle
  3. Leave "Request Type" set to "POST"
  4. Leave "Device" set to "Any"

Replace MY_EVENT and MY_IP appropriately.

Then click "Create Webhook".

You may watch the stream of Particle events including the hook-sent/MY_EVENT and hook-response/MY_EVENT entries in the Logs

Particle

See Particle Webhooks documentation.

The default data is:

{
    "event": MY_EVENT,
    "data": MY_EVENT_DATA,
    "published_at": MY_EVENT_TIMESTAMP,
    "coreid": DEVICE_ID
}

The following Particle (trivial) sample publishes a random number as an event called "randomnumber" every 10 seconds:

void loop() {
    Particle.publish("randomnumber", String(random(1000)), PRIVATE);
    delay(10000);
}

Events

Tags:

  • 'event' = event string
  • 'coreid' = coreid string

Fields:

  • 'data' = data int

Time:

  • 'published' = published_at time.Time (ISO-8601)