Send message directly to one Particle Electron board?

electron
Tags: #<Tag:0x00007fe21f49fa58>

#1

Hey. I have a Particle Electron that I bought for a specific project that requires data back and forth on a cellular network. Google Cloud/Firebase are required per the client for the backend. Currently working on the prototype, but this would ideally scale to a few hundred devices. I’ve connected Google Cloud Pub/Sub, but I’m not sure how I would send data directly from the cloud to one particular device (I do see webhooks, but that looks like it’d cause data to go to every connected device and filtering to happen locally). Any suggestions on documentation/resources so I can have one device listen for events pertaining specifically to it?

Thanks!


#2

This might be what you want to look at
https://docs.particle.io/reference/device-cloud/api/#call-a-function

But if you chose a dedicated event name to subscribe to for each individual device (e.g. device ID as prefix) then you can Particle.subscribe() with the filtering happening on the cloud side.


#3

That did it, thanks!