GPIO scheduler for Raspberry Pis
Project description
Burnlight
Burnlight is a server and client for automating the control of the GPIO pins on a Raspberry Pi.
Features
- Run custom schedules controlling one or more GPIO pins.
- Web API for remote management and monitoring.
- Paired input and output for feedback on controlled systems.
Requirements
- Flask - Serves the API.
- gevent - Runs the scheduling threads.
- Lark parser - Parses BSL programs.
- gpiozero - Controls GPIO outputs on Raspberry Pi computers.
Getting started on Raspbian
Install Burnlight using pip:
$ pip install burnlight
Start the server:
$ burnlightd
Create a file schedule.bsl
with the following contents:
{
loop 10: {
(On,1),
(Off,1)
}
}
Add and start the schedule using the client
$ burnlight schedules add schedule.bsl --start_time now
Burnlight Scheduling Language (BSL)
Schedules are described with a simple language.
The following program will turn the on output for one second each minute for one hour.
{
loop 60: {
(On,1),
(Off,59)
}
}
BSL currently supports programs consisting of sequences of output statements and loops.
The simplest program possible is {}
, which will do absolutely nothing.
We can make it slightly more interesting by using output statements.
An output statement takes the for (<state>,<duration>)
where <state>
is
the desired output state, On
or Off
, and <duration>
is the duration
the output should be in that state in seconds.
The following program turns the output on for ten seconds:
{
(On, 10),
(Off, 1)
}
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 burnlight-0.2.0.tar.gz
.
File metadata
- Download URL: burnlight-0.2.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 937e30fed12cb50be68037046d1fedf78f7bfe9670cfe04b12c603803cf6f5bd |
|
MD5 | c324e912c0477c04acd79976d9acdb0f |
|
BLAKE2b-256 | 1e31fa29040a307ecd496c94c74385bb2f814cbe6c980ddb2ed7a58fd81974c1 |
File details
Details for the file burnlight-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: burnlight-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca306d8a0adb2b42fce452b341462e75ebc4461460ee425a54636d5ffd017b5d |
|
MD5 | 4306bce013a57d837210e3a5b737b663 |
|
BLAKE2b-256 | 7602ee707d96741b9376e0573d36eac11918472fcae493d5fdbba501f69e4463 |