Vista Alarm Integration using NuTech AD2USB and Mac

Continuing the discussion from ADT Integration:

I created a new thread so as to keep the discussion separate from the ad2pi integration. While there is a lot of commonality and I used that code as a starting point, I figured it would be easier to tell which project people were asking about if they had their own threads.

My Goals

I wanted to use an existing Mac Mini that was used for home theater that was already located near the alarm panel. All I needed to add was the alarm panel interface (AD2USB). Since I was unfamiliar with arduino this seemed the fastest way forward for me.

I also wanted the Mac side to be standalone and not require any other components to run and I wanted a chance to do something in swift.

What I have at this point is definitely a prototype quality, particularly on the mac side where the code was largely stream of consciousness. It currently requires you to build your sensor configuration into the code which won’t help those who aren’t comfortable in xocode very much. I’m hoping to get some time to work on the UI for it eventually but realistically that won’t be until early next year. I didn’t want to wait that long to post something. The code does seem to work though it almost certainly has bugs but it should be useful to anyone else who wants to pursue a similar path.

Acknowledgements

What I did would not have been possible without the prior work of @craig. The tireless support of folks like @geko and @tslagle13 and others made getting to this point much quicker than it otherwise would have been.

Some notes

  • The Mac code requires OS X 10.10 Yosemite and you’ll need to download xcode from the app store to build it. My code is written in swift which should be pretty straightforward for anyone comfortable in groovy. It depends on several Objective C libraries to do the serial port and web server and those libraries seem to generate lots of warnings in xcode 6.1. I didn’t try to clean them up yet so those warnings are harmless though annoying.
  • Before I started this project I knew nothing about Vista alarm panels. My knowledge is still fairly rudimentary so there may be better ways to do things. If anyone has ideas, let me know!
  • For those with PC’s or linux, you should be able to model a similar server on this code.

The code is located at: https://bitbucket.org/ac4lt/vistathing

I hope this can help others trying something similar!

2 Likes

Updated today with a minor fix (typo in logging) and icons for smart app and mac app (not great icons but at least there is something…)

Pushed a new version today (1.3) with:

  • new device type for arm stay switch so smart apps can transition directly to arm stay
  • new device type for arm away switch. this is redundant to the alarm controller but might be more clear for certain use cases
  • mac app can now transition directly between armed states by knowing when it has to disarm first
  • fixed some minor bugs

Interesting and I’d love to integrate similar, but my Mac Mini is generation 2 and doesn’t support Yosemite. Any way this can be reverse engineered to run on Mac OS Lion or Snow Leopard?

Keep up the great work!

Brian Sorli

The source is available. The 3rd party libraries I used are Objective C but the application is Swift. It should be possible to port the Swift code to Objective C. The interface in xcode also makes use of storyboards but it’s pretty simple so would port to a traditional xib pretty easily.

Sounds like a plan and I’ll have to look into it later since school is a little busy right now and will always have more time during the summer. Thanks for the input and great ideas!

Brian…

I’ve updated a new revision of this that now works with Swift 2. It also updates the SmartApp to better display events in the SmartThings activity feed.

Updated with a small bug fix in the mac app. It was sending the wrong id when it tried to tell ST the chime as on.