How Functions work?

Hi,

I’m trying to update some values from our server via API. I saw that functions is the way to operate.

My question is, when I launch the function call via API and the Electron is in sleep mode, does the system stores the function till the electron wakes up and update the variable? if not, how could I do it ?

Thank’s

Eduard

Weird, this question was asked very recently, calls from the API are not persistent your device needs to be online to receive them.
Instead you would need to have your device ask your server if there were some new values for it when it wakes up from sleep. These could be part of the reply from the server in response to a webhook …

Hi @Viscacha

First of all, thank’s for your reply. How could I do this? via get?

Thank’s

Eduard

Your device should publish an event when it awakens, that your server subscribes to. In response to getting that event, the server can then call the function on the device (since it would now be awake, and you need to make sure it stays awake long enough to receive the function call).