Vivint Smart Home integration

Does anyone know if integration with the Vivint smart home hub is possible? I did a cursory search and only found information about Vivint devices not the smart hub. I would like to create triggers based on alarms and door status etc.

Chad

3 Likes

As there was no reply, I'm assuming that's a "no". From looking around online, it looks like Vivint Sky / Vivint Smart Home Hub does have an API, but that it is not open and can only be used by approved partners. So I'm guessing that doesn't mean it can't be done, but that it isn't likely.

It would certainly be very useful to be able to get read-only access to door lock status etc from the Vivint hub as triggers and also for display on a dashboard.

I'm not sure how much it helps with a Hubitat integration, but there is a HomeBridge plugin that seems to work well... just thinking if someone wanted to port it to groovy, that might be a good starting point?

1 Like

I spent the past week setting up the Homebridge Vivint plugin + the Homebridge Node-RED plugin + the Hubitat Node-RED plugin to get these devices into Hubitat. It’s been rough and I hate it, but it seems to be working. I’m motivated to build a better solution, but it may be a bigger project than I can dedicate myself to right now.

The Vivint API uses PubNub for real-time updates. I don’t know if that can be handled within Hubitat itself. There are several Python libraries for interfacing with the Vivint API, so I’m considering setting up a web server on the Raspberry Pi to act as a broker between Vivint and Hubitat (à la rest980 for iRobot devices, but hopefully with real-time updates instead of polling).

1 Like

So... I managed to create a working solution:

I forked the Homebridge plugin for Vivint and modified it to work as a standalone server for Node.js. Then I created a Hubitat app and drivers to interact with this server. The server pushes updates on-demand to Hubitat, so everything stays up-to-date with no polling.

There isn’t good documentation for how to get it set up and running, and I’m not really in a position to provide much support. I wrote it for myself and didn’t really intend for anyone else to use it, but I’m willing to help out where I can.

It’s not complete, as I haven’t ported over the switch, dimmer, garage door, or thermostat device types. I don’t have these devices, so I don’t have much motivation, but I might get to them eventually. I have created device types for the main panel, contact sensor, motion sensor, smoke sensor, carbon monoxide sensor, lock, and camera devices. I also created new devices for a doorbell camera and a glass break sensor.

If you’re familiar with Node.js and feeing brave, you’re welcome to try it out!

1 Like

I'll definitely take a look at this, thanks for sharing Mike!

I have this up and running pretty straight forwardly, but here are some basic instructions for folks that want to give it a try - note that I'm running the Node.js package on a raspberry pi, and these instructions will be somewhat specific to that platform.

To install the server:

  1. Ensure you have node.js installed and at least version 10.17.0 (if you don't know what node.js is, this maybe the time to reconsider, but if you google it, there are many websites with instructions)
  2. Open a terminal on your Pi
  3. Clone the repository by entering git clone https://github.com/mikee385/hubitat-vivint
  4. Enter the Vivint username and password in the default.json file (located in /home/pi/hubitat-vivint/nodejs/config if your username is pi)
  5. Install the node.js package by changing to the /hubitat-vivint/nodejs directory (/home/pi/hubitat-vivint/nodejs if you are using the default username) and typing npm install in the terminal. This might take a couple of minutes...
  6. npm may warn about an audit issue, if so, type npm audit fix and let it update the appropriate packages.
  7. Temporarily run the server by typing node index.js in the terminal, open a browser and go the the URL http://localhost:38283/devices. If the server is running, you'll get a list of your Vivint devices. Stop the server by typing Ctrl+Z in the terminal.
  8. Edit the WorkingDirectory entry in the hubitat-vivint.service file to point to the nodejs directory (/home/pi/hubitat-vivint/nodejs again if your username is pi)
  9. Type /sudo cp hubitat-vivint.service /etc/systemd/system/hubitat-vivint.service at the terminal, followed by sudo systemctl start hubitat-vivint.service.
  10. Open the browser and navigate to http://localhost:38283/devices again to check that the server is running. If so, type sudo systemctl enable hubitat-vivint.service in the terminal. The server will now run automatically when the Raspberry pi boots.

OK, time for a breather... You've got the server running, now onto the Hubitat.

  1. If you don't already have it, install the Hubitat Package Manager app.
  2. Click Install then From a URL
  3. Enter https://raw.githubusercontent.com/mikee385/hubitat-vivint/master/hubitat/packageManifest.json as the URL and install the package
  4. When the app and drivers have installed, it should take you to the app configuration page (if not, click on the app Vivint Integration assuming you kept the default app name)
  5. For the Server URL enter http://<IP ADDRESS>:38283 where <IP ADDRESS> is the IP address of your Raspberry Pi.
  6. Select a Notification Device (I only had one option here)

And that's it, the app should now discover your Vivint devices which will be listed under your Devices as Vivint <DEVICE NAME> where <DEVICE NAME> is the name of the device on your Vivint panel.

I know that sounds complicated, and if you can't follow it, or aren't comfortable using node.js, probably best to stop. That said, it worked fine for me and the devices I've tested so far seem to be working fine.

I hope this helps folks install this and thanks again to Mike for porting the package, app and drivers.

2 Likes

Dude, that was fantastic and very much appreciated. I’m amazed you were able to make sense of the littlest things, like hubitat-vivint.service. Would you mind if I copied/stole what you wrote and included it in the README?

1 Like

This is a new one for me! I learn something new every day!

Go for it, happy to help!

@mikee385 This looks great! I can't get it to work however, as my Vivint account requires Multi-factor auth. Any chance you can work your magic on the new version of Homebridge-vivnt? Looks like they've fixed the issue.

Thanks so much!!

Thanks! Yes, I should be able to do that. I haven’t looked at the code changes in depth yet, although it looks a lot more involved than I had hoped. But no worries; I should be able to work my way through it.

1 Like

That would be completely epic! Thanks in advance

Have you had a chance to look at the code for Multi-Factor authentication? My Google Assistant refuses to talk to Vivint so this is my only option for any automation.

Not yet, unfortunately (new baby has been very distracting!). I’ve started looking into it again now. I’m still a bit intimidated by it all. We’ll see if I can actually put my hands to the keyboard this time.

On a related note, my system has been working consistently without MFA. I created a new Guest, non-Admin user from the Vivint phone app and gave it mobile access (not sure if it needs this). It requires a unique email address that can receive and respond to an invite email, but Gmail lets you add “+” and then any extra text to any existing email address, so I just used:
my_normal_email+hubitat@gmail.com

This guest account doesn’t seem to require MFA, so I can use it for this login. I’m not sure if Vivint still allows this to work for new accounts, but I wanted to share it in case it works for someone else.

Is there a way to set rules to automatically arm/disarm the alarm based on the time of day? For example, arm stay at 11 pm and disarm at 7 am? I'm not finding a way in "Rule Machine."

Got that park working thank you. I have noticed that the panel status is not reflected in HSM, and changing the status in HSM does not change the panel.

Other than that, I am able to see and control the panel from the device list, but not as part of a dashboard or rules.

You can use Run Custom Action in Rule Machine to manipulate the alarm.



There’s a switch in the alarm panel device that should push the status to HSM, although I haven’t been using it myself, so it may not be working anymore. I also didn’t implement it the other way (HSM to Vivint). I’m not sure if it’s doable from a device, but I’ll look into it. I may integrate it into the app if I have to.