Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
JJTech edited this page Jan 27, 2022 · 3 revisions

Welcome to the llfp wiki!

This library is meant to control Lutron products with the LEAP protocol, for example HomeWorks QS.

This Wiki is outdated, just read llfp/init.py for now! You can discover devices too!

There are also some tests scattered in the repo with more stuff.

Installing

First, get the .whl file from here

Then, run the command pip3 install llfp-*.*.*-py3-none-any.whl (Replace the '*'s with the version of llfp you downloaded)

Note: Currently, this is only available for python3. In the future, python 2 support may be added.

Basic usage

First, you need to setup a connection with the bridge object. For example:

import llfp
# Setup connection and login
bridge1 = llfp.bridge("192.168.0.5") #Replace with the IP address of your bridge
print(bridge1.login("yourUsername", "yourPassword")) #Replace with your username/password.

Next, you need to define a zone object.

# Control zone
zone1 = llfp.zone(690, bridge1) #Replace 690 with the number of the zone you want to control.

Note: As of right now, the current LEAP implementation does NOT support reading back zone numbers, so you will have to find this out elsewhere.

Then, you can do something.

print(zone1.goToLevel(0)) #Replace 0 with a number 0-100

For more examples and things to try, you can check the examples folder

Structure

The llfp library is split into two parts. The first part is leapjson and provides the formatted json commands that need to be sent. The second (and main) part is llfp and it contains the main classes and their function defs. The first class, bridge, defines the function need to control a bridge/proc. The second class, zone, defines how to interact with specific "zones", such as changing their color, brightness, etc. More classes for buttons, individual bulbs, etc. may be added.

Further Usage

The examples folder can provide some examples, as well as the python "help" command.