forked from nicholaswilde/berryio-smartthings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
executable file
·126 lines (98 loc) · 5.75 KB
/
INSTALL
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
// ------------------------- PROJECT INFORMATION -------------------------
Further details about BerryIO are available on the project website here:
https://github.com/nicholaswilde/berryio-smartthings
// ------------------------ SECURITY INFORMATION -------------------------
BerryIO is not designed to be accessed over the internet or an insecure
environment. Although it is password protected it is not encrypted so a
malicious attacker could snoop on your password. If you wish to access
BerryIO over the internet you should at the very least encrypt the web
interface with SSL/https security which you can do by changing the
configuration in the file /etc/apache2/sites-available/berryio. Please
consult the Apache manual for more details:
http://httpd.apache.org/docs/
// -------------------- PRE-INSTALLATION INFORMATION ---------------------
Although we recommend you install BerryIO on a fresh Raspbian install
you can also add it to an existing setup. If your existing setup is
prior to the 2012-09-18-wheezy-raspbian release and you wish to have your
Pi automatically connect and email when networks become available then
you will either need to install a network manager or follow these
instructions to install wpagui which is now shipped as standard with
Raspbian.
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=17788&p=176847
As with any changes we recommend you backup your SD card before
installing BerryIO just in case there are any conflicts.
You may also need to be aware that the following packages are installed...
MSMTP:
msmtp is a simple mail transfer agent used by BerryIO to send emails. You
can use your own MTA such as sendmail if you wish you just need to remove
msmtp from the list of installed prerequisite packages by editing the
install.sh file. Once you have done this and installed the BerryIO you
must then delete the PHP configuration file /etc/php5/conf.d/msmtp.ini
so PHP no longer uses msmtp by default.
Apache2:
If you already have Apache installed and are running another website this
is not a problem as BerryIO can happily co-exist with other Apache sites.
Simply follow the installation instructions below then edit the BerryIO
Apache configuration /etc/apache2/sites-available/berryio so the BerryIO
interface doesn't conflict with your other site by changing the port
from port 80 to port 81 for example. You will also need to tell Apache
you are using port 81 for the website by editing the ports config file
/etc/apache2/ports.conf and adding "NameVirtualHost *:81" underneath
where it says "NameVirtualHost *:80" and adding "Listen 81" underneath
where it says "Listen 80". Once you have done that and restarted
Apache you may wish to renable the default site using "sudo a2ensite
default" if your current site is using the default apache config file.
You will then be able to access BerryIO by adding :81 to the end
of the web link if its not there already.
Other Web Interfaces which don't use Apache:
If you are using any other web interfaces which use the default web port
80 such as the AdaFruit WebIDE, you can either change the port on the
other web interface or if you prefer you can move BerryIO to another
port such as port 81. This is a similar proecdure to above, IE edit the
BerryIO Apache configuration /etc/apache2/sites-available/berryio and
change the port from port 80 to 81 for example. You will also need to
tell Apache to use port 81 instead of port 80 by editing the ports config
file /etc/apache2/ports.conf and changing "NameVirtualHost *:80" to
"NameVirtualHost *:81" and changing "Listen 80" to "Listen 81". Once you
have done that and restarted the conflict should be resolved and you
should be able to access BerryIO by adding :81 to the end of the web link
if its not there already.
// ---------------------------- WIRING AN LCD ----------------------------
Please refer to the config file /etc/berryio/lcd.php for instructions on
wiring a HDD44780 or KS0066U compatible LCD display. This included options
for changing which GPIO ports you wish to connect the display to.
// ------------------------ CONFIGURING NETWORKS -------------------------
Until the BerryIO WiFi configuration interface is complete you should
configure your networks using the Raspbian "WiFi Config" GUI utility in
the normal way.
// -------------------- INSTALLATION INSTRUCTIONS ------------------------
BerryIO is now on the project hosting and collaboration service GitHub.
You do not need to download anything prior to following these instructions.
Simply make sure you have an Internet connection on your Raspberry Pi and
enter the commands below.
// Make sure your Raspbian install is up to date with apt-get (as below)
// (Please do not use rpi-update as this will migrate your Pi to the dev
// firmware which we do not support)
sudo apt-get update
sudo apt-get upgrade
// Download and run the latest setup script
wget -N https://raw.github.com/nicholaswilde/berryio-smartthings/master/scripts/berryio_install.sh
chmod +x berryio_install.sh
sudo ./berryio_install.sh
// Configure msmtp so it can access your mailserver
// Please check http://msmtp.sourceforge.net/documentation.html
// for further details
sudo nano /etc/msmtprc
// Test BerryIO is working
berryio help
// Test email is working
sudo berryio email_ip
// If all went well you should now be able to log into your Pi using
// the web interface and the standard username and password you use
// at the terminal
// SmartThings
// Download the device type script
https://github.com/nicholaswilde/SmartThingsPublic/blob/master/devicetypes/nicholaswilde/raspberry-pi.src/raspberry-pi.groovy
// Add the script to SmartThings Device-Type and add a new device using these instructions listed under the
// Rasberry Pi SmartThings Device Type Installation Instructions.
https://github.com/nicholaswilde/berryio-smartthings/wiki/Installation