My Particle Photon is acting as an alarm-clock. The alarm time is set by employing Particle.function
, which is called from another computer using curl
. This all works well if the Photon is always connected to WiFi + Particle Cloud.
However, it is not. It only connects every 10 minutes. Thus, calling Particle.function
fails with an timeout. Obviously, the function call is not stored by the Particle cloud and only issued when the device is online and connected.
So what can I do to talk to my device?
- Connect more often? --> Does not work. Even if I connect every two seconds, the function call fails.
- Make the Particle cloud call respect the device’s connection state? Well, that is not in my hands. But then, why do I get a
"connected": true
field in the return message from the function call!? - Use another mechanism to talk to my device? --> Webhooks only work the other way round.
Anybody out there with a good idea? Thanks!
Achim