A library for controlling a LiteJet lighting system.
Project description
This project provides a pure Python3 library for interfacing with the LiteJet lighting system.
Setup
- You will need the LiteJet programming software from the Dragon Technologies Programming page.
- Your LiteJet MCP should be configured for 19.2 K baud.
- For firmware versions 5.00 and higher, this setting is configured using the LiteJet software's Settings screen.
- For firmware versions 4.90 and lower, this setting is configured by setting DIP Switch 4 to OFF. Press the RESET button after changing this.
- In the LiteJet software's Settings screen configure it to send "Third Party Carriage Return".
- In the LiteJet software's Lights screen configure each load to announce changes. This is the "Load RS232" checkbox on each load's middle panel.
- Connect the LiteJet's RS232-2 port to your computer.
If you have LiteJet 48 then the RS232-2 port is used to connect the two boards together. So you will need to configure RS232-1 for third party mode by setting DIP Switch 8 to ON and DIP Switch 3 to OFF. Press the RESET button after changing this. (To change RS232-1 back to programming mode, set DIP Switch 8 to OFF.)
Test
- List all buttons and loads:
python3 ./test.py --path /dev/serial0 list -l -b
- Monitor button presses and load changes:
python3 ./test.py --path /dev/serial0 monitor
- Control a load:
python3 ./test.py --path /dev/serial0 load 1 on
Sample
import asyncio
import pylitejet
async def main():
try:
lj = await pylitejet.open("/dev/serial0")
except pylitejet.LiteJetError as exc:
print(f"Cannot connect: {exc}")
return
await lj.activate_load(1) # on
await lj.deactivate_load(1) # off
await lj.activate_load_at(1, 50, 8) # 50% over 8 seconds
await lj.close()
asyncio.run(main())
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
pylitejet-0.6.1.tar.gz
(13.0 kB
view hashes)
Built Distribution
Close
Hashes for pylitejet-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be7ae1d59e41c4e8b9d2ab150a6cc55297be4d0298f5d993cfc57b08cf6220c7 |
|
MD5 | b30527047d007967541ccaa40b438112 |
|
BLAKE2b-256 | 39261ed2c8cede78151877cbb602f7da0022ebb35816356ed274caa5e4525747 |