Alarm Notifications w/HAI + OpenHab + Pushover

bdAZ

Member
Hi All - 
 
A few months back I configured an instance of OpenHab running on a Raspberry Pi to listen for specific events on our HAI Omni IIe controller and send an alert to our mobile phones using Pushover.
 
It works surprisingly well and consistent. Now, if the cats knock something over in the house and trip off a motion sensor (and the alarm system) our phones alerts us with ~4 seconds of it happening. Great stuff! 
 
I've configured the OmniLink binding and Pushover bindings to make this work, then added the following Script to OpenHab: 
 
--
 
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
 
/* this rule is intended to trigger a mobile notification when an alarm event is received */
rule "Alarm Notification"
        when
                Item Areas_Main_Alarm changed
        then
                if( !Areas_Main_Alarm.state.toString().blank)
                {
                        pushover("Alarm Event Received at Home! Type: " + Areas_Main_Alarm.state, 1)
                }
                else
                {
                        pushover("Alarm Event has been reset.", 0)
                }
 
end
 
To make it even more useful, I'd like to add the Zone that triggered the Alarm (e.g. "Hallway Motion" or "Side Door"). Anyone familiar enough with OpenHab who would offer an approach as to how to provide this information as part of the notification?
 
Thanks!
 
 
Back
Top