Lightberry Libraries
Project description
LightBerry Client Library
Lightberry is an open source home automation platform with Alexa integration. This library allows the easy development of a client implementation in the Python language.
Installation
To install the Lightberry client library, run the following command from a terminal:
pip3 install lightberry-lib
Usage
from lightberrylib import LightberryClient
device = Device(config.deviceId, config.deviceConfig)
client = LightberryClient(config.mqtt.host, config.mqtt.port)
client.set_device(device)
client.set_secret(<SECRET>)
client.connect()
The LightberryClient
constructor accepts two arguments: the MQTT host address and the port (typically 1883).
The Device
class is a custom class which is unique to your implmentation. It must implement the
lightberry-lib.device_protocols.IBaseDevice
protocol, and optionally the
lightberry-lib.device_protocols.IAlexaEnabledDevice
protocol to enable Alexa functionality.
The keys passed to the client.set_keys()
method are obtained from the Lightberry API through the
POST /api/developer/devices
endpoint.
For more information, check out the reference implementations in the examples
directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lightberry-1.1.1.tar.gz
.
File metadata
- Download URL: lightberry-1.1.1.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f6b91ba8eeca300011de408bbcb248cc36309e44f5b35d5607d20537415c46c3
|
|
MD5 |
f16041a1ef3e1551bb2c867d4ec2af60
|
|
BLAKE2b-256 |
087cf43ca8b992661656f0add6a3f9d71393405b3a69ccf4a417382a509d2f1b
|
File details
Details for the file lightberry-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: lightberry-1.1.1-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
1e6cc3e8b010a27b01e2a667de5edec78cfc72562cc55d9af5f928ed0f5116bc
|
|
MD5 |
b34d6d13457ba8ed67b74dbf1ac7a6ab
|
|
BLAKE2b-256 |
4066bbed0fb7aa347b024094b4ee7a3b517bedad74893c13a6da76967c028d6e
|