Brewskey / spark-server

An API compatible open source server for interacting with devices speaking the spark-protocol
https://www.particle.io/
GNU Affero General Public License v3.0
54 stars 27 forks source link

Is there a renamed implementation of Particle.subscribe(particle/device/name); ? #298

Closed mrferrar closed 2 years ago

mrferrar commented 2 years ago

I have noticed there is a useful feature on Particle's server where a photon call of Particle.subscribe("particle/device/name", ...); triggers a particle/device/name event that the device can subscribe to in order to get it's server-assigned name. Does this feature have a different trigger on this server?

jlkalberer commented 2 years ago

It does but it's using the legacy command for it -- spark/device/name I haven't updated any of the commands since they started porting them to be "particle" vs "spark"

mrferrar commented 2 years ago

I did try that, though annoyingly the photons seem unable to properly subscribe to any events with the 'spark' prefix. Thanks for confirming.

jlkalberer commented 2 years ago

Ok -- I can put out an update to fix this.

jlkalberer commented 2 years ago

Ok -- this should be fixed. I didn't test it.

Make sure you update the node modules in order to get the latest version of spark-protocol

mrferrar commented 2 years ago

That worked, thank you!