telegraf/plugins/inputs/webhooks/particle
David G. Simmons 9acf7f18ca Revert "Updated README.md"
This reverts commit a6ada03b91.
2017-11-03 13:27:06 -04:00
..
README.md Revert "Updated README.md" 2017-11-03 13:27:06 -04:00
particle_webhooks.go bug fixes and refactoring 2017-11-03 12:07:03 -04:00
particle_webhooks_test.go Revert "Small fixes" 2017-11-03 13:27:06 -04:00

README.md

particle webhooks

You should configure your Particle.io's Webhooks to point at the webhooks service. To do this go to console.particle.io/ and click Integrations > New Integration > Webhook. In the resulting page set URL to http://<my_ip>:1619/particle, and under Advanced Settings click on JSON and add:

{
    "influx_db": "your_database_name"
}

If required, enter your username and password, etc. and then click Save

Events

Your Particle device should publish an event that contains a JSON in the form of:

String data = String::format("{ \"tags\" : {
	    \"tag_name\": \"tag_value\", 
	    \"other_tag\": \"other_value\"
    }, 
	\"values\": {
	    \"value_name\": %f, 
		\"other_value\": %f, 
    }
    }",  value_value, other_value
	);
    Particle.publish("event_name", data, PRIVATE);

Escaping the "" is required in the source file on the Particle device. The number of tag values and field values is not restrictied so you can send as many values per webhook call as you'd like.

See webhook doc