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

Updated the doc


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2900 b32b6428-25c9-4566-ad07-03861ab6144f
parent 4b9ff9b2
No related branches found
No related tags found
No related merge requests found
......@@ -600,11 +600,11 @@ a { text-decoration: none; }
<h1 class="title">xAAL Python stack</h1>
<div class="section" id="requirements">
<h1>Requirements</h1>
<p>To install xAAL for Python, you need Python3.</p>
</div>
<h1><span class="sectnum">1</span> Requirements</h1>
<p>To install xAAL for Python, you need Python-3 (version 3.8 or above). And limited stack exists
for Python-2, you can find more informations <a class="reference external" href="https://redmine.telecom-bretagne.eu/projects/xaal/repository/show/code/Python/branches/py2-backport">here</a>.</p>
<div class="section" id="un-x-like">
<h1>Un*x like</h1>
<h2><span class="sectnum">1.1</span> Un*x like</h2>
<p>Install the following packages:</p>
<ul class="simple">
<li><p>subversion</p></li>
......@@ -617,8 +617,27 @@ a { text-decoration: none; }
<span class="comment single"># recommended
</span>$ apt-get install python3-venv python3-pip</code></pre>
</div>
<div class="section" id="manual-install">
<h1>Manual Install</h1>
<div class="section" id="windows">
<h2><span class="sectnum">1.2</span> Windows</h2>
<p>This code can be used w/ Windows (tested w/ Win10 and Python 3.8). You can build
the virtualenv with the same way. To activate the venv, you should run Scriptsactivate.bat.
For Powershell users (recommanded), you must tweak the ExecutionPolicy to be able to run
<em>Activate.ps1</em>.</p>
<blockquote>
<pre class="code literal-block"><code>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser</code></pre>
</blockquote>
<p>To install libsodium. You can dowload it here: <a class="reference external" href="https://download.libsodium.org/libsodium/releases/">https://download.libsodium.org/libsodium/releases/</a>
Extract the DLL from the zip file (libsodium-x.y.z-stable-msvc.ziplibsodiumx64Releasevzzzdynamic)
in the Win32 DLL folder.</p>
<p>If everything is fine, you can use exactly the same commands on Un*x and Windows. The xaal-* commands
are just renamed with an exe extension (ie: xaal-dumper.exe)</p>
<p><strong>Issues:</strong> Right now some gateways won't work on Windows due to missing libaries (openZwave ie)</p>
</div>
</div>
<div class="section" id="installation">
<h1><span class="sectnum">2</span> Installation</h1>
<div class="section" id="manual">
<h2><span class="sectnum">2.1</span> Manual</h2>
<p>Right now, there is no public release (pip based) of xAAL Python binding, so
you have to install things from SVN or archive.</p>
<p>You can use virtualenv (recommended).</p>
......@@ -650,18 +669,19 @@ $ xaal-keygen</code></pre>
<p>xaal-keygen will compute an key for a given passphrase. Edit the xaal.ini
file according to your needs.</p>
</div>
<div class="section" id="automatic-install">
<h1>Automatic Install</h1>
<div class="section" id="automatic">
<h2><span class="sectnum">2.2</span> Automatic</h2>
<p>Instead of manual installation of each package, you can use the <em>install.py</em> script.
This script will install allmost all packages without user interaction.</p>
</div>
<div class="section" id="docker">
<h1>Docker</h1>
<h2><span class="sectnum">2.3</span> Docker</h2>
<p>The docker folder contains an Dockerfile to run the xALL software in a docker
container. The Dockerfile use the automatic installation script.</p>
</div>
</div>
<div class="section" id="tests">
<h1>Tests</h1>
<h1><span class="sectnum">3</span> Tests</h1>
<p>First, you can launch a message dumper with this tools</p>
<pre class="code bash literal-block"><code>$ xaal-dumper
$ or xaal-tail</code></pre>
......@@ -690,28 +710,11 @@ $ or xaal-tail</code></pre>
</span>$ xaal-send -d xxxxxxxxxxxxxx -r turn_off
$ xaal-send -d xxxxxxxxxxxxxx -r turn_on</code></pre>
</div>
<div class="section" id="windows">
<h1>Windows</h1>
<p>This code can be used w/ Windows (tested w/ Win10 and Python 3.8). You can build
the virtualenv with the same way. To activate the venv, you should run Scriptsactivate.bat.
For Powershell users (recommanded), you must tweak the ExecutionPolicy to be able to run
<em>Activate.ps1</em>.</p>
<blockquote>
<pre class="code literal-block"><code>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser</code></pre>
</blockquote>
<p>To install libsodium. You can dowload it here: <a class="reference external" href="https://download.libsodium.org/libsodium/releases/">https://download.libsodium.org/libsodium/releases/</a>
Extract the DLL from the zip file (libsodium-x.y.z-stable-msvc.ziplibsodiumx64Releasevzzzdynamic)
in the Win32 DLL folder.</p>
<p>If everything is fine, you can use exactly the same commands on Un*x and Windows. The xaal-* commands
are just renamed with an exe extension (ie: xaal-dumper.exe)</p>
</div>
<div class="section" id="issues">
<h1>Issues:</h1>
<p>Right now some gateways won't work on Windows due to missing libaries (openZwave ie)</p>
</div>
<div class="section" id="informations">
<h1><span class="sectnum">4</span> Informations</h1>
<div class="section" id="coding-style">
<h1>Coding style</h1>
<p>Every xAAL program (device, gateway, apps) use a namespace. For example, <em>xaal.rest</em>,
<h2><span class="sectnum">4.1</span> Coding style</h2>
<p>Every xAAL package (device, gateway, app) use a namespace. For example, <em>xaal.rest</em>,
or <em>xaal.zwave</em>. By convention, you can run everything just by calling the namespace
module.</p>
<pre class="code bash literal-block"><code><span class="comment single"># to run the meta data sever:
......@@ -722,14 +725,22 @@ module.</p>
<span class="comment single"># to run the Open Weather Map gateway
</span>$ python -m xaal.owm</code></pre>
<p>Of course, you need to install packages first.</p>
<p>To reduce memory footprint, you can use the <em>xaal-pkgrun</em> command. This tool will
register every package on a single Python interpreter.</p>
<pre class="code bash literal-block"><code><span class="comment single"># to run aqara and owm gateways:
</span>$ xaal-pkgrun owm aqara</code></pre>
</span>$ xaal-pkgrun aqara owm</code></pre>
</div>
<div class="section" id="links">
<h2><span class="sectnum">4.2</span> Links</h2>
<ul class="simple">
<li><p>The repository contains a large number of devices, gateways and tools. You can find
this list at : <a class="reference external" href="https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/branches/0.7/packages.html">https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/branches/0.7/packages.html</a>
- You can find the xAAL lib documentation at :
<a class="reference external" href="https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/branches/0.7/libs/lib/README.html">https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/branches/0.7/libs/lib/README.html</a></p></li>
</ul>
</div>
<div class="section" id="notes">
<h1>Notes</h1>
<h2><span class="sectnum">4.3</span> Notes</h2>
<ul class="simple">
<li><p>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
......@@ -738,7 +749,7 @@ of 1 minutes is accepted, but no more.</p></li>
</ul>
</div>
<div class="section" id="faq">
<h1>FAQ</h1>
<h2><span class="sectnum">4.4</span> FAQ</h2>
<ul>
<li><p>Configuration files are hard to read / edit. Why don't you use YAML or XML
for config ?</p>
......@@ -752,5 +763,6 @@ We want to provide a better user experience.</p>
</ul>
</div>
</div>
</div>
</body>
</html>
......@@ -4,11 +4,14 @@ xAAL Python stack
=================
Requirements
~~~~~~~~~~~~
To install xAAL for Python, you need Python3.
============
.. sectnum::
To install xAAL for Python, you need Python-3 (version 3.8 or above). And limited stack exists
for Python-2, you can find more informations `here <https://redmine.telecom-bretagne.eu/projects/xaal/repository/show/code/Python/branches/py2-backport>`_.
Un*x like
~~~~~~~~~~
~~~~~~~~~
Install the following packages:
- subversion
......@@ -24,8 +27,33 @@ For Debian / Ubuntu users:
# recommended
$ apt-get install python3-venv python3-pip
Manual Install
~~~~~~~~~~~~~~
Windows
~~~~~~~
This code can be used w/ Windows (tested w/ Win10 and Python 3.8). You can build
the virtualenv with the same way. To activate the venv, you should run Scripts\activate.bat.
For Powershell users (recommanded), you must tweak the ExecutionPolicy to be able to run
*Activate.ps1*.
.. code-block::
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
To install libsodium. You can dowload it here: https://download.libsodium.org/libsodium/releases/
Extract the DLL from the zip file (libsodium-x.y.z-stable-msvc.zip\libsodium\x64\Release\vzzz\dynamic)
in the Win32 DLL folder.
If everything is fine, you can use exactly the same commands on Un*x and Windows. The xaal-* commands
are just renamed with an exe extension (ie: xaal-dumper.exe)
**Issues:** Right now some gateways won't work on Windows due to missing libaries (openZwave ie)
Installation
=============
Manual
~~~~~~
Right now, there is no public release (pip based) of xAAL Python binding, so
you have to install things from SVN or archive.
......@@ -96,8 +124,9 @@ xaal-keygen will compute an key for a given passphrase. Edit the xaal.ini
file according to your needs.
Automatic Install
~~~~~~~~~~~~~~~~~
Automatic
~~~~~~~~~
Instead of manual installation of each package, you can use the *install.py* script.
This script will install allmost all packages without user interaction.
......@@ -109,7 +138,7 @@ container. The Dockerfile use the automatic installation script.
Tests
~~~~~
=====
First, you can launch a message dumper with this tools
.. code-block:: bash
......@@ -154,32 +183,12 @@ To turn on/off the lamp
$ xaal-send -d xxxxxxxxxxxxxx -r turn_on
Windows
~~~~~~~
This code can be used w/ Windows (tested w/ Win10 and Python 3.8). You can build
the virtualenv with the same way. To activate the venv, you should run Scripts\activate.bat.
For Powershell users (recommanded), you must tweak the ExecutionPolicy to be able to run
*Activate.ps1*.
.. code-block::
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
To install libsodium. You can dowload it here: https://download.libsodium.org/libsodium/releases/
Extract the DLL from the zip file (libsodium-x.y.z-stable-msvc.zip\libsodium\x64\Release\vzzz\dynamic)
in the Win32 DLL folder.
If everything is fine, you can use exactly the same commands on Un*x and Windows. The xaal-* commands
are just renamed with an exe extension (ie: xaal-dumper.exe)
Issues:
~~~~~~~
Right now some gateways won't work on Windows due to missing libaries (openZwave ie)
Informations
============
Coding style
~~~~~~~~~~~~
Every xAAL program (device, gateway, apps) use a namespace. For example, *xaal.rest*,
Every xAAL package (device, gateway, app) use a namespace. For example, *xaal.rest*,
or *xaal.zwave*. By convention, you can run everything just by calling the namespace
module.
......@@ -194,15 +203,21 @@ module.
# to run the Open Weather Map gateway
$ python -m xaal.owm
Of course, you need to install packages first.
To reduce memory footprint, you can use the *xaal-pkgrun* command. This tool will
register every package on a single Python interpreter.
.. code-block:: bash
# to run aqara and owm gateways:
$ xaal-pkgrun owm aqara
$ xaal-pkgrun aqara owm
Links
~~~~~
- The repository contains a large number of devices, gateways and tools. You can find
this list at : https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/branches/0.7/packages.html
- You can find the xAAL lib documentation at :
https://redmine.telecom-bretagne.eu/svn/xaal/code/Python/branches/0.7/libs/lib/README.html
Notes
......
......@@ -599,7 +599,7 @@ a { text-decoration: none; }
<div class="document" id="xaal-python-packages">
<h1 class="title">xAAL Python packages</h1>
<p>This page contains a curated list of Python based xAAL stack.</p>
<p>This page contains a curated list of Python packages for xAAL.</p>
<div class="section" id="libs">
<h1>Libs</h1>
<p>Commons libs used to develop applications and gateway.</p>
......
......@@ -2,7 +2,7 @@
xAAL Python packages
====================
This page contains a curated list of Python based xAAL stack.
This page contains a curated list of Python packages for xAAL.
Libs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment