-
Notifications
You must be signed in to change notification settings - Fork 7
/
DEVEL.txt
132 lines (78 loc) · 3.34 KB
/
DEVEL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Developpers information
***********************
How to develop patches
======================
Get the sources
hg clone https://code.google.com/p/python-openzwave/
Developp, test, debug, test, ... :)
When your modification is functional, you are ready to submit a patch
Sync your repository :
hg pull https://code.google.com/p/python-openzwave/
hg update
Generate the patch
hg diff > somewordstoexplainwhatthepatchdoes.patch
As the code of python-openzwave is under developpment, submit atomic
patches. Otherwise, you should have merge problems when syncing your
repository.
This will generate a file in the current directory. Finally post it on
issues projets : https://code.google.com/p/python-
openzwave/issues/list .
Using a developper account
==========================
Contact the developpers for more informations.
Documentation
=============
Documentation is managed with sphinx. Don't utpdate txt files (README,
INSTALL, ...) , update the sources (>>*<<.rst) in docs. Use the
following commands to generate all docs files (txt, html and joomla)
./make_docs.sh
Packagers
=========
If you want to package python-openzwave for your distribution, look at
the make_dist.sh script. It builds a distribution directory with
documentation in build/distdir.
You can also submit your script in issues, it will be added to the
main code.
On Debian/ubuntu you can build python-openzwave using :
dpkg-builpackage
Static vs dynamic (or shared)
=============================
The openzwave (c++) lib needs to run as a singleton : it means that it
MUST have only one instance of the manager running on your computer.
There is 2 ways of linking libraries with a program :
* static : includes a copy of the library in your binary program.
This means
that your program has its own instance of the library. This the way
the install.sh runs. So you CAN'T have another program (like the
control-panel) running when using the python-openzwave library
* dynamic or shared : includes a link to the library in your
binary program.
This means that your program share the library with other programs.
In this case, the instance is owned directly by the library. This
the way the debian package works. So you CAN have another program
running when using the python-openzwave library. Of course, this
program MUST use the shared library.
Migrate from py-openzwave to python-openzwave
=============================================
Remove the old py-openzwave
find /usr -iname openzwave.so
This command show the list of files naming openzwave.so in /usr, ie
/usr/local/lib/python2.7/dist-package/openzwave.so
Remove it :
sudo rm /usr/local/lib/python2.7/dist-package/openzwave.so
Install the new version of python-openzwave : look at README
Update your code :
Everywhere in your code replace :
"import openzwave" to "import libopenzwave" "from openzwave" to
"from libopenzwave"
notifications :
In Maarten py-openzwave librairy, value is a string but in python-
openzwave, it's a value of the right type :
# 'value' : value.c_str(),
'value' : getValueFromType(manager,v.GetId?()),
wrapper : The wrapper is no longer supported. Now high level acces to
ZWave network is provided by the API (work in progress)
History
=======
The original script was from maarten damen :
https://github.com/maartendamen/python-openzwave