Step by step
Read moreMaker AllThingsTalk (maker.allthingstalk.com)
- Create device
- Create asset (type integer) for the device
- Get device ID and device token (required for webhook creation).
Particle Web IDE (build.particle.io)
- Create app for publishing event
/* APP is also attached below */
int i=0;
void setup()
{
//nothing here for demo
}
void loop()
{
char payload[255];
snprintf(payload, sizeof(payload),"{\"v\": %d}",i);
Particle.publish("nista", payload,60,PRIVATE); // event name = "nista",
delay(15000);
i++
}
- Create integration for AllThingsTalk (Webhook)
Fill the form with data :
You should update with your data :
Event Name : <put the same as in the app code>
Full URL : https://api.allthingstalk.io/device/<DEVICE ID>/state
Request Type : PUT
Request Format : JSON
JSON :
{
"counter": {
"value": "{{v}}"
}
}
Headers : Add Authorization with value "Bearer <DeviceToken>"
Enforce SSL!
19 projects • 127 followers
Hackster Live ambassador in Serbia. Organizer of Maker NS community.
Comments
Please log in or sign up to comment.