Skip to content

A pure python client to connect to a pilight daemon. Sendind and receiving commands can be asynchronous.

License

Notifications You must be signed in to change notification settings

DavidLP/pilight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A pure python client to connect to a pilight daemon

Build Status Coverage Status

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 acknowledge 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). The API is mentioned here: 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.

About

A pure python client to connect to a pilight daemon. Sendind and receiving commands can be asynchronous.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages