I have a function:
Particle.function(“deepsleep”, deepsleep);
…
int deepsleep(String seconds)
{
System.sleep(SLEEP_MODE_DEEP, seconds.toInt());
}
But, as one would expect, calling
$ particle function call mydevice deepsleep 3600
errors out, because Photon goes to sleep before it can return.
Is there a way around this, so my client app doesn’t complain?