HAI Omni Notification system and more

mc85

Member
     So I wanted an email notification on alarm events before the notification board came out so I wrote some java code to allow me to send emails from a small ARM board and I have been adding features to it since.  Currently it is running on a BeagleBone Black in my automation panel and connects to the OPII via the network.  All of the configuration settings are in a mysql db and are fairly flexible.  
 
You can send emails based on zone triggers depending on alarm mode.  
Emails on Alarm depending on Alarm mode and Time range.  
Can send notifications via Twitter Direct Message as well.  
Will log zone activity that is selected to log.  
Send WakeOnLan packet based on userbutton push.
Supports sending email via gmail. main reason on ARM because of the SSL encryption requirement for sending through gmail and that I love ARM boards.
 
So the basic reason I am posting is that I was going to write a simple manual on how to use and configure but wanted to see if any one would be interested in using it first.
 
Thank you MC85.  Here I am always tinkering and would be interested in your stuff.
 
I currently have a modded TP-Link microrouter between the HAI panel and the rest of the network. 
 
No hiccups with most current HAI OPII firmware.
 
Can it poll your email account and have the Omni notify you if you have a new email?  That is something the HAI board can't do. 
 
I'm going to set up a Betabrite to my Omni (also using a micro controller) and having an email indication would be great. 
 
I'd definitely be interested in using your code. I do not currently have a Beagle Bone Black but will purchase one if the Java code becomes available.
 
Thanx
 
I do want to mention a thanks to digitaldan and his java omni library as this would not be possible with out it.
 
I threw together a very lame readme on how to get it setup.  Manuals are not my forte.
 
Hopefully this link will work from google drive.
 
https://drive.google.com/file/d/0BzVEVfIjmKV4ZE1NWUlYOUZwZlE/view?usp=sharing
 
should mention that the beaglebone is not a requirement but I like it because it is a dedicated appliance for the monitoring.   you could get it working on windows as well just need a local mysql db.
 
It is event driven from the HAI controller so no email status or pushing data back to the HAI at this point in time.
 
ano said:
Can it poll your email account and have the Omni notify you if you have a new email?  That is something the HAI board can't do. 
 
I'm going to set up a Betabrite to my Omni (also using a micro controller) and having an email indication would be great. 
 
If you have some Java programming experience, you can customize Digital Dan's open source HAI Omnilink II project to accomplish your task.  https://github.com/digitaldan/jomnilink
The Google mail API would probably be the best solution.  It has a method for checking for unread mail.
 
mc85 - this is awesome. Would you be willing to contribute your code to github? Perhaps we can further extend it as a community. I'd like to take what you've done and integrate it into pushover for Android notifications. 
 
bdAZ said:
mc85 - this is awesome. Would you be willing to contribute your code to github? Perhaps we can further extend it as a community. I'd like to take what you've done and integrate it into pushover for Android notifications. 
The majority of the source code is already on github at https://github.com/digitaldan/jomnilink which was written by DigitalDan.  It provides all the functionality of the controller.  mc85 added the enhancements such as wakeonlan, twitter posting etc. to this code.
 
Thank you Mike.
 
Been playing a bit with OpenHab.  Newest 1.7 Omnilink jar plugin isn't working for me.  Just disconnecting and reconnecting to the panel here.  V1.6 worked fine here.
 
Playing today with your stuff on an updated with OpenWRT TP-Link.  Have it running. 
 
I added my stuff to the import sql file.
 
Just received a custom daughter board for the TP-Link with GPIO (adding an RTC to the mix hopefully soon).  Have to solder some stuff to the board.
 
1b8e7c81f174335a321b1766772041f8.image.530x397.jpg
tp-link-newpicture.jpg
 
WR703N%20Expander%20v1%20Enclosure.jpg

 
The TP-Link has two NICs and one USB port and it is powered by the OPII panel.  The custom daughter board adds more USB ports and serial ports plus the GPIO pinouts. 
 
Here is what I see when I run the jar file.
 
/opt/omnimonitor# java -jar omnimonitor.jar
Start
Database connection established
Connected to DB
Got Config
Print Info
SystemInformation ( model = 16    major = 3    minor = 14    revision = 1    phone = -     )
SystemStatus ( timeDateValid = true    year = 14    month = 12    day = 28    dayOfWeek = 7    hour = 12    minute = 25    second = 33    daylightSavings = false    sunriseHour = 7    sunriseMinute = 18    sunsetHour = 16    sunsetMinute= 27    batteryReading = 230    alarms = {}     )
SystemFormats ( tempFormat = 1    timeformat = 1    dateFormat = 1     )
All Done, OmniConnection thread now running
 
Triggering one zone

process zone status
 12:26:57 12.28.2014 Zone status Rear Foyer - IR 8 0
process zone status
findzonealert
findzone while
 12:26:57 12.28.2014 Zone status Rear Foyer - IR 8 1
process zone status
 12:27:00 12.28.2014 Zone status Rear Foyer - IR 8 0
 
 
Email/Texting is working fine.
 
Test text sent out:
 
Zone 8 Rear Foyer - IR AlarmMode is Day
 
Let me know what I can do.
 
HAI panel time sync would be a nice add.
 
time sync
 
How do I get the subject in the email / text to display?
 
Yeah right now I am setting the subject to a blank string I am not sure what I want to do there yet.   Have it be the body of the text or a static message like "zone alert" or a changing message based on the field in the database for that zone config.
 
Great news MC85!
 
Here lately speed testing response times (bean counting metrics) with a serial versus IP connection to the panel. 
 
I am seeing that the serial connection is faster. 
 
But that is me as I really do not notice the speed difference if I do not get granular with it.
 
Googling found another device called the DreamPlug (to use rather than the TP-Link) but it draws much power (19 watts) and is $159 USD (kind of another mini firewall).  My current Sheeva based mcsSprinklers running on the Seagate Dockstar runs circles around the RPi running whatever unless I overclock it to 900Mhz and even then its still not as fast.
 
 
dp_1.jpg

 
dp_2.jpg

 
dreamplug_blockdiagram.jpg

 
Switching over to using an Intel based I can purchase a little Pipo X7(which is thin but still has a large footprint) running Linux on it for some $97 USD with free shipping.  This would abandon any ARM based CPU efforts for said endeavor.
 
Looking for something small that will fit in my current HAI OPII panel (which is kind of full of stuff at this time) and can be powered by the panel PS.  This whole endeavor actually started by thinking about using an integrated into the OPII panel RPi for running the HS3 HAI OPII plugin and making the device do more than run the plugin providing some base functionality without the use of the connection to the HS3 mothership stuff.  (IE: integrating / emulating the new HAI Email board functions into said piece of hardware).  So it would run something like OpenWRT, Mono, Java, OpenHab and talk via the wired network (in and out on hardwired NICs) and or serial wired or wireless 802.11 or via a 3G connection and utilize maybe 500mW of electricity.  Ideally a small 3" square box 1" tall would be best for inside of the OPII panel.
 
pipo_x7_01.jpg
 
Yeah would think the serial would be a little faster as it would not need to do the aes decryption/encryption that the ethernet port has to do.
 
If you are looking at price you can run it on a beagle bone black for $55 or cubieboard2 for $59 or raspberry pi for $40.
 
http://store.r0ck.me/collections/home-slide/products/cubieboard2
http://www.adafruit.com/product/1876
 
If you want something with a little more power the cubieboard4 just came out.  I want to get one of those they look awesome.
http://store.r0ck.me/collections/home-slide/products/cubieboard4-cc-a80-high-performance-mini-pc
 
Back
Top