ad2usb plugin discussion

Posted on
Sat Nov 19, 2011 1:32 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

ad2usb plugin discussion

Beta release 0.9.23 of the ad2usb plugin is now available on dropbox.

This release REQUIRES Indigo 5.0.3

This release fixes all known problems. In addition, when changing operating mode (basic to/from advanced) or interface settings, the plugin will automatically quit and reload.

This is the final beta release. If no problems are reported I will upload this to the User Contribution Library as Release version 1.0.

After 1.0 is released, the next two features to be added will be multi-partition support and creation of virtual zone devices as relay type devices. This will allow a virtual zone to be faulted/restored by simply turning it on/off from the standard Indigo UI, Control Pages or the Indigo-Touch client. If you have additional features you'd like to see in the plugin, please post to this topic, or PM me.

Here are the release notes:
v 0.9.22 Jan 12, 2012
    Fixed a bug in the LRR configuration option.
    Revised RFX zone state checking to use a full bitmap mask.
    Added test for new zones to create initial state of Clear.
v 0.9.23 Feb 03, 2012
    Added Arm-Stay and Arm-Away actions.
    Added partition selection menu to zone device dialogs.
    This is not currently working, but will
    enable future support for multiple partitions.
    Fixed problem with basic mode on commercial (50, 128, etc.) panels.
    Restart on mode or interface change works if usung Indigo 5.0.3.

Depending on feedback, this will probably be the final beta release. Please post or PM any problems.


The ad2usb plugin is now available.

Requirements:
• An ad2usb alarm interface connected to an alarm panel supported by the ad2usb.
• The ad2usb must have the most current firmware.
See http://www.nutech.com/index.php?option= ... id=4&id=21
• Indigo 5.0.3 or later

Limitations:
• Identification of the user code used to arm/disarm the panel requires the new v2.2 ad2usb board.
• The plugin has only been tested on a Vista-20P panel though most other panels that support the ad2usb should work.
• An IP connection to the ad2usb is preferred (ser2sock is available for this purpose).
• Passwords (user codes) are not stored in the plugin. The user may choose to store codes in Indigo actions if he or she chooses.
• Only partition 1 is supported.
• Only a single virtual keypad device is supported.
• This plugin has not been tested with panels using zone doubling on the main board.
Attachments
pc.png
pc.png (111.62 KiB) Viewed 12550 times
Last edited by berkinet on Fri Feb 03, 2012 11:18 am, edited 22 times in total.

Posted on
Tue Nov 22, 2011 8:12 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Beta ad2usb plugin now available

ad2usb plugin development update:

After two days of testing with some great help from @mikedrinks and @bbruck, the plugin seems to be quite stable.

Now, for some good news. The next release will contain three new features:
1) Because of the complexity required to setup an alarm panel for Relays, and the detailed information required for the expander board and wireless zones, the next version will offer users a configuration option. You will still be able use the faster responding, but more complex zone tracking algorithm currently supported, or a new algorithm based on the basic Zone Fault messages. The new alternative will respond just as quickly to zone faults, though it will be a little slower to determine when a fault has cleared. But, this new option will only require a zone number to create an Indigo device. (Special thanks to Sean Mathews of NuTech (the ad2usb manufacturer) for the new algorithm.)

2) Support for the ad2usb virtual expander board feature. This will allow the user to create up to 8 virtual alarm zones that are actually controlled by Indigo. These zones can be controlled by Indigo Actions based on device states, variables, etc. For example, if your water meter sends water consumption information to Indigo, you could have Indigo fault an alarm zone if usage exceeded some threshold. If you have an alarm monitoring service, the fault would be visible to them and they could contact you or someone on your call list. You could also turn INSTEON Motion Detectors into alarm zones, etc., etc.

3) The plugin action for sending messages to the panel will support the 4 keypad function keys (F1 - F4). You will be able to simply send the function key name as the message text (I.e. F1) to invoke whatever function you have mapped to that key.

Posted on
Wed Nov 23, 2011 12:55 pm
automaton offline
Posts: 104
Joined: May 23, 2008

Re: Beta ad2usb plugin now available

I'm excited for this next version. I have an older panel that does not support the relays, so I have not been able to test the plug-in fully yet.

Posted on
Fri Nov 25, 2011 7:41 am
bbruck offline
Posts: 291
Joined: Oct 05, 2008

Thank heavens I"m out of town!

I'm eagerly awaiting the next version to try out the zone definitions. What a neat option! (I suspect I'll be OK w/ the slower response.)

Berkinet has been FANTASTIC (as has Sean at Nutech) in helping me get up and running, and the plugin is already great. The marriage of a legacy wired alarm system, with its door and motion sensors, with Indigo is just a natural. I even purchased some extra wireless devices that I'm eager to try integrating into the system!

Posted on
Fri Nov 25, 2011 12:39 pm
hamw offline
Posts: 1022
Joined: Mar 31, 2008

Re: Beta ad2usb plugin now available

• Identification of the user code used to arm/disarm the panel requires the new v2.2 ad2usb board.

• An IP connection to the ad2usb is preferred (ser2sock is available for this purpose).


Berkinet,

Thanks for your amazing work on this new plugin. I'm excited to try to get it going. A couple of questions: I have the square USB connector board, which I read is a 2.0 - 2.1 board. Can I use the plugin with this board, and what am I losing by doing so? I see in your note above that there is a problem with the user code? What does that mean practically? Also, could you post the terminal code needed to identify the firmware version the board is currently running?

Do I need to get a USB-> Ethernet adapter to run this plugin, in addition to installing ser2sock?

Could you all post some examples of control pages as well as what kinds of triggers you've implemented that leverage the zone information the plugin provides?

Posted on
Sat Nov 26, 2011 8:18 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Beta ad2usb plugin now available

hamw wrote:
... A couple of questions: I have the square USB connector board, which I read is a 2.0 - 2.1 board. Can I use the plugin with this board, and what am I losing by doing so?
The firmware version is more important than the board version. If you are running the most recent firmware then the only feature not available on the older boards (pre v2.2/2.3) is the ability to display the ID of the user who armed/disarmed the panel. See the next answer for more on this feature.

hamw also wrote:
I see in your note above that there is a problem with the user code? What does that mean practically?
There is really no problem. The advanced mode of the plugin supports logging of the user code number that was used for arming/disarming the system. This is not the code itself, but the user number associated with the code. Some people like to not only track when the system was armed/disarmed, but also the identity of the person who who did it.

and hamw also wrote:
Also, could you post the terminal code needed to identify the firmware version the board is currently running?
In the MonoGUI go to the log tab and reset the board. The startup message from the board contains the firmware version number. You can also reset the board by entering a "=" when connected to the board with terminal program, such as using telnet with ser2sock (see the next answer).

and then hamw also wrote:
Do I need to get a USB-> Ethernet adapter to run this plugin, in addition to installing ser2sock?
No. ser2sock is a USB to Ethernet/IP bridge. Instead of ser2sock you could use a serial-to-ethernet adapter connected to the ad2usb board. But, as long as your board is within USB cable distance of a computer, just use ser2sock on whatever computer is closest. Then, you can use the telnet program in a terminal window to connect to your ad2usb. Just telnet to the IP Address and port you set when configuring ser2sock. For example, with ser2sock running on the local system on port 15003, you'd enter:
telnet 127.0.0.1 15003

For best results, once the connection is established, you should put telnet into character mode. To do this, just enter:
Control-] mode character <return>
at this point you can then press the "=" key to reboot the ad2usb and see the version number.

and lastly, hamw wrote:
Could you all post some examples of control pages as well as what kinds of triggers you've implemented that leverage the zone information the plugin provides?
Sorry, I haven't really done much with the control pages other than a very crude proof-of-concept virtual alarm panel. The code for the key functions is in the plugin package. As for triggers... I use a hall motion sensor to turn on the hall light, and the door sensors turn on the lights in the room where we are entering.

BTW, although the plugin semantics will differ slightly, both of these questions would apply equally to the DSC panel plugin. Check out that thread in the Extending Indigo with Plugins and Python forum.

I am away form the home system until Tuesday, But, once I am back, I should be able to get the next release out pretty quickly. To make distribution easier, I have setup a dropbox account and will post the details on that when the software is ready.

Posted on
Tue Nov 29, 2011 1:16 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Support now available for basic message mode

I have placed a VERY beta release (0.9.7) of the revised plugin on dropbox:
http://dl.dropbox.com/u/50307533/AD2USB ... -0-9-7.zip

This version of the plugin supports a new "basic" mode which will operate with the ad2usb standard panel message stream. No particular configuration of the ad2usb or panel is required and all 'special' messages (AUI, EXP, LRR, RFX and REL) are ignored.

I have not yet updated the docs, so, if you need good, clear instructions, you may wish to wait. Though, I will be glad to answer questions here on the forum. Also note, while a USB option is available in the config, I have not tested it and seriously doubt that it will work right now. The release contains ser2sock and instructions for installing it.

Important note: For users of the new V2.2 & V2.3 boards, if you wish to use basic mode, you must not set the ad2usb option to delete duplicate messages (Deduplicate). However, if you are using advanced mode, then Deduplicate is strongly recommended as it significantly reduces message volume.

Here are the new features available in 0.9.7 (described previously in this thread)
Now, for some good news. The next release will contain three new features:
• Basic mode for message reading
• ad2usb virtual expander board support (for Indigo based zones)
• Support for the 4 function keys: F1 - F4

Posted on
Tue Nov 29, 2011 3:39 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Support now available for basic message mode

berkinet wrote:
I have placed a VERY beta release (0.9.7) of the revised plugin on dropbox:... ...Also note, while a USB option is available in the config, I have not tested it and seriously doubt that it will work right now.


Version 0.9.8 is now available at:
http://dl.dropbox.com/u/50307533/AD2USB ... -0-9-8.zip

This update includes tested support for USB.

However, I do encourage you to try ser2sock, it will enable you to use BOTH the Indigo ad2usb plugin, and the ad2usb MonoGUI at the same time.

Posted on
Tue Nov 29, 2011 8:43 pm
bbruck offline
Posts: 291
Joined: Oct 05, 2008

Re: Beta ad2usb plugin now available

Richard,

I'm (finally) back and trying to get things set up. (Still using old AD2USB; new one has not arrived.)

My panel device is working fine, but I'm trying to get a few Ademco wireless devices hooked up, and having some challenges finding the wireless tag and zone number. Following the instructions on page 11ff of the QRG, I have a few questions:

1. I don't see an explanation of what Model: Alarm Zone v. Indigo Alarm Zone is. On page 7 it says to select Alarm Zone, so this is what I've done, but would be interested in what the other choice is.

2. On page 11-12 there are instructions for finding the wireless tag number. I used these for two different ademco devices and the instructions work perfectly. However, I cannot find my zone number.

When I detach the magnet from the wireless contact and reattach it I get:

AD2USB Alarm Interface Message from unrecognized Zone device: !RFX:1015460,bc

(More specifically, when I detach the magnet I am not seeing any message. When I reattach it, I get this message *sometimes*. I don't see a clear a0 when faulted and 20 or 80 when clear.

Thoughts?

Posted on
Tue Nov 29, 2011 9:38 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Beta ad2usb plugin now available

bbruck wrote:
...I'm trying to get a few Ademco wireless devices hooked up, and having some challenges finding the wireless tag and zone number. Following the instructions on page 11ff of the QRG, I have a few questions:

1. I don't see an explanation of what Model: Alarm Zone v. Indigo Alarm Zone is. On page 7 it says to select Alarm Zone, so this is what I've done, but would be interested in what the other choice is.
An Indigo Alarm Zone is a virtual zone (new in this release, and so far undocumented). To use this type of device you must first create a virtual Expander board in the ad2usb config. Then, the Indigo Alarm Zone can be connected to the virtual Expander board just as any alarm device would be connected to a real Expander board. You control the state of the zone by sending messages to the ad2usb. This description from the Nutech forum may help:
    Zone Expander Emulator
    If you have a zone expander emulation enabled you can send faults and clear for a zone by sending an L followed by the two digit zone number padded with zeros followed by a 0 1 or 2

    So to fault zone 09 and you are emulating the first zone expander you would send L091 to open the zone and to clear that zone you would send L090. To fault a zone and simulate a wire problem short etc you would send L092

2. On page 11-12 there are instructions for finding the wireless tag number. I used these for two different ademco devices and the instructions work perfectly. However, I cannot find my zone number.

When I detach the magnet from the wireless contact and reattach it I get:

AD2USB Alarm Interface Message from unrecognized Zone device: !RFX:1015460,bc

(More specifically, when I detach the magnet I am not seeing any message. When I reattach it, I get this message *sometimes*. I don't see a clear a0 when faulted and 20 or 80 when clear.
1015460 is the wireless tag number. I do not recognize the status code. You should be seeing both fault and clear messages so something does seem to be wrong. You can also find the wireless tag number inside the wireless device. But note, if the device is enrolled in your panel opening it will set of a tamper alarm. So, if the device is enrolled, you should notify your alarm company first.

BTW, you might try the latest release and use it in basic mode until you get your new ad2usb and have the panel configured form relay support.

Posted on
Tue Nov 29, 2011 9:43 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Beta ad2usb plugin now available

bbruck wrote:
...2. On page 11-12 there are instructions for finding the wireless tag number. I used these for two different ademco devices and the instructions work perfectly. However, I cannot find my zone number.

Sorry, I didn't answer this question. The zone number is assigned in your panel config when you enroll (register) a new wireless device. If the wireless devices have not yet been enrolled in your panel, you will still see the !RFX messages in the ad2usb stream, but there is no zone number and the panel itself will not actually process these messages. Using wireless devices that are not enrolled in your panel is one of the major advantages of the advanced operating mode.

Posted on
Tue Nov 29, 2011 10:12 pm
mikedrinks offline
Posts: 54
Joined: Oct 12, 2004

Re: Beta ad2usb plugin now available

I just want to say this plugin is AWESOME. This is dream-come-true functionality, It's been killing me that I can turn a light on and off from across the country but not my security system. This is huge.

One basic general question, how would I set up a trigger to alert me to a system alarm? And send me which device has faulted? Would I look for a keypad message? Note, I still have not been able to get my installer out to do the additional programming needed, not really worried about monitoring individual devices yet.

Posted on
Tue Nov 29, 2011 10:29 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Beta ad2usb plugin now available

mike drinks wrote:
...how would I set up a trigger to alert me to a system alarm? And send me which device has faulted? Would I look for a keypad message?


You would create a trigger and select your panel as the device. Then look for Panel Alarm On becomes 1. Determining the faulted zone or zones is probably not possible with only a panel device.Once you have zone devices you can scan all devices in a Python script and look for the ones that are faulted. At this time AppleSCript is not supported for plugin devices.

Posted on
Tue Nov 29, 2011 11:46 pm
berkinet offline
User avatar
Posts: 2718
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Tracking zone state in Python

This snippet of code shows how you might scan your zone list looking for a faulted zone.
Code: Select all
for dev in indigo.devices.iter('com.berkinet.ad2usb'):
   if dev.model == 'Alarm Zone':
      if dev.states['state'] == 'Fault':
         print dev.name


Frankly, I am not really at a very advanced state with Python scripting of Indigo. I could write an AppleScript to check the states of a set of devices and email the results, but I am still unclear on how to do that in Python scripting.

I will think about adding some functions like this as predefined actions.

Posted on
Wed Nov 30, 2011 4:51 am
bbruck offline
Posts: 291
Joined: Oct 05, 2008

Re: Beta ad2usb plugin now available

Really second what Mike says - this IS a dream come true!

Who is online

Users browsing this forum: No registered users and 1 guest