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.

1 Like

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!

Download the Hubitat app