SPOTLED Python Library
This allows you to control bluetooth led name badges which use the SPOTLED app. You can buy them here:
Disclaimer
Notice! This library is not affilated with the creator of this product.
If you brick your device (albeit unlikely) with this library, DO NOT BLAME ME!
Installation
You need python3-gattlib, which is installable on debian with:
sudo apt install python3-gattlib
Then install the package with:
sudo pip3 install spotled
Example usage
import spotled
sender = spotled.LedConnection('mac address of your device')
sender.set_screen_mode(spotled.ScreenMode.NORMAL) # change screen orientation
sender.set_brightness(100) # brightness seems to be 0-100
# send text using the default 6x12 font
sender.set_text('Hello world!')
# send text which does not move
sender.set_text(' Static', effect=spotled.Effect.NONE)
# send smaller text (you can use any 12x12 or smaller yaff or draw font)
sender.set_text('Static Text!', effect=spotled.Effect.NONE, font="4x6")
# send multiple pages of 2-line text
# you can adjust time per frame with the frame_duration param
sender.set_text_lines("You can show several pages of text!\nNewlines\nare allowed.")
# send multiple pages of scrolling 2-line text
# you can adjust animation speed with the speed param
sender.set_text_lines("A long time ago in a galaxy far, far away....", effect=spotled.Effect.SCROLL_UP)
# send number bars (used for music visualization)
sender.send_data(spotled.SendDataCommand(spotled.NumberBarData([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9]).serialize()))
# send a static image (using the animation feature)
sender.send_data(
spotled.SendDataCommand(
spotled.AnimationData([
spotled.FrameData(48, 12, spotled.gen_bitmap(
'111111111111111111111111111111111111111111111111'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'1..............................................1'
'111111111111111111111111111111111111111111111111'
))
], 0, 0, spotled.Effect.NONE).serialize()
)
)
See the example_monika.py file for an example animation and example_pepsi.py for an example
scrolling bitmap text display. You can replay existing payloads from Wireshark as well fairly
easily by using the SendDataCommand and chopping off the header (first 15 bytes).
Fonts from this software are from https://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html and are public domain.
You can get more fonts here: https://github.com/robhagemans/hoard-of-bitfonts
Metadata
Release files for spotled 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| spotled-1.3.0.tar.gz | 10.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spotled-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 170.4 kB
Release files / spotled-1.3.0.tar.gz
| Download URL | spotled-1.3.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56950993448b9b519ac6c60fd0d7b38f76cc2f41403c3f2834a7fa557fee0d61
|
|
BLAKE2b-256 checksum How to use checksums |
d4750709ead2c319a90bcb1a1d9bf6f83c4a157b289ad66f6e8e7a0a4ebf7a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2
|
Release files / spotled-1.3.0-py3-none-any.whl
| Download URL | spotled-1.3.0-py3-none-any.whl |
|---|---|
| Size | 159.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4533d20dedc2ff9d551261ece6f67ae5f45eb3e4cba0ef2bb5cee1a388ba65b
|
|
BLAKE2b-256 checksum How to use checksums |
df2bfd06cea387bd44f5de54618b631e4312186e6e1bfe1da869d3c14e64c777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2
|
Security for spotled 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.