I have a Xenon that is setting a variable with Particle.variable(). I want to read that variable from an Argon. I cannot see a function that allows that, or how to execute a GET command from the Argon.
Is this possible?
I have a Xenon that is setting a variable with Particle.variable(). I want to read that variable from an Argon. I cannot see a function that allows that, or how to execute a GET command from the Argon.
Is this possible?
Hmmm, Particle.variable
and Particle.function
aren’t really geared for device-to-device communication, You should probably re-think what you want to do using pubsub (Particle.publish
and Particle.subscribe
.
You can do it with a cloud variable, but you’ll have to use an HTTP library from the Argon to make an API request, which is going to add a lot of overhead.
In addition to @dougal's comments, I just want to reinforce that the Particle.variable() cannot be read from another device directly. The Particle.variable() allows an application to request a variable from the device using the API. For device-to-device communication on a mesh network, use Mesh.publish() and Mesh.subscribe().
Thanks for the quick reply. I will go that route.