We have moved at community.getvera.com

Author Topic: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB  (Read 362832 times)

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #450 on: June 25, 2012, 05:56:13 am »
Theoretically I handle this case. At the plugin startup I go through all the zones and check the last timestamp they were tripped.

Code: [Select]
-- Check if there are any faulted zones that need to be updated.
for zoneNo, zone in pairs(g_zones) do
local lastTrip = luup.variable_get(SID.SECURITY_SENSOR, "LastTrip", zone.device) or 0
if (os.difftime(os.time(), lastTrip) >= TTL) then
removeFaultedZone(zoneNo)
end
end

I'll enable Debug Mode for your plugin and will look through the logs if I can connect to your unit.

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #451 on: June 25, 2012, 09:02:41 am »
Quote
if I can connect to your unit
Email sent with access code.
I'm sorry, my responses are limited. You must ask the right questions.

Offline hugheaves

  • Full Member
  • ***
  • Posts: 241
  • Karma: +11/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #452 on: June 25, 2012, 09:47:38 am »
Quote
The question is why didn't the plugin update the sensors to 'not tripped' after the last trip
One plausible explanation......

Trip a zone - restart the engine - then untrip the zone. In my system the zones do not update.

Restart the engine again - the zone updates to untripped.
Can you replicate?

@JOD,

I've spent quite a bit of time working with the code for the plug-in, so I think I can answer this question for you...

When a zone is tripped, the (current version of the) plug-in adds the zone to a "g_faultedZones" list. The plugin then periodically checks zones in this list, and sets the zone back to "unfaulted" status after the zone's TTL has expired.

When the engine is restarted, g_faultedZones is cleared (by the restart). Then, zones that have exceeded their TTL are cleared right away, and zones that are still within the TTL are left in the faulted state. However, the plug-in does not add these currently faulted zones back in to the g_faultedZones list, so they will never timeout.

A quick fix would be to change the startup code so that the faulted zones that are not cleared at startup are added back into the g_faultedZones list.

Hugh
The HA "collection" so far: MiCasaVerde: 1x VeraLite, RTCOA: 3x 3M-50, GE: 1x 45606, 3x 45613, 5x 54614, Kwikset: 1x 99100-004, Intermatic: 6x CA3000, 6x CA600, 8x HA01, 2x HA02, 12x HA03, 2x HA04, 3x HA05,  6x HA07, 7x HA09, Honeywell: 1x Vista 20P, NuTech: 1x AD2USB

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #453 on: June 25, 2012, 10:02:39 am »
@hugheaves

I though about this too, but then I remembered that I handled this case. The code from my previous post is from the startup function. At startup I parse the whole zones list, not only the faulted ones. Theoretically it should work, but I'll try to find why it doesn't.

Offline hugheaves

  • Full Member
  • ***
  • Posts: 241
  • Karma: +11/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #454 on: June 25, 2012, 10:09:52 am »
@hugheaves

I though about this too, but then I remembered that I handled this case. The code from my previous post is from the startup function. At startup I parse the whole zones list, not only the faulted ones. Theoretically it should work, but I'll try to find why it doesn't.

I think the startup code is good, except for the fact that if the zone is in faulted status at startup, but hasn't _yet_ reached it's TTL, it needs to be added to the g_faultedZones list. (so the plugin will keep checking for it's TTL expiration)

Here's the TTL loop code that only checks zones is g_faultedZones:

Code: [Select]
function ttlCountdownTimer()
for _, zone in pairs(g_faultedZones) do
local lastTrip = luup.variable_get(SID.SECURITY_SENSOR, "LastTrip", g_zones[zone].device) or 0
if (os.difftime(os.time(), lastTrip) >= TTL) then
removeFaultedZone(zone)
end
end

luup.call_delay("ttlCountdownTimer", TIMER_INTERVAL, "")
end

Maybe something like this would work for the startup:

Code: [Select]
-- Check if there are any faulted zones that need to be updated.
-- If they're faulted, but not ready to be updated, add them to the g_faultedZones list
for zoneNo, zone in pairs(g_zones) do
local lastTrip = luup.variable_get(SID.SECURITY_SENSOR, "LastTrip", zone.device) or 0
if (os.difftime(os.time(), lastTrip) >= TTL) then
removeFaultedZone(zoneNo)
elseif ((luup.variable_get(SID.SECURITY_SENSOR, "Tripped", zone.device) or "0") == "1")
addFaultedZone(zoneNo)
end
end
« Last Edit: June 25, 2012, 10:15:19 am by hugheaves »
The HA "collection" so far: MiCasaVerde: 1x VeraLite, RTCOA: 3x 3M-50, GE: 1x 45606, 3x 45613, 5x 54614, Kwikset: 1x 99100-004, Intermatic: 6x CA3000, 6x CA600, 8x HA01, 2x HA02, 12x HA03, 2x HA04, 3x HA05,  6x HA07, 7x HA09, Honeywell: 1x Vista 20P, NuTech: 1x AD2USB

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #455 on: June 26, 2012, 10:25:01 am »
@hugheaves

Indeed, that could fix JOD's issues. I'll upload the modified file on his Vera.

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #456 on: June 26, 2012, 11:23:57 am »
Thank you @mcvflorin & @hugheaves.

I'm sorry, my responses are limited. You must ask the right questions.

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #457 on: June 27, 2012, 12:50:01 pm »
Quote
I'll upload the modified file on his Vera
Unfortunately this did not help.
Zones do not reset if the engine is restarted while zones are tripped.
I'm sorry, my responses are limited. You must ask the right questions.

Offline hugheaves

  • Full Member
  • ***
  • Posts: 241
  • Karma: +11/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #458 on: June 27, 2012, 03:15:17 pm »
Quote
I'll upload the modified file on his Vera
Unfortunately this did not help.
Zones do not reset if the engine is restarted while zones are tripped.

JOD, I don't have access to the exact code that @mcvflorin uploaded. However, if he implemented it as I proposed, you'd still need to wait about 20 minutes (by default) for the zones to reset, even after a restart.

Are they still not resetting after the timeout expires?

Hugh
The HA "collection" so far: MiCasaVerde: 1x VeraLite, RTCOA: 3x 3M-50, GE: 1x 45606, 3x 45613, 5x 54614, Kwikset: 1x 99100-004, Intermatic: 6x CA3000, 6x CA600, 8x HA01, 2x HA02, 12x HA03, 2x HA04, 3x HA05,  6x HA07, 7x HA09, Honeywell: 1x Vista 20P, NuTech: 1x AD2USB

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #459 on: June 27, 2012, 03:31:26 pm »
With the system operating normally, tripping a zone, watching the device change in the UI, and then untripping the zone, it's taking between ~2 - 4 minutes to reset in the UI.

Restarting the engine with tripped zones, the zones will show tripped in the UI even after waiting an hour.
The weird part to me is, if I restart the engine for a 2nd time, after waiting that hour, they reset in the ~2 - 4 minute range again.
« Last Edit: June 27, 2012, 03:34:16 pm by JOD »
I'm sorry, my responses are limited. You must ask the right questions.

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #460 on: June 28, 2012, 02:17:17 pm »
The wife came home today and said the alarm went off the moment she opened the door as there was no entry delay to give her time to disarm the panel.

My panel auto arms in Arm Away (assuming all zones are secured) upon a 45 minute no response from our Ping Sensors, maybe the wife went shopping and didn’t arm the system (was my thinking when I created the scene) which happened today.  ;D

However, I'm remembering (now) reading something somewhere if the Exit Delay is not engaged (opening and closing a door) during the arming sequence, the panel will Arm Instant. Is this true?

Would someone confirm if the Arm Instant engages (even if you select Arm Away) if the door is not opened and closed during arming?
« Last Edit: June 28, 2012, 02:29:28 pm by JOD »
I'm sorry, my responses are limited. You must ask the right questions.

Offline hugheaves

  • Full Member
  • ***
  • Posts: 241
  • Karma: +11/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #461 on: June 28, 2012, 03:58:17 pm »
Would someone confirm if the Arm Instant engages (even if you select Arm Away) if the door is not opened and closed during arming?

The panel's "*84 - Auto Stay Arm" programming option controls whether the alarm reverts to "STAY" mode when armed "AWAY" and you don't exit / open a door. This option is enabled by default. (meaning if you don't exit, the arm mode changes to "STAY" when armed "AWAY")  AFAIK there is not any option to arm "INSTANT" if you don't exit the premises. (as doing so would only ensure false alarms)
The HA "collection" so far: MiCasaVerde: 1x VeraLite, RTCOA: 3x 3M-50, GE: 1x 45606, 3x 45613, 5x 54614, Kwikset: 1x 99100-004, Intermatic: 6x CA3000, 6x CA600, 8x HA01, 2x HA02, 12x HA03, 2x HA04, 3x HA05,  6x HA07, 7x HA09, Honeywell: 1x Vista 20P, NuTech: 1x AD2USB

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #462 on: June 28, 2012, 04:56:43 pm »
Hmmm.....So it is something I can change?
But I'm wondering how it's enabled now vs not being enabled before and there has always been an exit delay when we come home, even when it's auto-arming.

I'm sure it was @mcvflorin who wrote somewhere (although I could not find the reference) that the Away reverts to Stay mode (as you indicated) but Stay is Instant, so we are saying the same thing anyway.

And there are two "Instant" modes. ArmedInstant / MAXIMUM and  StayInstant / INSTANT, neither of which are showing in my logs when the system is auto armed when the exit delay is not used. So I'm perplexed how the alarm went off this morning, when it armed in the same manner as it's armed right now. Log output below.

The wife is on her way home now so I'll see what happens here shortly when she opens the door this time.
Quote
50   06/28/12 16:44:25.238   luup_log:180: (VistaAlarmPanel::processIncoming) Incoming data = '[0100000110000000----],001,[f70000008001000c2c000000000000],"ARMED ***AWAY***** ALL SECURE **"'. <0x312d6680>
50   06/28/12 16:44:25.239   luup_log:180: (VistaAlarmPanel::getStatusFlags) Active flags: ARMED_AWAY, CHIME_MODE
*Edit. Exit / Entry Delay was functional, so the only thing I can assume now is, it was a coincidence that the alarm went off before.....Sigh.
« Last Edit: June 28, 2012, 07:37:22 pm by JOD »
I'm sorry, my responses are limited. You must ask the right questions.

Offline sabolcik

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #463 on: June 29, 2012, 07:09:04 pm »
@Sabolcik,

Welcome! You can download v2.45 from the toolbar on your Dashboard. Apps > Install apps.

Thanks for the feedback.  I've actually made much progress since my initial post.  So I've got the ad2usb installed, got the plugin downloaded, and have my panel up and running.

I created all my zones for my sensors.  I seem to be having the same issue with the faulted zones never clearing.  If I understand it correctly I need to update the TTL time to something other than 20 minutes if I want to have a more real time feedback.

I finally also have basic scene scripting running so I am going to try to use the created zones in some scenes.  Based on the reading of the entire thread it sounds like using the sensors in scenes is somewhat fragile but we'll see.

Thanks again for the feedback and the patience with my totally noob questions.

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #464 on: July 02, 2012, 04:56:48 pm »
Quote
I seem to be having the same issue with the faulted zones never clearing.  If I understand it correctly I need to update the TTL time to something other than 20 minutes if I want to have a more real time feedback.
I'm not sure why it's set at the default of 20 minutes, maybe to cutdown on the load presented to Vera?
I changed my TTL to 15 seconds over the weekend and a restart no longer keeps the zones tripped, although I'm not sure why it would have made any difference.....
Quote
I am going to try to use the created zones in some scenes.
In my garage I use it to turn off the exhaust fan when the overhead door is open, and in the house I have it turn off the HVAC if a window or slider is opened.
It's been very reliable.
I'm sorry, my responses are limited. You must ask the right questions.