We have moved at community.getvera.com

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

Offline pentium

  • Full Member
  • ***
  • Posts: 198
  • Karma: +11/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #855 on: December 14, 2014, 02:45:41 pm »
I have a 1 in numpartitions.  Been working a long time.

Offline kevinnutech

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +2/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #856 on: December 14, 2014, 03:05:06 pm »
ok...  I ran the dmesg with and without the AD2USB plugged into the Vera Edge.  I compared the files and the only difference is this line....

[41931.300000] usb 2-1: new full-speed USB device number 2 using ohci-platform

Well, it looks like they haven't gotten that working for the Edge yet - bummer.

Offline nas4a

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #857 on: December 15, 2014, 12:05:28 pm »
So I have a Vera 2 running UI1 that has been running my AD2USB Ademco Vista 10SE for a while..

I just got a Vera Edge.  Based on what I'm reading, I should leave the Vera 2 running the plug-in for now and not try and move it over to the new Edge, correct?

Offline kevinnutech

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +2/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #858 on: December 15, 2014, 03:29:50 pm »
That would be my recommendation until the Edge is mature enough for the product.

Offline nas4a

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #859 on: December 17, 2014, 09:28:53 am »
Ugh.  Thanks Kevin.  I guess that's what I get for trying to be on the cutting edge...And also why I've been hesitant to upgrade from UI 1.0 (a bit excessive, but if it ain't broke...)

Offline Vandamme23

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #860 on: December 18, 2014, 09:11:57 am »
FYI...  Got this response from Tech Support...

DEC 18, 2014  |  02:08PM UTC
XXXXX   replied:
Hi XXX,

Currently there is an issue that prevents our customers to use USB devices with Vera Edge, but this should be resolved in our next software release, by the end of this week.

Please let me know if you have other questions and I?ll get back to you afterwards.

Offline Vandamme23

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #861 on: December 20, 2014, 09:06:53 am »
Downloading Vera Edge firmware update as we speak... v 1.7.906...  Will report results shortly

Offline Vandamme23

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +1/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #862 on: December 20, 2014, 10:06:24 am »
Ok...  Followed the instructions and still not working...  here are the results...

1. type: lsusb <enter>

ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)

2. type: rmmod -f ftdi_sio <enter>

kmod: Usage:
        rmmod module

3. type: insmod vendor=0x0403 product=0x6015 <enter>

Failed to find vendor=0x0403. Maybe it is a built in module ?

4. type: echo "ftdi_sio vendor=0x403 product=0x6015" > /etc/modules.d/65-usb-serial-ftdi <enter>

5. type: echo "vendor:0403 product:6015" > /etc/cmh/serproxy.ports <enter>

6. reboot


Offline kevinnutech

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +2/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #863 on: December 21, 2014, 01:42:11 am »
There's something amiss with the ftdi driver in that release then...

Offline pletch

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #864 on: December 21, 2014, 09:56:54 pm »
I was able to get the module to load with slightly different syntax from above. At this point, dmesg would indicate that the FTDI SIO compatible converter was attached to ttyUSB0. From here, I could successfully issue the required ser2net command manually and then telnet to the ad2usb where I could confirm i was getting data from the alarm panel.  However, the GUI would not indicate the detection of a serial port. Further investigation of /var/log/cmh/serproxy.log showed no indication that the usb-serial adapter was being automatically connected via ser2net and /proc/tty was strangely missing. I was trying to compare what happens on my vera2 versus the veraedge as I moved the ad2usb between the two units to troubleshoot.  I can go no further at this point without guidance and assume there must be some issue with usbserial or the kernel particularly in light of the missing /proc/tty.

Instructions I used on the veraedge to get the serial port to connect:

1. type: lsusb <enter>

ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)

2. type: rmmod ftdi_sio <enter>
   The version of rmmod on the veraedge will not accept any options so the -f will generate an error if included.  This command isn't really necessary anyway as the ftdi_sio module doesn't appear to load by default on the veraedge.  In fact, there are no modules at all attached to usbserial according to lsmod in the default configuration.

3. type: insmod ftdi_sio vendor=0x0403 product=0x6015 <enter>
   You must specify the module name here or an error is generated.

Getting the module to load automatically on boot is also not the same.  There is now a /etc/modules-boot.d/ directory with soft links to the modules.d directory.  I suspect you might have to create / modify the module call there to get the module to load automatically but I didn't tinker with this.

I also must admit that I am a bit out of my wheelhouse here ....

Are we stuck until MCV addresses?

-Tim




Offline kevinnutech

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +2/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #865 on: December 22, 2014, 01:21:27 pm »
Unfortunately yes, this is out of anybody's control but theirs unless you know a way of pushing new MCV Firmware to people from 3rd parties

Offline nas4a

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #866 on: December 24, 2014, 09:02:19 am »
Really disappointed in the new Edge thus far....so many issues.  I don't know how you tout yourself as being compatible with so much stuff, yet not even supporting items your older systems supported.  Seems like they may have pushed this one to market far too quickly.

Offline sound-mind

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +1/-1
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #867 on: December 27, 2014, 01:16:54 pm »
Update: this and the following two posts do result in the Vera successfully communicating with the alarm panel so read on!

It has been a while since I've had to delve into this plugin but I guess my luck ran out when I upgraded to UI 7.  A few days later my Veralite turned into a brick.  But I digress...I now have a Veraedge and I'm rebuilding my automation network.

What follows is a brain dump from working with v1.7.906 so excuse the brevity/grammar/spelling/etc - I'll probably post a script later after I reboot and have to do all of this again:

1. Posts above regarding the removal of the module are correct.

2. Insertion of the module is product-ID specific.  Use lsusb to find the product ID.  It is in the form of 0403:6001.  The first 4 are the vendor ID which will be the same for all of us.  The second four digits after the colon are the product ID>  It looks like the product ID might vary, so find yours and use that in insmod.  I haven't tested it, but it might work without a product ID, but I'm not sure.

3 After that, unplug and reinsert the USB cable.

4. At this point you should see the serial port listed in Apps->Develop->Serial Port Config.  At least I think this is the first step that I saw the serial port, but I wasn't watching that closely.

5. The seg fault described above appears to be a result of serproxy not handling missing command-line args in clean way (read->sloppy programming and QA).  It prints usage information if you're running it with  < 3 arguments, when it really needs 4.  Interestingly, the native startup script also calls serproxy without the necessary arguments, so it goes into a endless seg fault loop, /mios/usr/bin/Start_serproxy.s:

"/usr/bin/serproxy 127.0.0.1 127.0.0.1 $InstID"

It is missing the trailing arg of the serial device.

/usr/bin/serproxy 127.0.0.1 127.0.0.1 <dev serial> /dev/ttyUSB0

So, run the serproxy command above.  You don't have to run ser2net manually, serproxy starts it with the appropriate options.  You can run 'ps ax|grep ser2net' if you're interested in what options are used.  You can run it in the background by adding an ampersand to the end of the command or by pressing ctrl-z then typing bg %% if you already started it.

It spits out some errors regarding downloads, but based on the logs, a number of downloads work, and they all seem to be pulling device configuration info from the Lua engine.  The ones that fail don't *seem* to be causing problems as it looks like it falls back to sane defaults but I could be wrong.

6. Not sure yet.  I'm posting because these steps seem to resolve problems described above.  Hopefully we can figure out the next problem.


« Last Edit: December 27, 2014, 03:29:48 pm by sound-mind »

Offline sound-mind

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +1/-1
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #868 on: December 27, 2014, 02:52:10 pm »
Warning: this may completely hose your Vera, I am not responsible for anything that results from using the stuff below. If you don't understand what I have below, you probably shouldn't try to use it.

OK this is what I'm using to automate the steps above, getting you to the point that the tty device is up, the daemons are running, and the serial port shows up in the UI:
Code: [Select]
#!/bin/sh

# SVN : $Id: Start_serproxy.sh 8764 2013-07-31 12:58:27Z florin $

#Copyright (C) 2008 Mi Casa Verde, Inc., a Nevada Corporation
#                    www.micasaverde.com
#           1 - 702 - 4879770 / 866 - 966 - casa
#This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License.
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
#without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

InstID=$(cat /etc/cmh/PK_AccessPoint)

while [[ ! -f /var/run/cmh.stop ]]; do
        # Intentionally done in-loop b/c the device might
        # not be inserted at boot, and this will pick it up on Lua reload
        ProdID=$(lsusb|awk -F '[: ]' '/0403/ { print $8; }')
        rmmod ftdi_sio
        insmod ftdi_sio vendor=0x0403 product=$ProdID
        TTYNode=$(dmesg|awk '/ now attached to/ { print $NF; }'|tail -n 1)
        kill $(ps ax|awk "/serproxy/ /!$$/ { print $1; } " 2>/dev/null) 2>/dev/null
        kill $(ps ax|awk '/ser2net/ { print $1; }' 2>/dev/null) 2>/dev/null
        sleep 5 # Give LuaUPnP some time to startup
        echo "Running serproxy:   /usr/bin/serproxy 127.0.0.1 127.0.0.1 $InstID /dev/${TTYNode}"
        /usr/bin/serproxy 127.0.0.1 127.0.0.1 $InstID /dev/${TTYNode}
        sleep 1
done

I replaced the /usr/bin/Start_serproxy.sh with that code because it is run on boot and, well, that is where it should be done based on the code that was already in there.  I replaced it by:
Code: [Select]
cd /usr/bin
rm Start_serproxy.sh
vi Start_serproxy.sh
<paste script above>
<save + exit (esc :wq enter)
chmod +x Start_serproxy.sh
reboot

To put the original back in-place:
Code: [Select]
rm /usr/bin/Start_serproxy.sh
ln -s /mios/usr/bin/Start_serproxy.sh /usr/bin
reboot
« Last Edit: December 27, 2014, 03:44:16 pm by sound-mind »

Offline sound-mind

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +1/-1
Re: Honeywell Ademco Vista Alarm Panels Plugin via AD2USB
« Reply #869 on: December 27, 2014, 03:26:33 pm »
It works!!!

With the script I posted above I can interact with the alarm panel in UI 7 v1.7.906 :)

If you replace the Start_serproxy.sh script as described above, things should start working... mostly.  I've found the "cheat sheet" is acting wonky.  The entries don't appear immediately.  They appear *eventually* in the cheat sheet list.  I think refreshing the page and going back in the cheat list helps  The devices that the cheat sheet creates do not appear until a reboot, AFAICT.

Hope all that helps.

Update: after a cold boot w/ removing power, the serial port settings in the UI appear to have been lost.  It was back to 9600 baud and no device was associated with it.  This caused a connection error like before.  But once I fixed the settings via the UI, and restarted Luup, things are working again.  I'll look into this more .

I've been reserved but at this point I'm going to have to throw a "WTF?" at the Vera team.  Spending a day fixing their problems, which has happened before, wears on one.  The problems described in the first post are a simple programming mistake that never should have made it past QA (argc < 4, ttydev = argv[3]... segfault).  The issues in this post just add to problem together illustrating the poor quality of the software product.   The only plus side here is that the platform is configurable to the point where we can fix their problems ourselves.  In essence, we are the Vera QA team.
« Last Edit: December 27, 2014, 08:31:19 pm by sound-mind »