Sorry if this has already been asked, but I couldn’t find a post that explains it.
I’m trying to understand when Particle Variables interact with the cloud. I understand from the documentation that a variable is “registered” through the Particle.variable() call, but what exactly does that mean from a data usage perspective? My guess is the handling works as follows (please correct me if I’m wrong):
- App starts and Particle.variable() is called with a variable and value specified. Only the variable name is sent to the cloud to register it (the value is just stored locally).
- App makes another call to Particle.variable() to update the variable’s value. Again, only the variable name is sent to the cloud in case it needs to be registered. (Related question: Can I update a variable value locally without hitting the cloud again??)
- Client makes a call to retrieve the variable value. I’m assuming this hits the device to grab the value.
Any insight on this variable register/read process would be appreciated.