Howto do a POST to a particle variable from cloud

Hi all,
I’m using a boron in a low power application so I boot/shutdown every hour or so. when it wakes up I’d like it to know what it should do using a cloud variable. we could use a function but we would have to know that the boron is online…

What I can’t find is exactly how to update a variable from the rest api. Are the variables only a 1 way thing?

Not quite sure what you are after

But local variables exposed via Particle.variable() cannot be set from remote unless via a Particle.function() or a Particle.subscribe() handler.

If you want to set some limited amount of data for a device to retrieve from the cloud you can use device notes

In order to obtain the set data your device would need to subscribe to this even

Particle.subscribe("particle/device/notes", getNotes);

adn then request the data like this


Ah, thanks scruffr, this is what I want to do but I wouldn’t have thought of that… you’ve always got the solution:)

also, just to be clear- I’m assuming the notes are also in UTF-8 format ?

thanks, cc :slight_smile:

1 Like