npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-veralink

v0.0.7

Published

HomeKit bridge for Vera

Downloads

4

Readme

VeraLink

VeraLink is an application for Z-Wave accessories from Vera to run as HomeKit Accessory Servers, allowing the devices to connect to iOS devices and be controlled by Siri.

This application use HAP-NodeJS (https://github.com/KhaosT/HAP-NodeJS) to create the HAP servers while connecting to the Luup Requests service from Vera to control the devices.

Installation

VeraLink requires the following libraries and applications to run:

  • nodejs
  • npm
  • git-core
  • libnss-mdns
  • libavahi-compat-libdnssd-dev

In Ubuntu/Debian system you can install the requirements with the following:

sudo apt-get update

sudo apt-get install nodejs npm git-core libnss-mdns libavahi-compat-libdnssd-dev

sudo npm config set registry http://registry.npmjs.org/

sudo npm install -g node-gyp

Once all the libraries are set, you can download the actual program:

For Standalone version:

npm install homebridge-vera

For homebridge version:

npm install -g homebridge

npm install -g homebridge-vera

Starting the APP

For Standalone version:

Execute with:

node VeraLink.js

The first run will prompt you with some variables about your Vera device to generate the proper config.js file

For homebridge version:

Edit your homebridge config.json file located on ~/.homebridge/config.json and add the platform for Vera, example:

{
    "bridge": {
        "name": "Homebridge",
        "pin": "987-65-432",
        "username": "CC:22:3D:E3:CE:30"
    },
    "platforms": [
        {
            "platform": "Vera",
            "name": "Vera",
            "veraIP": "10.0.1.5",
            "includesensor": false,
            ignorerooms: [20,21,22],
            "securitypoll": 2000,
            "dimmertest": false
        }
    ]
}

then you can run the app with the following command:

homebridge

Run it on the background

If you want to use it as a service, you can run it with forever https://github.com/foreverjs/forever

Options

You can change all the current options on the config.js file and it include:

  • veraIP: The current Vera IP for your Vera device
  • happort: The starting port of HAP, the program will increase this number for each device to make each individual server
  • cardinality: This variable is to change all the names of the devices at the same time, this will make iOS forget them
  • bridged: It will turn on or off the room bridged mode, if it set to off, each device will be individually broadcast
  • includesensor: Allow the use temp sensor as devices.
  • pincode: The global pincode for all the devices, keep the format ###-##-### and use complex numbers, eg 111-11-111 or 123-45-678 are invalid
  • securitypoll: Time in milliseconds to poll security sensors to get most recent state (live updates)

Recomendation

Use Insteon+ app to add sections, rooms and devices; you can also edit the Siri name of each device with it so it can be easier to trigger any accessory with a voice command.

Debug

VeraLink and The HAP-NodeJS library support the debug library for log output. You can print some or all logs by setting the DEBUG environment variable. For instance, to see all debug logs while running the server:

DEBUG=* node VeraLink.js

Notes

Special thanks to Albeebe for all his work and his original idea to get Vera to work with HAP, Alex Skalozub who reverse engineered the server side HAP and the biggest of thanks to Khaos Tian who made the awesome HAP-NodeJS implementation.

Known issues

  • Currently dimmer lights are not working with this version of the app because I don't have one to test, I will be releasing a new version with it shortly, but it will be untested.
  • You can change the password on the config.js file, but you can't use simple passwords like 111-11-1111 or 123-45-678
  • Sometimes it takes a long time to load the prompt that ask for the password of the device, please DON'T close the device adding screen during that time or the device will no longer work, to reset all, just change the cardinality setting on the config.js file.
  • A lot of other bugs may happen, so please try to debug the application and post your log on the issues tab
  • The status is a problem right now, because I know how to get the data from the Vera API but the real problem is the HAP-Nodejs part because I'm using the get callback, but it isn't being trigger when the homekit ask for a status change. Maybe I'm missing something on the documentation, so for now this script is remembering only its own action and not seeing what you manually do with the actual switch. I will try to fix this on a next release.