OP II and Arduino

tigers

Active Member
I am looking to expand the capabilities of the OP II by connecting some of the IN/OUT to and Arduino board.
I plan on overcoming some of the limits of the OP II like not having a proper notification system for events or an internet connection, and also to do some more complex programming.
For instance I have installed a power meter, that blinks once for every kWh consumed: by tracking it over a 10 sec or so period I'm planning to read instant power consumption and do some load control.
 
I am looking for some programming examples maybe specifically made for the OP II.
 
What would really be great would be being able to connect to the OP II through ethernet (or serial port maybe?) and directly read things like temperature (that I'd like to log to a file maybe) or zone status, or maybe even sending commands. Do you think this can be done?

Anyone is willing to help me or direct me to some documentation on how the Ethernet/serial communications for the OP II work?
 
Thanks in advance.
 
Here is a pictures of a Homeseer plugin running remotely on the raspberry pi with a MySQL and a Homeseer DB connection connecting to my OPII panel via the network.
 
This picture also shows a serial concurrent connection to the HAI OPII Panel.
 
My current configuration has HAI Leviton Omnitouch touchscreens and Homeseer HSTouch touchscreens.
 
Testing-4.jpg
 
neillt said:
HAI/Leviton publishes their network API.  It's not easy to implement due to the encryption, but it does get you on the right path.
 
There is also a serial port protocol as well, if you would rather do that.  As far as I know, both types of links get you the same information. 
 
http://kb.homeauto.com/default.asp?id=417&SID=&Lang=1
That's very nice. I'd prefer to go with the serial for reliability and also because as I can see the IP messages must be encrypted for security reasons.

But I need some sample code to get me started because I'm not such a programmer so I can't figure it out myself.
I think I can get along with the serial send and receive with Arduino but I need help with the message format.

How do I login? Which message should I send?
What message I send for reading a zone or thermostat status? And what am I expected to get back from the console?

If anyone could help I'll be very happy to share my code once I get it to work.
 
Thanks, but I already looked at that example but it requires the use of a dll, and i don't think it can be done with arduino.
I need something more basic like what string to send thru the serial port to login, how to query the zone or thermostat status once I logged in an interpret the result. But it must all be done thru serial and code.
 
 

Attachments

  • HAIOmni-LinkProtocolRev3-0.pdf
    311.4 KB · Views: 13
  • OmniLink Serial Protocol Description.pdf
    77.2 KB · Views: 5
  • HAI_Pro-Link_Description.pdf
    23.4 KB · Views: 9
Thanks again, I was hoping for something more explicit, but let's try to break it down: I connect a rs232 cable to the OP II, then I start by sending a login message, which should look like this:

0x5A
0x05
0x20
first digit of code
second digit of code
third digit of code
fourth digit of code

And after that the CRC1 and 2 that I calculate with the routine provided in the appendix, right?
Then what? Do I get some sort of acknowledgment response? And I need to read it before I can continue, right?

Then I can send request messages, and it seems clear.

But how do I read the system events listed in appendix C? Do they mix up with the regular answers to my requests?
How do I 'listen' for those events?
 
It sounds like you have an an Omni Pro II board to play with.
 
I just connected the HAI PC access program to the OmniPro II board goofing around and sniffed the serial port.
 
Have a look at the chatting between the PCA program and the OPII panel.
 
I like your posts tigers. 
 
Thinking we should move it to a different HAI sub topic and give it a new name .....such that others will learn from your endeavor....
 
That's a great idea indeed. Guess I'll have to connect it directly through the serial port or I won't get anything since the web protocol,is encrypted.

I also found this: https://gitorious.org/hai/ which is a library in C that has also the serial protocol. I just have to figure out if and how I can take some pieces of it and try to make it run on the arduino.

Thanks for the appreciation and feel free to move the post if you can.

I'll start working on some more basic interface thru the arduino using relays to interact with zones on the OP II but eventually the idea is having the arduino do some logging of thermostats or other zones and handle notifications thru mail (or anything else using services like IFTTT or growl).

I'll work on it and try to get some results.
 
Found an old wintel program never completed left in beta mode with a few debug windows that open up.  The application talks via the serial port or network port.
 
It would probably help you a bit.
 
PM me and I will send it to you.
 
Let us know your status there tiger.
 
A serially connected device with a network port would be a hardware update of sorts to the legacy serial only HAI panels which are still being utilized today as they never break.  An Arduino inside an HAI can would work nicely.
 
Today I am testing an new network connected plugin while concurrently managing the panel with a serial connection.   (the multiple Network connections and serial control connection works just fine). 
 
I put the problem to rest for a moment since all my PCs don't have a serial port anymore and the arduino serial port is TTL and thus cannot connect directly. So I am awaiting for an USB to serial adaptor, build a DB9 to RJ 11 serial cable and finally start sniffing the serial communications.

In the meanwhile I put together a nice energy meter project coupling an impulse energy meter with the OP II using a relay board that closes security zones. I also am waiting for an internet shield to deliver: that could be a nice alternative for older boards, since the arduino could handle the web server part and communicate with the OP II closing and opening zones. I believe a single arduino with Ethernet shield can pilot 10 relays or so, and an arduino mega much more. With current prices this would mean a custmizable web interface to the OPII for less that 50$, even less if you go with per assembled mini arduino boards.

I'll definitely keep working on it (going to post the description for my energy meter project very soon).
 
As for the connections if I recall correctly from HAI specs up to 3 concurrent communications with the OPII can be opened at the same time.
 
I put the problem to rest for a moment since all my PCs don't have a serial port anymore and the arduino serial port is TTL and thus cannot connect directly. So I am awaiting for an USB to serial adaptor, build a DB9 to RJ 11 serial cable and finally start sniffing the serial communications.
 
Yup my current little Homeseer Rasberry Pi is using said type of connectivity (USB) for X-10, Z-Wave and Insteon today.  That said the legacy mother ship connects to the hardware via 1 USB cable going to a Digi 7 port USB hub going to a variety of devices plus 2 Digi 8 port serial Edgeport devices providing some 16 serial connections and 7 USB connections via one USB port on the mothership.  Today I can move that same USB cable to my Ubuntu 14.04 box and see every connection just fine (its actually really old technology)
 
I have always played here such that I have a variety of USB to serial devices.  I can ship to you a USB to serial adapter if you want.
 
I recall correctly from HAI specs up to 3 concurrent communications with the OPII
 
This depends on the model of the OPII board.  The older boards had 3 plus 1 X10 direct serial ports and the new boards have 5 plus 1 X10 serial port.  Playing here I have all 5 serial ports connected, X-10 port plus numerous network connected devices all talking to the panel 24/7.
 
Consider I'm in Europe... But we have USB to serial even here... :)
I just have to find some time to work on that. The main problem is I never attempted serial communication (or other protocols for they matters) so I have to start completely from scratch, but I'm sure I'll get along, I just have to tinker a bit. I'll surely seek for more help in the future.
 
Back
Top