Skip to content

anjos/lighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

image

Lighter

A bunch of utilities to help me configure and control my ZigBee network at home, via deCONZ and the Phoscon gateway, from Dresden Elektronik, Germany. This tool is written in Python using pydeconz, which are python-REST-ful-API bindings.

Installation

I advise you to install a Conda-based environment for deployment with this command line:

$ conda create --override-channels -c anjos -c defaults -n lighter python=3.7 lighter

Once the environment is installed, activate it to be able to call binaries:

$ source activate lighter

Usage

To use the program, you must configure the .lighter.json file, with the information from the deCONZ server you want to affect:

{
  "host": "phoscon.local",
  "port": 80,
  "api_key": "DEADBEEF22",
  "transitiontime": 0,
  "timeout": 10,
  "retrydelay": 1.0
}

To obtain the API key for your application, go to the server, and in the Gateway settings, click in "Advanced", then "Authenticate app". Within 60 seconds, issue the following command:

$ curl -X POST -d '{"devicetype":"lighter"}' "http://phoscon.local/api/"

This should provide you with an API key you must copy to the .lighter.json configuration file. Once that is ready, there is a single program that you can launch:

$ ./bin/lighter --help

And a complete help message will be displayed.

Development

I advise you to install a Conda-based environment for development with this command line:

$ conda env create -f dev.yml

Build

To build the project and make it ready to run, do:

$ source activate lighter-dev
$ buildout

This command should leave you with a functional environment.

Conda Builds

Building dependencies requires you install conda-build. Do the following to prepare:

$ conda install -n base conda-build anaconda-client

Then, you can build dependencies one by one, in order:

$ conda activate base
$ conda build conda

Anaconda Uploads

To upload all built dependencies (so you don't have to re-build them everytime), do:

(base) $ anaconda login
# enter credentials
(base) $ anaconda upload <conda-bld>/noarch/lighter-*.tar.bz2

About

Utilities for managing the ZigBee home stuff

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages