AD2USB over network / ethernet

I recently moved my Vera Lite to a location that doesn’t have access to my alarm bus wiring. Rather than rewire, I decided to use an extra Raspberry Pi as a USB to ethernet bridge, and then patched the AD2USB plug-in to communicate over the network to the Raspberry Pi / AD2USB. (All credit goes to @futzle for the code to make this work - the patch was almost a straight cut and paste job from the Caddix plugin)

My alarm system connection now looks like this:

[Vista 20P] <—Alarm Bus—> [AD2USB] <—USB—> [Raspberry Pi ] <—Ethernet—> [Vera Lite]

Everything’s been up and running for a couple of weeks now without any issues.

To set this up, I had to install ser2net on the Raspberry Pi. As I’m running Raspbian, I just used apt to install the package:

# apt-get install ser2net

Once ser2net was installed, I added a line to /etc/ser2net.conf to make the AD2USB available over the network:

9999:raw:600:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT

On the Vera side, once running the patched AD2USB plugin, I set the IP address of my raspberry Pi, and the port number from the ser2net config above in the IP address field of the plug-in configuration. I also needed to clear the “IODevice” field. See the attached screenshots showing where to set these values.

I’ve attached a patched L_VistaAlarmPanel1.lua (and a patch file) below. If anyone else gives this a try, upload the L_VistaAlarmPanel1.lua to your Vera, and let me know if it works.

Note that the patched file is for UI5 only. I don’t have a UI4 device to develop or test with.

Hugh

This is awesome. Thank you so much for sharing.

If I could ask one more thing. I have the vista 20 p, the ad2usb, and the veralite. What else would I have to buy to do this. And by that I am requesting any model number or source or identifying information that I would need to duplicate your system. Would I need to program the raspberry?

[quote=“pentium, post:2, topic:182595”]This is awesome. Thank you so much for sharing.

If I could ask one more thing. I have the vista 20 p, the ad2usb, and the veralite. What else would I have to buy to do this. And by that I am requesting any model number or source or identifying information that I would need to duplicate your system. Would I need to program the raspberry?[/quote]

You’d just need a raspberry pi board, and possibly a USB power supply, SD card, and case if you don’t already have them. The raspberry pi can be found many places for around $35. Googling will show up sources for a case as well.

It’s very easy to setup / program. More information is on the official website:

If you’re going to buy one, I’d recommend getting the “B+” model, which is the latest version. It fixes some power supply issues that the older models suffered from.

Once you have one, there are a number of other “automation” tasks you can do with it. I use mine to control a sprinkler system as well.

thank you again, please stay tuned. I have a raspberry kit on the way that will be here sunday. hoping to have this working by the next friday. if you think of any tips or tricks, please feel free to load me up before i start.

I received my new PI, and followed your instructions. It was easier than I thought.

My problem right now is that there is nothing on the screen when i choose to set the serial configuration.

Also when it is rebooting, it says that the alarm connection is down.

I think I am really close and just need a way to input the information into the serial configuration screen that was there when it was connected directly.

Regarding the lua file that you attached, i downloaded it, and then went to the luup files option, and uploaded the file. Not sure if i selected reload, so i went back and did that.

Any suggestions?

I have a similar setup with a AD2USB plugged into the USB port of a Raspberry PI and the Pi on my network. I was able to get the Vera3 to see the PI by loading ser2net on the Pi using hugheaves instructions in this post.

My one problem was that even when using the modified lua file I wasn’t able to get the Vera to see the pi on the ip:port. I needed to go into my serial setup field and enter the Raspberry Pi ip:port (and the 115200,N,8,1) into the GC100 serial port information section that was created when I added a GC100 unit to the system. The Vera3 doesn’t actually talk to the GC100 serial port, it goes directly the the ser2net connection on the pi and all of the communications work.

I don’t know if you can install the GC100 app on a Vera3 without actually having the device. If it’s possible that would solve the issue of needing to have the USB port active.

[quote=“pentium, post:5, topic:182595”]I received my new PI, and followed your instructions. It was easier than I thought.

My problem right now is that there is nothing on the screen when i choose to set the serial configuration.

Also when it is rebooting, it says that the alarm connection is down.

I think I am really close and just need a way to input the information into the serial configuration screen that was there when it was connected directly.

Regarding the lua file that you attached, i downloaded it, and then went to the luup files option, and uploaded the file. Not sure if i selected reload, so i went back and did that.

Any suggestions?[/quote]

Hey pentium. Very sorry for the late reply. I didn’t get notice that you’d responded to this thread.

I’ve added a couple of screen shots to the first post that should help. You’ve got to set the IP address / port and also clear the “IODevice” field in the advanced settings.

Give that a try, and let me know if that fixes it for you.

Hugh

[quote=“xuniman, post:6, topic:182595”]I have a similar setup with a AD2USB plugged into the USB port of a Raspberry PI and the Pi on my network. I was able to get the Vera3 to see the PI by loading ser2net on the Pi using hugheaves instructions in this post.

My one problem was that even when using the modified lua file I wasn’t able to get the Vera to see the pi on the ip:port. I needed to go into my serial setup field and enter the Raspberry Pi ip:port (and the 115200,N,8,1) into the GC100 serial port information section that was created when I added a GC100 unit to the system. The Vera3 doesn’t actually talk to the GC100 serial port, it goes directly the the ser2net connection on the pi and all of the communications work.
they’
I don’t know if you can install the GC100 app on a Vera3 without actually having the device. If it’s possible that would solve the issue of needing to have the USB port active.[/quote]

xuniman,

Thanks for the feedback. I’m guessing what happened was that the AD2USB plugin may have still had an “IODevice” set in it’s configuration, even though it was using the IP address / port. I haven’t tried it, but if you configured an IO Port in the GC10 plugin, it may have “grabbed” the port settings from the AD2USB plugin and cleared them.

In reality, you can forget about the GC100. All you have to do is clear the “IODevice” field in the advanced settings of the AD2USB plugin.

Hugh

Works!! Thank you!

JR

Yes, the IO port has been cleared and I no longer need the GC100 entry for the communications to work. Thanks for the plug in modifications.

Just a note from us at Nu Tech/AlarmDecoder: You are able to use ser2sock from our raspberry pi image with the ser2net connection from the Vera. To achieve this, you run ser2sock in raw device mode (via configuration file or -0 on command line). Benefits of ser2sock over ser2net is multiple connection support - so many devices can connect in and use the AD2 device with ser2sock.

Has anyone noticed the Pin Code not being saved after a reboot? I don’t recall having to enter it in again after rebooting the Vera before I loaded the patch L_VistaAlarmPanel1.lua.

Can I try this with UI7? I couldn’t use the AD2USB before with UI7 because I couldn’t get the serial port to configure. But now it is using network I thought maybe it may work. Will the patch work with UI7 or can anyone make a modified patch?

Just in case it applies, i have this in my startup lua, changing the xxxx with my actual pin number. and the device number replacing my 34.

luup.call_action(“urn:micasaverde-com:serviceId:VistaAlarmPanel1”, “StorePinCode”, “xxxx”, 34)

So do I click on Edit Startup Lua and enter the code and hit GO? And is the device number the keypad number?

[quote=“pentium, post:13, topic:182595”]Just in case it applies, i have this in my startup lua, changing the xxxx with my actual pin number. and the device number replacing my 34.

luup.call_action(“urn:micasaverde-com:serviceId:VistaAlarmPanel1”, “StorePinCode”, “xxxx”, 34)[/quote]

The device number is the number assigned to your device ademco vista partion 1. look on the left in the advanced tab.

i think the answer to the other question is yes. i didn’t remember the go part, but pretty sure the save button will light up and you will need to click that. Then refresh your browser.

Hi all,

I updated the last plugin version with changes suggested by hugheaves in order to add this feature to the official plugin but I did it “blindly”(we don’t have this alarm panel at the office) and I need someone to confirm that works before I update the plugin on apps.mios.com.
I added “overNetwork” variable that is set to “0” by default for using the plugin without the new feature added. You will need to change it to “1” in order to use the “over network” feature (but not before you follow the instructions provided in the first post).

Let me know if the version attached is working and if so, I will update the plugin and release a new version.

Best Regards,

  • Andrei -

Hi there. Just wondering if there are any pros/cons to this setup vs just using an EVL-3 with the other plugin? I’m trying to decide between a DSC or Honeywell panel. And whether to use EVL-3 or not.

Thanks.

I tried testing this today with your April file above. My Vera with UI7 just went into a reboot loop.

Here is the log snippet:
50 04/29/15 15:12:09.393 luup_log:19003: Honeywell Ademco Vista Alarm Panel Plugin version 2.45 <0x2bfce680>
06 04/29/15 15:12:09.393 Device_Variable::m_szValue_set device: 19003 service: urn:micasaverde-com:serviceId:VistaAlarmPanel1 variable: PluginVersion was: 2.45 now: 2.45 #hooks: 0 upnp: 0 skip: 0 v:0x1184da8/NONE duplicate:1 <0x2bfce680>
01 04/29/15 15:12:09.394 GetLuaInterface can’t find device type: 4/0x1333b80 str: 0 <0x2bfce680>
01 04/29/15 15:12:09.395 luup_variable_get interface 0x12fb228 args 4 <0x2bfce680>
50 04/29/15 15:12:09.395 luup_log:19003: (VistaAlarmPanel::getDebugMode) Debug mode disabled. <0x2bfce680>
50 04/29/15 15:12:09.396 luup_log:19003: (VistaAlarmPanel::getNumPartitions) Number of partitions = 1. <0x2bfce680>
09 04/29/15 15:12:09.400 Child_Devices::ProcessChildDevice deleting device 19049 id vista_partition_1 room 0 desc Ademco Vista Partition 1 under 19003 topmost parent 19003 because type o:urn:schemas-micasaverde-com:device:VistaAlarmPartition:2!=n:urn:schemas-micasaverde-com:device:AlarmPartition:2 or file o:D_VistaAlarmPartition1.xml!=n:D_VistaAlarmPartition1.xml embedded o:0!=n:0 ok:0/1 <0x2bfce680>
06 04/29/15 15:12:09.469 Device_Variable::m_szValue_set device: 19050 service: urn:micasaverde-com:serviceId:VistaAlarmPanel1 variable: KeypadAddresses was: EMPTY now: #hooks: 0 upnp: 0 skip: 0 v:0x1186578/NONE duplicate:0 LEAK this:61440 start:155648 to 0x14c1000 <0x2bfce680>
09 04/29/15 15:12:09.479 Child_Devices::ProcessChildDevice created device 19050 id vista_partition_1 under 19003 topmost parent 19003 <0x2bfce680>
06 04/29/15 15:12:09.481 Device_Variable::m_szValue_set device: 1 service: urn:micasaverde-com:serviceId:ZWaveNetwork1 variable: LastDongleBackup was: now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2bfce680>
01 04/29/15 15:12:09.593 UserData::WriteUserData saved–before move File Size: 27810 save size 27810 <0x2bfce680>
02 04/29/15 15:12:09.594 UserData::TempLogFileSystemFailure start 0 <0x2bfce680>
02 04/29/15 15:12:09.620 UserData::TempLogFileSystemFailure 5026 res:1

I’ve attached the longer version if that will help. Now I just need to figure out how to get the vera back in service.

I’ll try and post the full log file again.

I tried hugheaves original luup file in post 1 and it causes the same kind of perpetual restart loop.

Hi xuniman,

Thank you for testing this. There was an issue in the L_ file when creating the alarm partition device, device file specified in L_ file was different then the one in D_ file and this caused the reboot loop. I attached another L file that should fix this. Please test this and let me know if it worked. You can PM or email me after you finish the tests.
Thank you again for your support.

All the Bests,

  • Andrei -