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-lutron-homeworks

v0.1.10

Published

Homebridge plugin for the circa 2005 Lutron Homeworks System

Downloads

29

Readme

homebridge-lutron-homeworks

Lutron Homeworks plug-in for Homebridge using RS232.

Got an old school Lutron Homeworks system? Don't want to pay $10,000+ to retrofit all of your dimmers for HomeKit? Then you're at the right place.

Requirements

  1. Check environment compatiblity for Node SerialPort.
  2. Connect host system to the Lutron Homeworks board using RS232.
  3. Check if you can successfully log into the system prior to installing the plugin (optional but recommended)
    • See here for instructions on how to do this using minicom

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plug-in using: npm install -g homebridge-lutron-homeworks
  3. Edit the plugin's settings in homebridge-config-ui-x in or update your configuration file manually. See example config.json snippet below.

This plugin was tested in docker using oznu's docker-homebridge image running on an Ubuntu 20.04 host.

Configuration

Minimum configuration sample (edit ~/.homebridge/config.json):

"platforms": [
        {
            "name": "Lutron Homeworks",
            "serialPath": "/dev/ttyUSB0",
            "platform": "LutronHomeworks"
        }
    ],

Required fields if your Lutron Homeworks system requires authentication:

  • "loginRequired": Must be "true"
  • "password": Lutron Homeworks system password. (Default is jetski...don't ask why)

Optional fields:

  • "baudRate": some number // optionally sets the baud rate of the serial port (defaults to 115200)
  • "defaultFadeTime": some number // optional fade time in seconds to use for all discovered devices (defaults to 1 if omitted)
  • "device": [{ "address": "01:04:01:01:01", "name": "Formal Living", "fadeTime": 3 },...] // optional list of devices with their name and specific fade times. This fade time overwrites defaultFadeTime.
  • "ignoreDevices": ["01:04:01:01:02",...] //optional list of devices to ignore and not add into HomeKit

Sample configuration with optional values (edit ~/.homebridge/config.json):

"platforms": [
        {
            "name": "Lutron Homeworks",
            "serialPath": "/dev/ttyUSB0",
            "loginRequired": true,
            "password": "jetski",
            "defaultFadeTime": 1,
            "devices": [
                {
                    "address": "01:04:01:01:01",
                    "name": "Formal Living"
                },
                {
                    "address": "01:04:01:01:02",
                    "name": "Powder Hallway",
                    "fadeTime": 5
                },
                {
                    "address": "01:04:01:01:04",
                    "name": "Family Room Lights"
                }
            ],
            "ignoreDevices": [
                 "01:04:01:01:05",
                 "01:04:01:01:06"
            ]
            "platform": "LutronHomeworks"
        }
    ],

What the heck are "Addresses"?

Addresses are literally the address for a dimmer or switch. Don't worry if you don't know the addresses of the devices on your Lutron Homework network. This plugin will add all the discovered devices using the address as the device's name in HomeKit. You can then edit config.json as needed.

What does this plugin do?

  1. Plugin sends the LOGIN, <password> if loginRequired is true
  2. Plugin sends the DLMON command to Lutron Homeworks so that we can observe when a dimmer's state has been changed
  3. Plugin sends the RDL, [<address>] command for every single possible address value. This command will return back a dimmer's current brightness level if a dimmer exists at address. This accomplishes two things:
    1. Discovers all the dimmers in the system
    2. Determines their current state

What kind of wizardry is this?

This isn't wizardry. Just taking advantage of Lutron HomeWorks RS232 protocol. You can read more about the protocol here.

Your code sucks

Well, yeah. This is my first homebridge plugin and first experience with TypeScript. Be nice.