Update rasppi.md

pull/32/head
Kai Kreuzer 2016-06-17 14:43:30 +02:00 committed by GitHub
parent 37e2412bfe
commit acdf1717b9
1 changed files with 48 additions and 30 deletions

View File

@ -10,7 +10,9 @@ Theres no pre-configured image for openHAB, so installation is done the old f
Start with the latest (full) Raspbian SD image (not the “lite” version, these dont include the Java Virtual Machine). Get your network cable plugged in, then boot up, and navigate through SSH. Run: Start with the latest (full) Raspbian SD image (not the “lite” version, these dont include the Java Virtual Machine). Get your network cable plugged in, then boot up, and navigate through SSH. Run:
`sudo raspi-config` ```
sudo raspi-config
```
Expand the filesystem; and from the advanced menu, change the memory split to 16. When are done, restart, and as good practice, run a full update Expand the filesystem; and from the advanced menu, change the memory split to 16. When are done, restart, and as good practice, run a full update
@ -18,58 +20,72 @@ Install openHAB on Linux, see [Installation on Linux through APT](http://docs.op
Curiously, everything was installed as owned by “root”. We need to fix that with the following commands. Curiously, everything was installed as owned by “root”. We need to fix that with the following commands.
`sudo chown -hR openhab:openhab /etc/openhab` ```
`sudo chown -hR openhab:openhab /usr/share/openhab` sudo chown -hR openhab:openhab /etc/openhab
sudo chown -hR openhab:openhab /usr/share/openhab
```
Next, well install Samba and share the configuration and user folders this will make it easier to install add-ons and change the sitemap remotely. Next, well install Samba and share the configuration and user folders this will make it easier to install add-ons and change the sitemap remotely.
`sudo apt-get install samba samba-common-bin` ```
`sudo nano /etc/samba/smb.conf` sudo apt-get install samba samba-common-bin
sudo nano /etc/samba/smb.conf
```
Change the workgroup name if needed, but otherwise enable WINS support: Change the workgroup name if needed, but otherwise enable WINS support:
`wins support = yes` ```
wins support = yes
```
(youll need to uncomment the line, and change no to yes) (youll need to uncomment the line, and change no to yes)
then add the following to the share definitions section (scroll all the way down to the bottom of the long file): then add the following to the share definitions section (scroll all the way down to the bottom of the long file):
`[openHAB Home]` ```
`comment= openHAB Home` [openHAB Home]`
`path=/usr/share/openhab` comment= openHAB Home
`browseable=Yes` path=/usr/share/openhab
`writeable=Yes` browseable=Yes
`only guest=no` writeable=Yes
`create mask=0777` only guest=no
`directory mask=0777` create mask=0777
`public=no` directory mask=0777
`[openHAB Config]` public=no
`comment= openHAB Site Config` [openHAB Config]
`path=/etc/openhab` comment= openHAB Site Config
`browseable=Yes` path=/etc/openhab
`writeable=Yes` browseable=Yes
`only guest=no` writeable=Yes
`create mask=0777` only guest=no
`directory mask=0777` create mask=0777
`public=no` directory mask=0777
public=no
```
Also commented out the Printers section. Made two shares, then the configuration files are actually stored separately to the add-ons. Also commented out the Printers section. Made two shares, then the configuration files are actually stored separately to the add-ons.
Save and exit. We finally need to set a Samba password for the openhab user: Save and exit. We finally need to set a Samba password for the openhab user:
`sudo smbpasswd -a openhab` ```
sudo smbpasswd -a openhab
```
Suggest “openhab” as the password just for ease of use, but it doesnt really matter. Suggest “openhab” as the password just for ease of use, but it doesnt really matter.
The method of restarting Samba has changed in the latest Raspian. Heres the updated instructions: The method of restarting Samba has changed in the latest Raspian. Heres the updated instructions:
`sudo update-rc.d smbd enable` ```
`sudo update-rc.d nmbd enable` sudo update-rc.d smbd enable
`sudo service smbd restart` sudo update-rc.d nmbd enable
sudo service smbd restart
```
After restarting Samba (older installs use sudo service samba restart), test you can access the shared drive. It might not be auto-discovered on a Mac; but you can use the Finder -> Go -> Connect to Server and the address After restarting Samba (older installs use sudo service samba restart), test you can access the shared drive. It might not be auto-discovered on a Mac; but you can use the Finder -> Go -> Connect to Server and the address
`smb://openhab@raspberrypi.local` ```
smb://openhab@raspberrypi.local
```
Authenticate with username openhab and the chosen password, then open up both the shares to have a look around. Then should even be able to open http://raspberrypi.local:8080/ in the web browser, but then will be met with an error because don´t havent create a sitemap yet. Thats normal. Authenticate with username openhab and the chosen password, then open up both the shares to have a look around. Then should even be able to open http://raspberrypi.local:8080/ in the web browser, but then will be met with an error because don´t havent create a sitemap yet. Thats normal.
@ -77,7 +93,9 @@ error on first launch openHAB
Now would be a good time to learn the command to tail the openHAB log so you can keep an eye on errors. Now would be a good time to learn the command to tail the openHAB log so you can keep an eye on errors.
`tail -f /var/log/openhab/openhab.log` ```
tail -f /var/log/openhab/openhab.log
```
Keep that running and open in a separate SSH window at all times. Keep that running and open in a separate SSH window at all times.