Hello, Is there a way to get the status of Particle device through a webhook ?
What I want to achieve is indicate the device status on my mobile app.
My server is a .Net application and mobile application is based on ionic framework.
What device are you planning to see? Electrons behave a bit different.
But you can just request device info here https://api.particle.io/v1/devices/<youDeviceID>?access_token=<youAccessToken>
This will produce something like this
{
"id": "<yourDeviceID>",
"name": "<yourDeviceName>",
"last_app": null,
"last_ip_address": "<lastKnownRemoteIP>",
"last_heard": "2016-10-08T07:31:45.280Z", // <-- that's the best indicator for Electrons
"product_id": 0,
"connected": false, // <-- this works for WiFi devices, but not reliably for Electrons
"platform_id": 0,
"cellular": false,
"status": "normal",
"variables": null,
"functions": null,
"cc3000_patch_version": "1.32" // <-- ignore, Spark Core legacy
}