Hello,
I have 4 particle devices which are subscribed to the same event name. Say,
Particle.subscribe(“myEvent”, “myHandler”);
Is there a cloud API which takes myEvent as a parameter and returns the serial IDs of all the devices subscribed to this event name?
Regards,
Dheeraj
Doesn’t sound like there’s one.
1 Like
You could create a response that would trigger a webhook. That webhook could post the deviceID’s to a server where you could collect those responses.
pseudo code:
void myHandler(const char *event, const char *data)
{
if(strstr(event, "census"))
{
Particle.publish("CountMeIn", DEVICE_ID); // triggers webhook
}
else if (strstr(event/...
}
1 Like
This requires a firmware update across all my devices. I am looking for something like particle list command which can return the subscription info along with particle variables and functions list. Anyways I got the answer.
Thank you
Dheeraj