-
Notifications
You must be signed in to change notification settings - Fork 1
Home
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.
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
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.
The examples folder can provide some examples, as well as the python "help" command.