I’ve got a piston that received info from IFTTT via webhooks. It’s intended to set the smart switch to start at a certain time in the morning (for coffee). It works like this;
- Send SMS to my IFTTT number with message that’s a time value (e.g. “6:30”)
- IFTTT sends the message value to webCoRE via webhooks
- webCoRE is triggered, and sets the “@coffeetime” variable (time variable) to be the $args.message passed from webhooks/IFTTT
This works great when the message IS a time value. I can also make it watch for specific words (e.g. if $args.message is “cancel”, then do something else) BUT when I send something that is NOT a time value, then the “@coffeetime” variable ends up changing to the time that the webhooks fired from IFTTT.
I can work around this for my specific keywords, e.g. IF $args.message IS NOT “cancel”… but I can’t get it to handle non-time, non-worked-around values.
Is there any way to make webCoRE only respond if $args.message is a ##:## formatted message?
I know this is confusing; please ask if you need clarification!