A pure python module to connect to a pilight daemon to send and receive commands.
Project description
# A pure python client to connect to a pilight daemon
[![Build Status](https://travis-ci.org/DavidLP/pilight.svg?branch=master)](https://travis-ci.org/DavidLP/pilight)
This client interfaces with the pilight-daemon to send and receive RF codes (https://www.pilight.org/).
Sending and receiving is implemented in an asychronous way. A callback function can be defined
that reacts on received data. Automatic check if the send data was transmitted by the pilight-daemon
is implemented.
All pilight-send commands can be used by this client (https://wiki.pilight.org/doku.php/psend).
Also check https://manual.pilight.org/en/api
# Installation
The latest release is hosted on PyPi. Thus for installation type:
```
pip install pilight
```
Otherwise download the code and
```
python setup.py install
```
You can run the unit tests to check the installation
```
nosetests pilight
```
# Usage
```
from pilight import pilight
pilight_connection = pilight.Client() # Connect to the pilight-daemon at localhost:5000
pilight_connection.send_code(data={"protocol": [ "kaku_switch" ], # https://manual.pilight.org/en/api
"id": 1,
"unit": 0,
"off": 1
})
```
Also check the examples folder.
[![Build Status](https://travis-ci.org/DavidLP/pilight.svg?branch=master)](https://travis-ci.org/DavidLP/pilight)
This client interfaces with the pilight-daemon to send and receive RF codes (https://www.pilight.org/).
Sending and receiving is implemented in an asychronous way. A callback function can be defined
that reacts on received data. Automatic check if the send data was transmitted by the pilight-daemon
is implemented.
All pilight-send commands can be used by this client (https://wiki.pilight.org/doku.php/psend).
Also check https://manual.pilight.org/en/api
# Installation
The latest release is hosted on PyPi. Thus for installation type:
```
pip install pilight
```
Otherwise download the code and
```
python setup.py install
```
You can run the unit tests to check the installation
```
nosetests pilight
```
# Usage
```
from pilight import pilight
pilight_connection = pilight.Client() # Connect to the pilight-daemon at localhost:5000
pilight_connection.send_code(data={"protocol": [ "kaku_switch" ], # https://manual.pilight.org/en/api
"id": 1,
"unit": 0,
"off": 1
})
```
Also check the examples folder.
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
pilight-0.0.2.tar.gz
(8.9 kB
view hashes)
Built Distribution
Close
Hashes for pilight-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c752ea166c495ecd4c38d9c31aa6ebf70c8cfe2b6599b74d0944c2d3f524b8fa |
|
MD5 | 7a630050fb1f4a634acd8657ce8ac7d3 |
|
BLAKE2b-256 | 7786881da49347e34b0a58ea08f400fcf9ed525b9ccea9db431d77bfa267ca52 |