Hey there Particle community!
I am working on a project that would require end users of my product to be able to login to my web application using their particle account and schedule 4 different relays to be turned on and off at intervals and specific times throughout the day.
One relay might turn on at 10am and turn off at 5pm. Another might turn on every 30 minutes for a 15 minute duration, then turn off. Another might stay on all the time with the ability for the user to toggle it at anytime from the web page.
I did some research on what other people have done when looking to schedule functions. I found that I could use the built-in Time Library using if statements or I could use the add-on to the Time Library called TimeAlarms that would allow me to create alarm functions to call other functions that trigger the relays.
I want the user to be able to specify through input fields on my webpage, relay 1, I need you to turn on at 10am and turn off at 5pm. Rely 2, I need you to go high every 30 minutes for a 15 minute duration, etc, etc.
I am looking for general guidance on how to allow users accomplish the above. Is there any way for the users to create their own TimeAlarms functions from a web page and flash them to their particle devices? The scheduled task/functions need to be able to execute regardless if the particle is connected to the internet for safety.
Thank you for reading and for any suggestions you may have!