All that is needed to have your particle device send data to adafruit.io is a simple Particle.publish event. Then we use the particle cloud integrations to send the data via a webhook to adafruit.io.
The trick is we have to add the "value" field in the integration as this json key is not there by default in a particle integration.
Lets Begin.
For example let's send the variable "temp" to the particle cloud via event "garage/temp":
Particle.publish("garage/temp", String::format("%.1f", temp);
or
Particle.publish("garage/temp", String(temp));
So, go to adafruit.io and create an account.
Then add a new feed
In the feed, find webooks and click on the gear.
click on create and copy the webhook URL to the clipboard.
go to the console.particle.io and integrations.
Add a new integration
choose webhook
paste the URL in the URL field. The event name should match the event name in your Particle.publish function.
Click advanced. Add "value" and "{{{PARTICLE_EVENT_VALUE}}}"
With this addition, adafruit.io will receive the proper value field and data with each particle publish.
Repeat this integration for each channel or feed you want to send to adafruit.
With multiple channels you can create "dashboards" with various fields
Note Adafruit also has actions. This can be used similarly to IFTTT for sending notifications and generating webhooks to other services.
Comments