We have moved at community.getvera.com

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

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #300 on: January 29, 2012, 12:18:40 pm »
@JOD,
Disarmed is supposed to be part of both ArmedState and ArmedDetailedState.

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #301 on: January 29, 2012, 01:45:59 pm »
I can understand Disarmed being part of the Armed state, it's either armed or disarmed.

But having it as a detailed state of Armed, when It's not armed, seems illogical. It's like saying a light is Off, and then being asked at what level of brightness is it shining?

If it's part of the logic protocol, OK, I accept it. I'm not one to go against the grain.  ;)

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

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #302 on: January 29, 2012, 01:55:53 pm »
Think about ArmedState being light a light switch, it's either On (Armed) or Off (Disarmed). 

The detailed states are simply bundled into one of those two buckets.  It's not that different from asking a Dimmable light what it's light level is (0 == Off, 1..100 == On).

The first StateVariable is for simplistic Scene scripting, the latter is for more detailed scripting, where you need to know, well, the details... with a full spectrum of values from "disarmed" through "armed" (not that it's linear, but ...)

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #303 on: January 29, 2012, 02:42:44 pm »
The Disarmed DetailedState is used in my panel's plugin to indicate "Disarmed but not ready to arm". This is used if, for instance, a window sensor on the perimeter is open.

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #304 on: January 29, 2012, 03:07:16 pm »
Understood, thank you.

@mcvflorin,
The Device is Disarmed under Armed detailed state is broken as a trigger.
Also, we have a typo in the Device is armed NIGHT-STAY

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

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #305 on: January 30, 2012, 08:13:38 am »
@JOD

I removed the Disarmed detailed arm mode event and fixed the typo in version 2.42 which I just published.

Offline gelert

  • Sr. Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #306 on: February 04, 2012, 09:54:26 pm »
Question for kbmcguire or the other trailblazers: would it be possible for you to post any code you have written - eg for sending fault notifications.  Would be very helpful for us newbies.  Thx

Offline kbmcguire

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #307 on: February 05, 2012, 08:57:57 am »
Question for kbmcguire or the other trailblazers: would it be possible for you to post any code you have written - eg for sending fault notifications.  Would be very helpful for us newbies.  Thx

Now that fault notifications and zone descriptors are part of the plugin it kinda makes my code irrelevant but I am still using luup code myself because it lets me customize things a bit more if needed.  I use automator.app's push notification feature for most of my fault and alarm notifications but this code could be adapted to email notifications, etc.

Here is the code I use for sending notifications to my iphone when an alarm is active:
Code: [Select]
-- Alarm Panel Device Number
local AlarmDevNo = 58

-- Replace zone numbers with descriptions (list shortened for posting purposes)
function getzonedesc(str)
  str = string.gsub (str, "4", " Dining Room Door")
  str = string.gsub (str, "3", " Guest Bath Door")
  str = string.gsub (str, "2", " Front Windows")
  str = string.gsub (str, "1", " Front Door")
  str = string.gsub (str, "0", "")
  str = string.gsub (str, "None", " No Faults")
  str = string.gsub (str, ",", "\n")
 return str
end


-- see http://push.automatorapp.com for more information

-- enter your automator.app unique device ids here. if multiple separate by a comma (pushdevices is a global variable defined in startup luup)
local devices = pushdevices

-- Get AlarmZone variable
local faultedzones = luup.variable_get("urn:micasaverde-com:serviceId:VistaAlarmPanel1","AlarmZone",AlarmDevNo)

-- the message to send
local message = '-- House Alarm Active --\n' .. 'Zone:'
message = message .. getzonedesc(faultedzones)

-- auto increment the icon's badge number
local badge = "+1"

-- the sound to use. currently may be an empty string for none or 'default'
local sound = 'default'

-- timeout to use when contacting the automator push web service in seconds
local timeout = 15

-- utility method to make text URL friendly
function url_encode(str)
 if (str) then
  str = string.gsub (str, "\n", "\r\n")
  str = string.gsub (str, "([^%w ])",
   function (c) return string.format ("%%%02X", string.byte(c)) end)
  str = string.gsub (str, " ", "+")
 end
 return str
end

-- make the actual call
luup.inet.wget( 'http://push.automatorapp.com/notify.php?devices='..devices..'&badge='..url_encode(badge)..'&message='..url_encode(message)..'&sound='.. sound, timeout)

Again, I wrote this before @mcvflorin updated the plugin to include the zone descriptors, cheat sheet, so I had to make my own cross reference from zone numbers.  Everything below the line "-- see http://push.automatorapp.com for more information" is taken from automator.app's example from their website...except where I get the AlarmZone variable and assemble the message to be sent.  If you took away the function I wrote for substituting the alarm descriptions and the code that sends the push notification, there really isn't much to it.

Code: [Select]
-- Alarm Panel Device Number
local AlarmDevNo = 58

-- Get AlarmZone variable
local faultedzones = luup.variable_get("urn:micasaverde-com:serviceId:VistaAlarmPanel1","AlarmZone",AlarmDevNo)

-- the message to send
local message = '-- House Alarm Active --\n' .. 'Zone:'
message = message .. faultedzones

The message variable in the above code could be used as the body of an email message or some other means of notification.

@gelert, I'm not sure if this is what you were looking for but feel free to ask for clarification if needed.  I'm not an expert but I manage to fumble my way through this stuff.  Hopefully I can help but if not I'm sure others here are more than willing.

kbmcguire


Offline gelert

  • Sr. Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #308 on: February 05, 2012, 02:37:30 pm »
@kbmcguire, yes exactly... thanks so much for posting!  Here's my story in case this is helpful to other readers: I was thinking about getting Honeywell Total Connect so I could control my panel (Vista 20SE) with my iphone over the internet and receive notifications... but then I saw this thread and it seems like a much better deal.

So I ordered a VeraLite from Ebay, downloaded Firefox, and ordered the AD2USB (plus USB cord and wire) from Nutech.  I followed the AD2USB directions and had no problems getting it to work with the GUI.  Then I plugged it into the Vera and followed the UI5 directions for the plugin.  Everything seems to work right away.  I downloaded automator.app for my iphone, and it works great as well (though I understand they're updating the interface for UI5).

Now I just need to decide how to implement the notifications (OOTB plug-in vs. kbcmguire's code to automator.app vs. email to a dedicated gmail account). 

Thanks to everyone who's posted & improved this thing over the past few months! @MCVFlorin, your plugin sold a Vera box to someone with no prior Home Automation experience.  One question: is it possible to add a scene trigger based on the physical "D" button being pressed?  I ask because this button has no zone / is otherwise useless on the SE panels.

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #309 on: February 06, 2012, 10:32:36 am »
One question: is it possible to add a scene trigger based on the physical "D" button being pressed?  I ask because this button has no zone / is otherwise useless on the SE panels.

AFAIK pressing one of the letter buttons with no command assigned to it doesn't send any signal visible by the AD2USB, so that isn't possible. Can't you assign a macro to it?

Offline nas4a

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #310 on: February 06, 2012, 08:13:13 pm »
Running UI4 - I had a successfully running setup until just the other day.  I'm not sure what changed.  I added an additional door lock, and tried to do some scenes where the door lock will trigger alarm settings. 

It says "Connection Down" in the message dialogue.  Any ideas?  Everything is connected correctly, and the panel accepts commands from the physical keypads for the system.  It's just like Vera doesn't communicate right anymore.

Any thoughts?  Do I need to re-boot?  If so, in what order?  (AD2USB first?  Vera first?) 
Do I need to reconfigure the serial port or something?

Edit to add:  If I click I/O on the panel device, nothing happens.  I think this is how I set up the serial port initially, but it doesn't do anythign now.  Help!

« Last Edit: February 06, 2012, 08:18:39 pm by nas4a »

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #311 on: February 07, 2012, 04:38:08 am »
@nas4a
Go to Apps >> Develop Apps >> Serial Port configuration, re-assign the port to the alarm device and see if this helps.

Offline nas4a

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #312 on: February 07, 2012, 09:02:13 am »
Got it.  Thanks!!!

Offline shep29

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #313 on: February 15, 2012, 08:39:32 am »
Where can I get the latest plugin files for Vera2 UI4?

I'm having an issue where my Dashboard in Vera and Automator.App is showing Faults in zones that I know are not faulted while in Ready mode. I'm able to Arm the alarm without any issues. It seems that after a zone is tripped while in Ready mode (say a door opens), the zone stays faulted in Dashboard even after the doors is shut.

Offline kbmcguire

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #314 on: February 15, 2012, 08:45:06 am »
@shep29,
Here is the link for the latest build: http://code.mios.com/trac/mios_vista-alarm-panel-ad2usb/browser/trunk

You might also check your TTL setting under the advanced tab of the alarm panel device.  I believe it is the timeout for how long the plugin waits to check if a zone fault has cleared.  (TTL= Time To Live?)

Hope this helps,
kbmcguire