This is a plugin that interfaces between Homebridge (and HomeKit) and the Lutron Caséta Smart Bridge. Specifically, this adds support for the Serena Smart Wood Blinds. Because HomeKit control for dimmers and switches, etc, are natively supported by the Smart Bridge, this plugin doesn't implement them. If you want to help out and add support, please see the To-do and contributions section at the bottom of this document.
NOTE: Pico remote support is complicated. I would like to add support, but I do not have the means to do so today.
This is specifically not for the Smart Bridge Pro, which uses (can use) an entirely different protocol. This plugin makes use of the lutron-leap-js library, which implements the Lutron LEAP protocol, used by the Lutron mobile apps.
The bridge ID is the serial number, and is printed on the underside of the bridge, indicated here in green:
The easiest way is to use the get_lutron_cert.py
script that comes with the pylutron-caseta
project, without which this would not have been possible.
To use the script, you'll want to check out the repo:
git clone https://github.com/gurumitts/pylutron-caseta.git
Then, create a venv and install the depedencies:
python3 -m venv env
. env/bin/activate
pip install .
Then run the helper script:
python get_lutron_cert.py
Each file corresponds to a configuration item:
caseta-bridge.crt
=> CA certificatecaseta.key
=> Private keycaseta.crt
=> Signed certificate
Either run npm -i homebridge-lutron-caseta-leap
in your Homebridge installation directory or install it using homebridge-config-ui-x
.
Each bridge on your network that you wish to control needs its own configuration entry.
If you're using the GUI, you'll want to fill out the form, copying and pasting in the appropriate fields:
The UI will handle multi-line input, so just paste it in.
Click the "ADD SECRETS" button to add additional bridges.
The shape of the configuration is:
{
"platform": "LutronCasetaLeap",
"secrets": [
{
"bridgeid": "0a1b2c3d",
"ca": "-----BEGIN CERTIFICATE-----\nMII...",
"key": "-----BEGIN PRIVATE KEY-----\nMII...",
"cert": "-----BEGIN CERTIFICATE-----\nMII..."
},
{ ... }
]
}
The authn strings are newline-escaped versions of the files you generated.
In order to enable debugging, set the DEBUG environment variable in the Homebridge UI to leap:*
. This will make this plugin, and its main library lutron-leap-js
noisier.
I welcome contributions! I wrote this to scratch an itch (no Serena wood blind support), but would be fine with additional devices. To add a device:
- Add a case to
LutronCasetaLeap.configureAccessory
andhandleBridgeDiscovery
for your new device type. - Add a class for your device. The constructor should wire up event handlers and manage services and characteristics.
- Add relevant methods to the
SmartBridge
class in thelutron-leap-js
project to control the device. These methods should construct command requests. - Add an "unsolicited events" handler in your new device class to update itself when new information arrives from the bridge, and to update characteristic values.