Skip to content
Snippets Groups Projects
Commit e58e8848 authored by jkerdreu's avatar jkerdreu
Browse files

Summary: Initial documentation

This is the first doc for the xAAL Python binding.


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@1863 b32b6428-25c9-4566-ad07-03861ab6144f
parent bbdf8149
No related branches found
No related tags found
No related merge requests found
Install
~~~~~~~
Right now, there is no public release (pip based) of xAAL Python binding. So
you have to install things from SVN or archive.
If you can use virtualenv (recommended). Python 3 version isn't mandatory but
highly recommended (some parts haven't be tested with Python 2 since a while).
First build a virtualenv :
$ virtualenv3 xaal_test
$ source xaal_test/bin/activate
Every time, you want to use the binding, you must source the activate script.
Download source files from SVN:
$ svn checkout https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/trunk/ xaal_svn
First, install the xaal.lib package:
$ cd xaal_svn/libs/lib/
$ python setup.py develop
Install the monitor lib (needed for Dashboard, REST API..)
$ cd xaal_svn/libs/monitor/
$ python setup.py develop
Install the tools
$ cd xaal_svn/libs/tools/
$ python setup.py develop
You can use the python setup.py install instead of develop, but modification
to source files, won't be applied, you have to re-install it. Right now develop,
is the better option.
Create the configuration files in your home directory:
$ mkdir ~/.xaal/
$ cp xaal_svn/Python/trunk/libs/lib/xaal.ini.sample ~/.xaal/xaal.ini
$ xaal-keygen
xaal-keygen will compute an key for a given passphrase. Edit the xaal.ini
file according to your needs.
Test
~~~~
First, you can launch a message dumper with this tools
$ xaal-dumper
$ or xaal-tail
To start an fake lamp,
$ cd xaal_svn/devices/test/DummyDevices/
$ python powerrelay.py
To search for devices, you can use:
$ xaal-isalive
$ xaal-info xxxxxxxxxxxxxx <- uuid
$ xaal-walker
Notes
~~~~~
- If you use xAAL on multiple hosts, take care of the system clock. xAAL use
date/time to cypher the messages. If clocks differs, you will receive an error
message about a "replay attack". In production, NTP is your best friend. A window
of 1 minutes is accepted, but no more.
Questions
~~~~~~~~~
- Python terminated by signal SIGSEGV: You probably forgot to setup the key in
config file.
- Configuration files are hard to read / edit. Why don't you use YAML or XXML
for config ?
......
......@@ -9,5 +9,5 @@
#cipher_window = 60 # size in seconds of the cipher window
# use xaal-keygen to build the key
key=13af792910d83072e46f8d5f13fd5e41a8ae4e86755bf56d3ae200f2af06ec0b
# key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment