i.e., when a Spark.publish() is called, triggering an event in the Spark Cloud that automatically notifies a HTTP API endpoint I’ve somehow defined elsewhere?
I’m building a simple water-sensor with a Core and want it to push to Twilio for text message notifications, so I don’t have to run my own nodejs middleware server just to listen to the event.
Thanks for atomiot, I had looked at it in the past. But when I select a trigger “When an event is published…” it says “Coming when they ship the webhooks feature…”.
Would I have to do it instead with a Atomiot schedule, saving a 1/0 variable to the cloud of whether or not my Spark senses water?
Good question! I’m working on the local cloud right now, and hoping to start the initial beta for that next week. I have been delaying webhooks just until I get a chance to make sure we don’t spam servers, but I’ve also been running a very small beta of that as well. I’m happy to give you access if you email me at david@spark.io in the meantime.
Atomiot can poll every 5 minutes. Just expose the water sensor value as a spark variable and the rest is in Atomiot.
This way you can control the threshold value from the web instead of firmware code.
Is every 5 minutes good enough or is this detecting something more time sensitive than that?
Yeah I was hoping for a quicker notification than 5 minutes. That’s why I was hoping an event-based model would work. With my sensor, if it’s detecting water, something bad is happening
Sorry about that! A good chunk of my time is dedicated to going through applications from awesome engineers to help us tackle all the features we want to build. I’ve been giving beta access so far for webhooks to people who want to try it out, but it’s not well documented yet (since it’s pre-release), and I don’t have a ton of time to support it since it’s experimental. But if you email me I’ll probably give you beta access.