HAI Omni / Omnipro security & I/O plugin

Hi,

I’ve started work on a HAI Omni plugin.

After a couple of false starts, I’m now basing it on the Elk plugin by mcvflorin - [url=http://forum.micasaverde.com/index.php?topic=6916.0]http://forum.micasaverde.com/index.php?topic=6916.0[/url]

That has the Lua code completely separate from the .xml files so is fairly easy to work with & the overall plugin structure a bit easier to follow than the ones with embedded sections.

Info on the HAI Omni panels is here:
[url=http://www.homeauto.com/Products/HAISystems/OmniOverview.asp]http://www.homeauto.com/Products/HAISystems/OmniOverview.asp[/url]

Info on their ‘Omni Link’ RS232 interface protocol here:
http://kb.homeauto.com/redirfile.asp?id=342

I’ll keep this thread updated with any progress.

OK, slight delay and re-think on this as the HAI serial protocol is binary rather than ASCII based.

I’ve got the Lua code for handling messages roughed out, and a CRC16 generator tested and working.

Update:
The basic comms routines are now working, the plugin is requesting data from the panel and getting correctly formatted response messages back.

I now have to work through handling all the response types.

The CRC16 routine is listed below, in case it’s of use to others.
It uses the ‘bit manipulation’ library - eg. include
local bit = require(“bit”)

Edit - single byte handler moved before the main string CRC routine as the vera does not like forward references.

  ---- Short table CRC16 function ----
  -- Based on the C code on Jim Mahoneys web pages on marlborough.edu --
  -- Uses 0xA001 polynomial with CRC register initialised to 0. --

  CRC16_Table = {0x0000,0xcc01,0xd801,0x1400,0xf001,0x3c00,0x2800,0xe401,0xa001,0x6c00,0x7800,0xb401,0x5000,0x9c01,0x8801,0x4400}

  function CRC16_Byte(x)
  	local  z = 0

	-- Do lower four bits of x --
	z = CRC16_Table[bit.band(crc_reg, 0x0f)+1]
	crc_reg = bit.band(bit.rshift(crc_reg, 4), 0xffff)
	crc_reg = bit.bxor(crc_reg, z, CRC16_Table[bit.band(x, 0x0f)+1])

	-- Do upper four bits of x --
	z = CRC16_Table[bit.band(crc_reg, 0x0f)+1]
	crc_reg = bit.band(bit.rshift(crc_reg, 4), 0xffff)
	crc_reg = bit.bxor(crc_reg, z, CRC16_Table[bit.band(bit.rshift(x,4), 0x0f)+1])
  end
  
  local function CRC16(buf)

	crc_reg = 0

  	local crc_l = 0
  	local crc_h = 0

	len = string.len(buf)
	if len < 1 then return 0, 0 end

	local i = 0
	local x = 0

  	for i = 1, len do
          x = buf:byte(i)
	  CRC16_Byte(x)
        end

	crc_l = bit.band(crc_reg, 0xff)
	crc_h = bit.band(bit.rshift(crc_reg,8), 0xff)
        return crc_l, crc_h
  end

Thanks for working on this plugin. I’ve been looking for one for over a year. Please keep us updated on your progress.

Hi,

I have the comms functions and some data handling routines working.
The plugin retrieves the controller type & version, then all device name texts.

I’m slightly stuck on getting the zone types - eg. Alarm, fire, entry etc. to create the appropriate child devices, as this does not seem to be mentioned in the Omnilink info. It has the facility somehow, as the PC config program can read and set these using the same protocol.

I have contacted HAI support re. this but not had a reply yet. Plan B is an extra text file that lists Zone numbers = Zone types.

I’m definitely interested in being able to connect to my HAI Omni LT controller. I’d rather take advantage of the windows and door sensors throughout the house as well as the motion sensors.

Thanks for your work on the plugin!

Bit of a delay, I have tried to get info from HAI tech about reading the the zone types.

They told me this was available if I joined their developer program - so I did.
It then eventually turns out that the additional developer facilities are purely via a Windows DLL file - so no help for a non-windows device.

I will be using the text file method, but work and family commitments have temporarily caught up with me…
Back soon.

What is the status on this project?

Bump. Has there been any progress on this?

Guys any news on this one?

Hi all,

not forgotten or abandoned, just postponed for a while due to work commitments…

RJ.

I would be willing to pay for the development of this plugin.

[quote=“rjenkinsgb, post:10, topic:175543”]Hi all,

not forgotten or abandoned, just postponed for a while due to work commitments…

RJ.[/quote]
Hi rjenkinsgb,

I wonder if the ethernet Omni protocol would be more viable for the plug-in. I have an Omni II I’d like to control using my vera and some experience writing vera plugins.

Would you be interested in some help on this project?

Hi,

back on this again, as and when time permits.

Re. the Ethernet protocol, I did consider this - the “Omnilink II Protocol” - however the data transfer in that uses AES encryption rather than just a CRC, so I believe it’s too CPU / memory intensive for a plugin.

RJ.