I want to send a message to an electron that is in deep sleep, to tell it that when it wakes up, it must stay awake because I want to do something to it when I wake up.(flash it , change a variable, call a function etc.).
My electron is set to go to sleep for a long time and it only wakes up for a few seconds to take some readings and to publish them. I already have the ability to tell it not to go back to sleep again in my code and I already have a function which I can call, the trick is that using the consol, I would need to call that function the instant the electron wakes up, which is tricky, I never know when it is going to wake up.
I am publishing my data to Thingspeak using web hooks, and I had a look at IFTTT but most of these cloud based things seem to be heavily weighted to one way communication: device->cloud.
Is the another cloud platform that can easily let me put in a checkbox that the electron can read from?
Is there a list of top 10 cloud based iot platforms somewhere that people rely and trust?
So say that your server knows wether it wants to communicate to the sleeping device.
Then, when the device wakes, and connects it sends a message to your server via a web hook… “hey, I’m awake. I’m going to wait a few moments to see if you’ve something for me.”
Your server can respond with either 1) I’ve got nothing for you so go back to sleep or 2) wait a few minutes before you go back to sleep ‘cuz I’ve got something for you.
But no matter what, you cannot push a message to a sleeping device…
thanks for the suggestion , i guess i was looking for an easy way to do that using some available servers so i dont need to build my own, I was hoping the Particle console or particle build could defer a firmware update until the device came online.
Product devices can get a software update upon connecting to the cloud, however there are some caveats to making it work with Electron and cleaning up the whole process and making it work much better is a project that is underway right now. I don’t have a schedule for when that will be released.
Another technique is to store a value in the cloud. Periodically when you wake up to send your values you query the cloud variables to see if you should do something else as well. This tutorial uses Firebase, but there are many ways to do it.
Thanks for the link I did a quick read through that code, looks like you do a “Subscribe” on the particle ,then a webhook to Firebase . I will follow that route for now.
Ubidots seems to be pretty easy to use, it works well and easy to setup, plus there is a library in particle which makes it easy to setup.