Hey - great post question. SMS Alerts (these are a resource called dispatches in our One Platform) can technically have some data added in them, but not fully meet your needs. If you check out this docs section, it details this a bit more: http://docs.exosite.com/oneplatform/#dispatches
As a part of the ‘message’, you can use substitutions. Currently we support these two:
[[value]] - The value passed into this dispatch
[[subscribe.cid]] - The RID of the client of this resource.
Unfortunately though when using the alerts in Portals, which subscribe to a datarule (Event), the value will always be a 1 or 0 because of how datarules work. Although we may be able to get what you want through subscriptions (dataport -> datarule -> dispatches), it is much easier to do with Lua scripts in the platform.
There are a number of examples of platform lua scripts here: https://github.com/exosite-garage/PlatformScripts
Here is one that shows basics of sending a SMS: https://github.com/exosite-garage/PlatformScripts/blob/master/Dispatches/hello_sms.lua
The logic for triggering on a value over a certain threshold over a certain amount of time shouldn’t be too bad to create. Happy to review code if you want to post something here you come up with.