Skip to main content

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.

Metadata

Release files for lightberry 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightberry 1.1.1
File Size Uploaded
lightberry-1.1.1.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lightberry 1.1.1
File Interpreter ABI Platform
lightberry-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / lightberry-1.1.1.tar.gz

Download URL lightberry-1.1.1.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f6b91ba8eeca300011de408bbcb248cc36309e44f5b35d5607d20537415c46c3
BLAKE2b-256 checksum
How to use checksums
087cf43ca8b992661656f0add6a3f9d71393405b3a69ccf4a417382a509d2f1b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / lightberry-1.1.1-py3-none-any.whl

Download URL lightberry-1.1.1-py3-none-any.whl
Size 1.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e6cc3e8b010a27b01e2a667de5edec78cfc72562cc55d9af5f928ed0f5116bc
BLAKE2b-256 checksum
How to use checksums
4066bbed0fb7aa347b024094b4ee7a3b517bedad74893c13a6da76967c028d6e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page