Multiple zones tripping (SOLVED)

Here’s my setup:

Vera Plus
Honeywell Vista 20P, 37 zones mix of wired and wireless
EVL3 board

For a while (and maybe since installing), I’ve noticed that whenever zones above 32 were tripping, this would cause zones 1-? to also trip as well. For example when I opened an upstairs window, not only would this zone trip, but also cause the fire, front door, back door, etc. to also report tripped.

After a little tinkering with the LUA file in debug mode, I think I’ve solved this issue. I believe it had to deal with parsing the incoming hex code on the Zone State Change (%01) data stream.

My solution

In the processIncoming function
-Break the data into 2x numbers (mZoneData)
–“local mZoneData1 = tonumber(data:sub(11,12)…data:sub(9,10)…data:sub(7,8)…data:sub(5,6),16)”
–“local mZoneData2 = tonumber(data:sub(19,20)…data:sub(17,18)…data:sub(15,16)…data:sub(13,14),16)”
–This split the readings into zones 1-32 and 33-64. I’m not sure if this step was necessary however I did to help me debug and I just kept as is

-Amend the for loop
–Change from 1-64 to 1-32
–Change mZoneData reference to mZoneData1

-Create 2nd for loop from 33-64, put in below the above for loop
–Duplicate above for loop replacing with mZoneData2
–Change the zone reference in the If statement to “, math.pow(2,((zone - 32) - 1)) )”

In the bit_band function
-Change for loop from 1-16 to 1-32 (maybe just changing this to 64 would solve everything but I had already made the changes above and didn’t want to re-break it)

For me, this seemed to isolate the zones in the ranges above 32. There?s probably a more elegant solution but I am not an expert at this stuff.

Good luck.