We have moved at community.getvera.com

Author Topic: Zone update status bug?  (Read 897 times)

Offline ttmetro

  • Sr. Newbie
  • *
  • Posts: 22
  • Karma: +1/-0
Zone update status bug?
« on: August 25, 2013, 09:08:40 pm »
I've successfully installed a Networx panel (NX-8E) and connected to the Vera via the built-in rs232 interface.
The panel has a zone extender installed, and I am using zones 1-19. Vera detected all of them (including the correct zone names). I've added 1-4 and 11-18, i.e. created devices for those in the vera.

The problem I'm seeing is that each time Zone 18 is tripped (staircase door), zones 1-4 and 11-16 are reset, i.e. tripped=0, even though some zones are in fact tripped.

I've added a commented log (lines starting with *** are my comments). The problem appears to be after the line starting with ******: zones 1-4 and 11-16 (but not 17 and 19!) are reported as not triggered (even though zones 1 and 2 are triggered). Unlike for other zone reporting, these reports are not preceded by individual zone status messages from the Networx panel.

Before I dive into the source code I'd appreciate any pointers I can receive!

Apologies if this is a known issue or a setup error. Many thanks!

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Zone update status bug?
« Reply #1 on: August 26, 2013, 03:39:08 am »
Hi ttmetro,

Probably you found a bug that I wasn't able to test for on my puny three-zone system. I will take a look at the log and let you know if I need more.

Edit: Definitely a bug.  I'm surprised that it's gone unnoticed for so long.  I've submitted version 71 to fix it.  If you are happy to update the file yourself, here is the diff.

If you're curious: the Zones Snapshot message provides the status of zones 1-16, or 17-32, or any other block of 16 zones, all in one message.  The first byte of the message says which block of zones is being talked about: 0x00 is zones 1 to 16, 0x01 is zones 17 to 32, and so on.  The plugin was looking at the wrong byte in the message, making an update to zone 17 update the state of the plugin's zone 1 instead.

Thanks for finding the bug and for the comprehensive analysis.  It helped me to locate the cause very quickly.
« Last Edit: August 26, 2013, 06:19:22 am by futzle »

Offline ttmetro

  • Sr. Newbie
  • *
  • Posts: 22
  • Karma: +1/-0
Re: Zone update status bug?
« Reply #2 on: August 26, 2013, 11:00:39 pm »
Thank you very much for the quick fix!
I applied it and the system now works as expected.