AD2USB over network / ethernet

Hi all,

With xuniman help, a new plugin version that include the support for over network / ethernet implemented by hugheaves. The instructions for configuring the plugin can be found on my earlier post.

All the Bests,

  • Andrei -

[quote=“mcv.andrei, post:21, topic:182595”]Hi all,

With xuniman help, a new plugin version that include the support for over network / ethernet implemented by hugheaves. The instructions for configuring the plugin can be found on my earlier post.

All the Bests,

  • Andrei -[/quote]

Hi Andrei,

Is this plug-in version supposed to work with UI5, or is it a UI7 only version? I tried version 3.82 to my UI5 veralite using the test-plugin link: MiOS Apps but I’m getting a Lua error on startup. (see screenshot) There’s no obvious Lua error in the logs.

Also, what’s the purpose of the “overNetwork” setting? As far as I can tell, it just changes the location of the PIN code storage from /etc/cmh-ludl/havsc to /tmp/havsc. The determination of whether or not to use the network connection seems to be still based on whether or not the “ip” luup variable is set (or not). Currently, my “overNetwork” setting is set to "0’, but I’m still connecting over the TCP/IP network to the panel.

Hugh

Hi hugheaves,

Is this plug-in version supposed to work with UI5, or is it a UI7 only version? I tried version 3.82 to my UI5 veralite using the test-plugin link: http://apps.mios.com/test-plugin.php?id=968&show=versions but I'm getting a Lua error on startup. (see screenshot) There's no obvious Lua error in the logs.

This is due to luup.set_failure at the end of the startup function, it should be there only for UI7. My bad, I forgot to check this.

Also, what's the purpose of the "overNetwork" setting? As far as I can tell, it just changes the location of the PIN code storage from /etc/cmh-ludl/havsc to /tmp/havsc. The determination of whether or not to use the network connection seems to be still based on whether or not the "ip" luup variable is set (or not). Currently, my "overNetwork" setting is set to "0', but I'm still connecting over the TCP/IP network to the panel.

I tried to include the changes form our first post into plugin and this was the only difference I noticed. I don’t have this alarm panel and I don’t know how it should work. I did the changes and I asked some users to test it. Based on the feedback I got, I decided to publish the new version, but it seems that it was causing problems for some users, so I removed it from apps. This is another reason for letting you maintain the plugin. I tried to help when I found some time between my task but the result was not the on I expected, so I will let you handle the plugin.

All the Bests,

  • Andrei -

OK, I feel like I must be the only who can’t get this to work.

I installed the AD2USB from the App tab (version 3.12) on a Vera Edge running UI7 (1.7.1320). I do not have the IODevice field in the advance/variables tab. It showed for a brief second and when I set it to 0 it disappeared. I do have a commUse field that is set to RS232 and I can’t get it change.

I’ve rebooted, reloaded Luup and refreshed the page many many times.

I have the IP entered correctly.

I have the AD2PI with a PI running perfectly on my network. I can access it from internal and external with my phone or laptop.

The Vera Edge is working fine running several devices and scenes.

Here’s the kicker, I can use the Envisalink plugin fine. I prefer to use the AD2Pi and shelve the Envisalink but can’t get it to work.

I’m certain I’ve done everything in this post at least 14 times.

Any help is greatly appreciated.

I’m using Vera Edge, Raspberry Pi, and a AD2USB… Trying to get the Edge to connect to the AD2USB through the network. Installed the latest Vera plug-ins and the .lua files from this thread, and can’t get the new settings to show… Any help would be appreciated… Haven’t been able to locate any step-by-step instructions, so I will document my journey here…

I keep finding(through Google) bits and pieces so I’ll try to document what I have done so far…

—Raspberry Pi

  1. Attach AD2USB to USB port
  2. Installed ser2net… ‘sudo apt-get install ser2net’
  3. Installed monodevelop… ‘sudo apt-get install monodevelop’
  4. Installed AlarmDecoder Keypad… download here - http://www.alarmdecoder.com/wiki/index.php/AlarmDecoder_Keypad
  5. Configure and test Alarm using AlarmDecoder Keypad

—Vera

  1. Installed AD2USB plugin
  2. Uploaded latest, patched L_VistaAlarmPanel1.lua from this thread

Feel free to help out with the next steps…

[quote=“Vandamme23, post:25, topic:182595”]I’m using Vera Edge, Raspberry Pi, and a AD2USB… Trying to get the Edge to connect to the AD2USB through the network. Installed the latest Vera plug-ins and the .lua files from this thread, and can’t get the new settings to show… Any help would be appreciated… Haven’t been able to locate any step-by-step instructions, so I will document my journey here…

I keep finding(through Google) bits and pieces so I’ll try to document what I have done so far…

—Raspberry Pi

  1. Attach AD2USB to USB port
  2. Installed ser2net… ‘sudo apt-get install ser2net’
  3. Installed monodevelop… ‘sudo apt-get install monodevelop’
  4. Installed AlarmDecoder Keypad… download here - http://www.alarmdecoder.com/wiki/index.php/AlarmDecoder_Keypad
  5. Configure and test Alarm using AlarmDecoder Keypad

—Vera

  1. Installed AD2USB plugin
  2. Uploaded latest, patched L_VistaAlarmPanel1.lua from this thread

Feel free to help out with the next steps…[/quote]

I had to add the overNetwork setting in UI7 manually:

Panel device > Advanced … New Service/Variable
New Service: urn:micasaverde-com:serviceId:VistaAlarmPanel1
New Variable: overNetwork
New value: 1

I also had to set “ip” on the Params tab to my RPI ser2net ip:port

Then I had to go to the partition device and set the KeypadAddresses to 16,18

I still get “Can’t Detect Device” despite it working so far. Now to sort out the PIN storage problem I’m having.

Thx krayola, Those final steps have me up and running. The full rundown is below…

Edge, Raspberry Pi, and a AD2USB.

—Raspberry Pi

  1. Attach AD2USB to USB port
  2. Installed ser2net… ‘sudo apt-get install ser2net’
  3. Installed monodevelop… ‘sudo apt-get install monodevelop’
  4. Installed AlarmDecoder Keypad… download here - http://www.alarmdecoder.com/wiki/index.php/AlarmDecoder_Keypad
  5. Configure and test Alarm using AlarmDecoder Keypad

—Vera

  1. Installed AD2USB plugin (It creates 2 devices, one for Panel, one for Partition)
  2. Uploaded latest, patched L_VistaAlarmPanel1.lua from this thread
  3. On the Panel device add the overNetwork setting in UI7 manually:
    Panel device > Advanced … New Service/Variable
    New Service: urn:micasaverde-com:serviceId:VistaAlarmPanel1
    New Variable: overNetwork
    New value: 1
  4. On the Panel device change the ‘ip’ variable to the ser2net ip:port from your raspberry pi
  5. On the Partition device set the KeypadAddresses to 31(yours may be different)

Just FYI, if you use ser2sock in raw device mode instead of ser2net you can run the AlarmDecoder Keypad software at the same time as the Vera because it can share the socket stream with more than one device at the same time.

Hi,

So I’ve done a little work on the file in this thread to make it support some firmware changes in the 2.8 branch. In my lab I’ve gotten this to work following these instructions:

—Vera

  1. Installed AD2USB plugin (It creates 2 devices, one for Panel, one for Partition)
  2. Uploaded latest, patched L_VistaAlarmPanel1.lua from this thread
  3. On the Panel device add the overNetwork setting in UI7 manually:
    Panel device > Advanced … New Service/Variable
    New Service: urn:micasaverde-com:serviceId:VistaAlarmPanel1
    New Variable: overNetwork
    New value: 1
  4. On the Panel device change the ‘ip’ variable to the ser2sock ip:port from your raspberry pi
  5. On the Partition device set the KeypadAddresses to 31(yours may be different)

On the raspberry pi, I use our image from alarmdecoder.com with the ser2sock already running (no need for ser2net or any modifications on the pi side if you are using our image) - I prefer ser2sock as it is multicast, so I will always use that in our lab.

Hi Kevin,

I installed per instructions above. The plugin works and I am able to control the panel via partition device but I keep getting Can’t Detect Device for the panel device. Any ideas?

Also, after 20 days or so, I have to reboot the RPi becuase Vera/Keypad App is not able to connect to it. Do you know where I can find any logs that might clue me into why it is failing? The RPi is up to date.

Thanks

boB

Sorry, no idea on the “Cant detect device” bit - seems to be a vera-ism that doesn’t affect actual arming and disarming.

If you are using our image on the pi, there are several places to look:

/var/log/messages
/opt/alarmdecoder-webapp/instance/logs/
/var/log/gunicorn/

Since you are using the pi with ser2sock, you can verify ability to connect from a PC using telnet: telnet :10000

If you cannot connect, I would assume that the pi itself is having issues, maybe power related?

Hi Kevin,

Thanks for the reply. Normally everything is ok with the RPi but I notice after 20+ days, I can not connect to it via vera or AD Keypad Desktop App. If I log into web interface, it will show the page but does not show the keypad. If I reboot, then everything works fine. The RPi seems to be working fine as I have several other RPis without issues. I checked the logs and didn’t see anything that stands out as a problem. I seems to me like the listener just stops. Have you seen that before?

boB

Not something I’ve seen before. Make sure ser2sock service is continuing to run and has not lost access to the serial port.

Are you using an AD2USB or AD2PI? AD2USB, perhaps it’s having a “usb disconnect” event and having trouble rebinding to the serial port - killing and restarting ser2sock should fix that provided that the usb stays at /dev/ttyUSB0

I am using AD2USB. I should get myself the AD2PI, that might fix it up.

Thanks

boB

It hasn’t happened in a long time so i am not certain, but it seems that everytime i disconnected the ad2usb cable from vera, I would have to go back in and set the serial port up in the vera interface. UI5

Ok, I tried to update Vera firmware to latest (1.7.855) and failed. Error was to contact support. Contacted support and they logged into my Vera3 and had to clear the Vera, upgrade it, then restore backup.

Now, getting error on Ademco Vista Alarm Panel “Missing port.Can’t Detect Device” and “Vista Alarm Panel : Connection down.” I checked the ip:port and was correct. (Running AlarmDecoder on RPi) AlarmDecoder (RPi) works fine and AlarmDecoder Keypad works. I could telnet into port 10000 and see the messages. Uninstalled app and reinstalled. No change.

overNetwork=1 is set
IODevice=0 is set

At this point, it has to be vera. Anyone have ideas?

boB

You probably did but didn’t mention it, did you set the baud rate in the serial port configuration to 115200?

I wanted to update my firmware on my AD2USB from 2.2a.6 to 2.2a.8.2 so I can use it with Honeywell Compass software. But after upgrading the firmware it does not work with Vera correctly anymore. I could arm and disarm but it would not update the status or trigger my lights. After downgrade the AD2USB firmware it worked correctly again. Is 2.45 still the latest plugin? Is there anyway to make it work properly with the latest firmware? I am on UI5.

Thanks!

Is this a fix for my issue? How do I add this?

http://code.mios.com/trac/mios_vista-alarm-panel-ad2usb/changeset/81/

I’m on UI7. I think I have this working. Kept getting the “Cant Connect” error even though everything including sensors were working correctly. But, the “You have one device disconnected” error message on the dash from Vera was driving me nuts. I took a look at the .lua kevin posted @ reply#28. Found this: (Lines #23-27)

local SID = {
	PANEL = "urn:micasaverde-com:serviceId:VistaAlarmPanel1",
	PARTITION = "urn:micasaverde-com:serviceId:AlarmPartition2",
	SECURITY_SENSOR = "urn:micasaverde-com:serviceId:SecuritySensor1"
}

I changed Line #25

PARTITION = "urn:micasaverde-com:serviceId:AlarmPartition2",

to

PARTITION = "urn:micasaverde-com:serviceId:AlarmPartition1",

I made this change, uploaded the changed .lua to my vera and the “Cant Connect” message went away. Everything seems to be working.
I don’t know if this change broke anything else I may not be using at this time. Such as an actual partition 2 connected to vera.

I am not a programmer, not a developer, and have little idea what I’m doing. I just know that something looked out of place, so I changed it and my problem went away

Hoping someone with some experience can chime in as to if I may have broken anything with this change I have not come across yet. I just know the message was driving me crazy and I wanted it gone, and now it is.