Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds OpenZWave 1.6 compatability #182

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
5e4c583
removes repeated code from logging and uses module name in getLogger
kdschlosser May 24, 2019
512e193
cleans up imports
kdschlosser May 24, 2019
5a281c3
adds six to requirements
kdschlosser May 24, 2019
9951422
adds pydispatch and louie to requirements
kdschlosser May 24, 2019
b1a7710
adds pyserial to requirements
kdschlosser May 24, 2019
1e6a359
Alters the Singleton class to create instance singletons
kdschlosser May 24, 2019
084c7c0
Updates deprecated function and also adds some logging decorators
kdschlosser May 24, 2019
dedf1c0
Deprecates the ZWaveOptionSingleton class
kdschlosser May 24, 2019
fd2a120
adds set_reload_nodes_after_config_update method to ZWaveOptions
kdschlosser May 24, 2019
c08c202
deprecated ZWaveNetworkSingleton
kdschlosser May 24, 2019
ca4cd8b
Adds device config file updating methods.
kdschlosser May 24, 2019
3dfbc83
Adds node metadata and changelog
kdschlosser May 24, 2019
f89a7f6
Deprecated all of the scene methods. also SwitchAllOn and SwitchAllOff
kdschlosser May 24, 2019
09c2dbb
Removes the "test" folder from the sources when compiling OZW (only o…
kdschlosser May 24, 2019
473e2e3
Adds value instance labels
kdschlosser May 24, 2019
f11f3aa
Adds value BitSet support
kdschlosser May 24, 2019
5aa10b8
Adds imports for node metadata
kdschlosser May 24, 2019
f17ea95
Adds option docstring for ReloadAfterUpdate
kdschlosser May 24, 2019
4c7a0ed
Adds User Alerts and Manufacturer Specific DB Ready notifications
kdschlosser May 24, 2019
282d38c
Adds manager wrapper to handle exception catching from OZW
kdschlosser May 25, 2019
ce26196
Adds value index mapping
kdschlosser May 25, 2019
de2ea99
Adds usercodes
kdschlosser May 25, 2019
a0d3897
updates mechanism that gets command class specific values.
kdschlosser May 25, 2019
e1e0558
adds IsMultiInstance
kdschlosser May 25, 2019
7590ef3
adds SendRawData
kdschlosser May 25, 2019
c1ef5b6
some code updates
kdschlosser May 25, 2019
4959a29
Fixes a couple of cython problems.
kdschlosser May 25, 2019
af92b33
fixing unittests
kdschlosser May 25, 2019
336f1e7
foxes requirements
kdschlosser May 25, 2019
f489460
removes Louie and PyDispatcher install from appveyor script
kdschlosser May 25, 2019
92984f7
adds updating of setuptools to appveyor script
kdschlosser May 25, 2019
3665739
adds back in installation of PyDispatcher and louie to appveyor
kdschlosser May 25, 2019
f1a6fad
adds pyserial to appveyor
kdschlosser May 25, 2019
1d0f040
makes changes to string conversions
kdschlosser May 25, 2019
6ff55f0
makes changes to string conversions
kdschlosser May 25, 2019
59c2948
Adds module dependencies to the setup program
kdschlosser May 26, 2019
bb99995
Updates Readme.rst
kdschlosser May 26, 2019
31f33f1
Updates Readme.rst
kdschlosser May 26, 2019
356481f
Updates Readme.rst
kdschlosser May 26, 2019
81caad3
Updates Readme.rst
kdschlosser May 26, 2019
9ea4c5b
adds better handling when writing the config files during install
kdschlosser May 27, 2019
015dc63
fixes an import
kdschlosser May 27, 2019
1a05e8f
removes unused import
kdschlosser May 27, 2019
c9fea54
Changes Timer to threading.Timer
kdschlosser May 27, 2019
229c34d
Fixes bdist_wheel
kdschlosser May 27, 2019
78aef75
Fixes some Appveyor issues.
kdschlosser May 27, 2019
72cf531
Attempt to speed up Appveyor build
kdschlosser May 27, 2019
f3a5304
Fixes encoding problem in bdist_wheel
kdschlosser May 28, 2019
150eb5d
uses absolute path for python in appveyor.
kdschlosser May 28, 2019
348cb3b
removes global section from appveyor
kdschlosser May 28, 2019
b822d51
adds cython to appveyor
kdschlosser May 28, 2019
64aee22
..
kdschlosser May 28, 2019
7a6b95d
..
kdschlosser May 28, 2019
7ddab29
..
kdschlosser May 28, 2019
4f6877e
Fixes path issue in bdist_wheel
kdschlosser May 28, 2019
1b2f8af
More fixes to the bdist_wheel and appveyor
kdschlosser May 28, 2019
3fb614d
Last fix for bdist_wheel.
kdschlosser May 28, 2019
895ca1b
updates windows build to include additional python versions.
kdschlosser May 28, 2019
904b815
fixes keyerror in install on NIX systems
kdschlosser May 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.egg-info
*.orig
*.rej
*~
Expand Down
210 changes: 145 additions & 65 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.. image:: https://img.shields.io/pypi/format/python_openzwave.svg
:target: https://pypi.python.org/pypi/python_openzwave
:alt: Pypi format

.. image:: https://img.shields.io/badge/Documentation-ok-brightgreen.svg?style=flat
:target: http://openzwave.github.io/python-openzwave/index.html
:alt: Documentation
Expand All @@ -32,92 +32,157 @@ python-openzwave is a python wrapper for the openzwave c++ library : https://git
* many examples
* `Full documentation <http://openzwave.github.io/python-openzwave/index.html>`_

python-openzwave 0.4.x is here !!!
==================================

- New installation process via pip

----------------------------------
python-openzwave 0.5.x is here !!!
----------------------------------

Installation
============


NIX systems.
------------

- First, you need some build tools and libs. On ubuntu, you should use :

.. code-block:: bash

sudo apt-get install --force-yes -y make libudev-dev g++ libyaml-dev

- Make your virtualenv and activate it :
- Make your virtualenv and activate it :

.. code-block:: bash

virtualenv --python=python3 venv3
source venv3/bin/activate

- Install the default flavor :

.. code-block:: bash

(venvX) pip install python_openzwave

- The previous command try to install python_openzwave with the flavor 'shared'.
If it can't find a precompiled library of openzwave, it will use the flavor 'embed' with sources downloaded from https://github.com/OpenZWave/python-openzwave/tree/master/archives.
You can change this using flavor option.
There is a bug in the package dependencies and flavors on some systems. You may need to install dependencies manualy :

- on python 2.7 :

.. code-block:: bash

(venvX) pip install cython wheel six
(venvX) pip install 'Louie>=1.1'

- on python 3 :
- Install the default flavor:

.. code-block:: bash

(venvX) pip install cython wheel six
(venvX) pip install 'PyDispatcher>=2.0.5'

pip install python_openzwave


- The previous command try to install python_openzwave with the flavor 'shared'.
If it can't find a precompiled library of openzwave, it will use the flavor 'embed' with sources downloaded from https://github.com/OpenZWave/python-openzwave/tree/master/archives.
You can change this using flavor option.

- Choose your flavor :

- embed : the default one. Download sources from https://github.com/OpenZWave/python-openzwave/tree/master/archives and
build them. Python_openzwave is statically build using a cythonized version of libopenzwave. No need to install cython.
- shared : if you have install openzwave as module manually, you can link python_openzwave to it.
- git : download sources from openzwave github and link statically to it.
- embed_shared : download sources from https://github.com/OpenZWave/python-openzwave/tree/master/archives, build and install as module on the system.
- embed_shared : download sources from https://github.com/OpenZWave/python-openzwave/tree/master/archives, build and install as module on the system.
Python_openzwave use it. Need root access to install openzwave libs.
- git_shared : download sources from openzwave github, build and install them as module on the system.
Python_openzwave use it. Need root access to install openzwave libs.
- ozwdev and ozwdev_shared : use the dev branch of openzwave on github.
- dev : for python_openzwave developers. Look for openzwave sources in a local folder specified by the LOCAL_OPENZWAVE environment variable (defaults to 'openzwave').

- Install it :

.. code-block:: bash
(venvX) pip install python_openzwave --no-deps --install-option="--flavor=git"

(venvX) pip install python_openzwave --install-option="--flavor=git"

- You can update to the last version of openzwave using the git flavor :

.. code-block:: bash

(venvX) pip uninstall -y python_openzwave
(venvX) pip install python_openzwave --no-cache-dir --no-deps --install-option="--flavor=git"


(venvX) pip install python_openzwave --no-cache-dir --install-option="--flavor=git"


Windows
-------
- Installs a prebuilt wheel:

.. code-block:: cmd

pip install python_openzwave

If you happen to want to install the latest code from a Github clone you will
need to have a Microsoft Visual C (MSVC) compiler installed and also the SDK that
will work with that compiler version.

- The Windows build portion of the setup supports these MSVC compiler versions:

- MSVC++ 10.0: Visual Studio 2010, Visual C++ 10.0 - Windows SDK v7.0a, v7.1, v7.1a
- MSVC++ 11.0: Visual Studio 2012, Visual C++ 11.0 - Windows SDK v8.0, v8.0a
- MSVC++ 12.0: Visual Studio 2013, Visual C++ 12.0 - Windows SDK v8.1, v8.1a
- MSVC++ 14.0: Visual Studio 2015, Visual C++ 2015 - Windows SDK v8.1, v10.0
- MSVC++ 14.1: Visual Studio 2017 (v15.0), Visual C++ 2017 - Windows SDK v8.1, v10.0
- MSVC++ 14.11: Visual Studio 2017 (v15.3), Visual C++ 2017 - Windows SDK v8.1, v10.0
- MSVC++ 14.12: Visual Studio 2017 (v15.5), Visual C++ 2017 - Windows SDK v8.1, v10.0
- MSVC++ 14.13: Visual Studio 2017 (v15.6), Visual C++ 2017 - Windows SDK v8.1, v10.0
- MSVC++ 14.14: Visual Studio 2017 (v15.7), Visual C++ 2017 - Windows SDK v8.1, v10.0
- MSVC++ 14.15: Visual Studio 2017 (v15.8), Visual C++ 2017 - Windows SDK v8.1, v10.0
- MSVC++ 14.16: Visual Studio 2017 (v15.9), Visual C++ 2017 - Windows SDK v8.1, v10.0
- MSVC++ 14.2: Visual Studio 2019 (v16.0), Visual C++ 2019 - Windows SDK v8.1, v10.0

The build system will also locate any of the Visual Studio Build Tools versions as well.

You do not need to do anything other then have Visual Studio installed with the proper SDK.
You do not need to set up any kind of an environment, it is all handled by python-openzwave.

You are going to run one of the following commands

- To build and not install:

.. code-block:: cmd

python setup.py build --flavor=dev

- To build and install:

.. code-block:: cmd

python setup.py install --flavor=dev



NIX and Windows
---------------

- At last, you can launch pyozw_check to test your installation :

If no usb stick is connected to the machine, launch :



If no usb stick is connected to the machine,
or you have a Silicon Labs based ZStick and want to have it autodetect the port
launch :

.. code-block:: bash

(venvX) pyozw_check
pyozw_check

NIX
---

- Advanced checks supplying the port:

If you've one, use it for advanced checks :

.. code-block:: bash

(venvX) pyozw_check -i -d /dev/ttyUSB0
pyozw_check -i -d /dev/ttyUSB0


Windows
-------

- Advanced checks supplying the port:

.. code-block:: cmd

pyozw_check -i -d COM**


- Example output

.. code-block:: bash

-------------------------------------------------------------------------------
Import libs
Try to import libopenzwave
Expand Down Expand Up @@ -162,12 +227,27 @@ python-openzwave 0.4.x is here !!!
Try to remove watcher
Try to destroy manager
Try to destroy options

You can list the nodes on your network using :



- You can list the nodes on your network using :

NIX
---

.. code-block:: bash

(venvX) pyozw_check -l -d /dev/ttyUSB0 -t 60
pyozw_check -l -d /dev/ttyUSB0 -t 60

Windows
-------

.. code-block:: cmd

pyozw_check -l -d COM** -t 60



- Example output

.. code-block:: bash

Expand All @@ -193,7 +273,7 @@ python-openzwave 0.4.x is here !!!
1 - Is sleeping : False / Can wake-up : False / Battery level : None

...

------------------------------------------------------------
4 - Name : ( Location : )
4 - Ready : True / Awake : True / Failed : False
Expand All @@ -204,20 +284,21 @@ python-openzwave 0.4.x is here !!!
4 - Capabilities : {'listening', 'routing', 'beaming'}
4 - Neigbors : {1} / Power level : None
4 - Is sleeping : False / Can wake-up : False / Battery level : None

...


- The old manager is now available via the pyozw_shell command. You need to install module "urwid>=1.1.1" with pip before using it.

- libopenzwave and openzwave python modules are packaged in the python_openzwave.
So developers needs to update their install_requires (it works fine with pyozw_manager).
They can use the following code to update softly :
The old manager is now available via the pyozw_shell command. You need to install module "urwid>=1.1.1" with pip before using it.

libopenzwave and openzwave python modules are packaged in the python_openzwave. So developers needs to update their install_requires (it works fine with pyozw_manager).


They can use the following code to update softly :

.. code-block:: python

pyozw_version='0.4.1'

def install_requires():
try:
import python_openzwave
Expand All @@ -232,19 +313,18 @@ python-openzwave 0.4.x is here !!!
return ['python_openzwave == %s' % pyozw_version]


- If you already have an 0.3.x version installed, you should update your installation as usual. Don't install it with pip as it can break your installation (maybe not if you don't remove old modules)
If you already have an 0.4.x version installed, you should update your installation as usual.

- Support for windows, macosx, ... is not tested. Feel free to report bug and patches. We can try to support these plateforms. Don't have Windows at home so I can't help. Same for mac.
Support for OSX is not tested. We do not have a Mac at our disposal for testing. Please feel free to test it and report bugs and or patches.

- Old installation process is deprecated and reserved for python-openzwave-developers and alternatives machines.

- Please report your successful installations here : https://github.com/OpenZWave/python-openzwave/issues/73
Please report your successful installations here : https://github.com/OpenZWave/python-openzwave/issues/73

Support
=======
You can ask for support on the google group : http://groups.google.com/d/forum/python-openzwave-discuss.

Please don't ask for support in github issues or by email.
Please don't ask for support by email.

Pull requests
=============
Expand Down
Loading