Notify User from inside LUA code

I’ve got some LUA code written that will detect a failure if a piece of gear, a non-zwave Hunter Douglas shade, fails. It will sound a z-wave alarm if a failure is detected.

What I would like to do is, in addition to sounding the alarm, notify me via email when the shade fails, but I’m not conversant enough in LUA to even attempt to do this. I had the scene notify me, but that only notifies me when the scene is run, I need to have it notify me if, when the scene is run, a failure is detected.

I’ve searched this forum and out on the WWW but could not come up with any suggestions.

Any help? Pointers?
thx

thanks

Hi,

You can install a plugin called Push Notification and use that from scenes and Lua code. You do need to subscribe to one of the supported push services that support you phone (IOS vs. Android)

This is an example of Lua code to use this plugin.

-- Any other startup processing may be inserted here...
function SendNotification(title, message, sound, prio)
    local ttl = title or "openLuup Notify"
    local msg = message or "Something to let you know"
    local snd = sound or "none"
    local pr = prio or 0
    luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendPushOverNotification", {Title = ttl, Message = msg, Sound=snd, Priority=pr },40)
end

Cheers Rene