forked from gege05/domoticz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
INSTALL.txt
220 lines (166 loc) · 7.49 KB
/
INSTALL.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
Usage: Domoticz [-www <port>] [-verbose <0|1>]
-www <port> Default is: -www 8080
-verbose <0|1> (0 is none, 1 is debug) Default is: -verbose 0
Examples:
Domoticz (this is the same as Domoticz -www 8080 -verbose 0)
Domoticz -www 81 -verbose 1
If Domoticz and the browser are running on the same system you can connect with http://localhost:8080/
To stop the application: press Ctrl-C in the application screen (not in the browser)
Compatible browsers:
- Chrome/Firefox/Safari...
- Internet Explorer version 10+
Be aware that a Raspberry pi receives its time from an online ntp server.
If the pi is not connected to a network, the device time will not be updated, resulting in scheduling issues.
All ports below 1024 on linux systems can only be started by root.
If you run domoticz on port 80, make sure to run it as root, e.g. : sudo ./domoticz
Compiling from source code:
------------------------------------------
Prerequisites: (or in other words, setup your compile enviroment):
All:
(Assuming domoticz development is in a subfolder of the user)
cd ~
[OpenZWave support]
If you need support for Open-ZWave (for example if you want to use an Aeon USB V2 zwave adapter),
you need to compile open zwave
- Compile OpenZWave (http://code.google.com/p/open-zwave/)
(On non-darwin install libudev-dev (sudo apt-get install libudev-dev)
svn co http://open-zwave.googlecode.com/svn/trunk/ open-zwave-read-only
cd open-zwave-read-only
|* Darwin (Mac)
|There is a problem in the MakeFile, change the DEBUG/RELEASE defines with:
|DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-inline -Werror -Wno-self-assign -Wno-unused-private-field -Wno-format -g -DDEBUG -DLOG_STDERR -fPIC
|RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Werror -Wno-self-assign -Wno-unused-private-field -Wno-format -O3 -DNDEBUG -fPIC
|
|Also you need to add the following at the top of the files ../../src/platform/unix/LogImpl.cpp and ../../src/platform/unix/SerialControllerImpl.cpp
|
|#include <pthread.h>
|
make
[Windows]
- VS2010 (headers can be modified to support a less version)
- boost libraries, you probably have to set the correct include/lib folder in the project properties as i did not bootstrap mine
------------------------------------------------------------------------------------------------
[Ubuntu / Raspberry Pi (wheezy)]
sudo apt-get install build-essential -y
sudo apt-get install cmake libboost-dev libboost-thread-dev libboost-system-dev libsqlite3-dev subversion curl libcurl4-openssl-dev libusb-dev libudev-dev zlib1g-dev
Raspberry Pi (wheezy, 22 November 2012): (First time compile time: 25 minutes)
At this moment (First generation RPi (128MB) (And possible the last generation too), there is a issue with the FTDI drivers (USB).
A quick fix it to add the following in front of /boot/cmdline.txt
dwc_otg.speed=1
This will cause the USB to switch back to version 1.1, but also the network speed is reduced a lot! (not that i want to use 80mbps)
When using the Arch Linux image, it looks like you do not have to apply the above fix.
------------------------------------------------------------------------------------------------
[Raspberry Pi (Arch Linux)]
sudo pacman -S gcc cmake subversion boost sqlite make curl libusb libudev-dev
------------------------------------------------------------------------------------------------
[Debian (Mac OS)]
Mac OS Installation:
Prerequistics:
- XCode with Command Line Tools
- macports
sudo port install cmake
sudo port install boost
sudo port install libusb
sudo port install libusb-compat
sudo port install libudev-dev
sudo port install zlib1g-dev
------------------------------------------------------------------------------------------------
[Synology: (Initial setup time is 30 minutes, DSM 4.2+/tested with 212+)]
- Make sure the device is bootstrapped (http://www.robvanhamersveld.nl/2013/02/21/ipkg-bootstrap-installer-for-synology-ds/), then:
ipkg update
ipkg upgrade
ipkg install gcc
ipkg install make
ipkg install optware-devel (dont worry about the wget-ssl error)
ipkg install boost-dev
ipkg install boost-thread
ipkg install boost-system
ipkg install boost-date-time
ipkg install libcurl-dev
ipkg install libusb
ipkg install zlib1g-dev
download/install cmake (take a coffee while doing the bootstrap and make commands)
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
tar xvf cmake-2.8.12.1.tar.gz
cd cmake-2.8.12.1
./bootstrap
make
make install
cd ..
rm -R cmake-2.8.12.1
rm cmake-2.8.12.1.tar.gz
fix known pthread problem:
1) backup the pthread libraries found in /opt/arm-none-linux-gnueabi/lib/ :
mkdir /opt/arm-none-linux-gnueabi/lib_disabled
mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled
2) Copy the pthread libraries found in /opt/lib
cp /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/
cd /opt/arm-none-linux-gnueabi/lib/
ln -s libpthread.so.0 libpthread.so
ln -s libpthread.so.0 libpthread-2.5.so
3)
cp /opt/lib/libboost_* /lib
verify http://forum.synology.com/enu/viewtopic.php?p=185512#p185512
to check your /root/.profile
4)
install the FTDI and usb drivers. For a tutorial on a DS212+ see:
http://sirloon.net/installing-usb-serial-modules-on-nas-synology-ds212
basic installation:
insmod usbserial.kp
insmod ftdi_sio.ko
mknod /dev/usb/ttyUSB0 c 188 0
Plugin your RFXtrx transceiver, and verify the USB device is found with:
dmesg
you should see it found the device and assigned a usb device (in my case ttyUSB0, and it gets linked to /dev/usb/ttyUSB0)
goto the root folder again for the next steps
cd /root
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Getting the source code:
svn checkout svn://svn.code.sf.net/p/domoticz/code/domoticz
cd domoticz
cmake CMakeLists.txt
make
now you should have the binary application, you can start it with
./domoticz
For additional parameters type:
./domoticz -h
Note: Compiling on the Raspberry Pi will take about 15 minutes
To Update to a newer version:
- stop the application (control-c), or stop the startup script (see below) with /etc/init.d/domoticz.sh stop
(from the domoticz folder)
svn update
cmake CMakeLists.txt
make
Unix startup script:
To start Domoticz automatically when the system starts perform the following steps:
sudo cp domoticz.sh /etc/init.d
sudo chmod +x /etc/init.d/domoticz.sh
sudo update-rc.d domoticz.sh defaults
Edit the startup script and point the DEAMON location to point to the installation folder:
sudo vi /etc/init.d/domoticz.sh
DAEMON=/home/pi/domoticz/domoticz
If you want to use another web interface port change:
OPTIONS="-www 8080"
You can now start domoticz with:
sudo /etc/init.d/domoticz.sh start
To stop:
sudo /etc/init.d/domoticz.sh stop
To check if domoticz is running:
sudo /etc/init.d/domoticz.sh status
If your system supports it you can also do
sudo service domoticz.sh start
sudo service domoticz.sh stop
sudo service domoticz.sh status
To update when you have installed it as startup service:
cd /home/pi/domoticz (or where you installed domoticz)
sudo service domoticz.sh stop
svn update
make
sudo service domoticz.sh start
Option: Create an update and backup script
chmod +x updatedomo
To update domoticz
login to your Raspberry Pi
cd domoticz
./updatedomo