Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Razberry install script. (#57)
Browse files Browse the repository at this point in the history
* Add additional db install scripts

* Add documentation for db install scripts

* Add install script for Razberry

* Add docs for install script for Razberry

* Update README.md
  • Loading branch information
Landrash authored Oct 8, 2017
1 parent b7d694f commit 0a199bd
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 18 deletions.
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ No database or database user is created during this setup and will need to be cr

This script was originally contributed by [@Landrash](https://github.com/landrash).

#### Install MySQL *(install_mysql.sh)*
This script installs MySQL and it's dependencies for use with the [recorder](https://home-assistant.io/components/recorder/) component in Home Assistant.
No database or database user is created during this setup and will need to be created manually.

##### Example for creating database
```$ sudo mysql -u root -p```
```$ CREATE DATABASE homeassistant;```
```$ CREATE USER 'homeassistantuser' IDENTIFIED BY 'password';```
```$ GRANT ALL PRIVILEGES ON homeassistant.* TO 'homeassistantuser';```
```$ FLUSH PRIVILEGES;```
```$ exit ```

This script was originally contributed by [@Landrash](https://github.com/landrash).

#### Install PostgreSQL *(install_postgresql.sh)*
This script installs PostgreSQL and it's dependencies for use with the [recorder](https://home-assistant.io/components/recorder/) component in Home Assistant.
No database or database user is created during this setup and will need to be created manually.
Expand Down Expand Up @@ -156,6 +142,16 @@ panel_iframe:
```
This script was originally contributed by [@Ludeeus](https://github.com/Ludeeus).
### Install RaZberry *(install_razberry.sh)*
This script disables Bluetooth for the use of a RaZberry with Hassbian.
Code is adapted from the Razberry install script found at http://razberry.z-wave.me/install.
This will disable the use of Bluetooth and Bluetooth Low Energy devices.
```
sudo hassbian-config install razberry
```
This script was originally contributed by [@Landrash](https://github.com/Landrash).


## Upgrade script components

### Upgrade your Home Assistant installation *(uppgrade_home-assistant.sh)*
Expand Down
8 changes: 4 additions & 4 deletions package/opt/hassbian/suites/install_hue.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash

function hue-show-short-info {
echo "Echo/Home/Mycroft Emulated Hue install script for Hassbian."
echo "Echo/Home/Mycroft Emulated Hue install script for Hassbian."
}

function hue-show-long-info {
echo "Configures the Python executable to allow usage of low numbered"
echo "ports for use with Amazon Echo, Google Home and Mycroft.ai."
echo "Configures the Python executable to allow usage of low numbered"
echo "ports for use with Amazon Echo, Google Home and Mycroft.ai."
}

function hue-show-copyright-info {
echo "Copyright(c) 2017 Fredrik Lindqvist <https://github.com/Landrash>"
echo "Copyright(c) 2017 Fredrik Lindqvist <https://github.com/Landrash>"
}

function hue-install-package {
Expand Down
45 changes: 45 additions & 0 deletions package/opt/hassbian/suites/install_razberry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

function razberry-show-short-info {
echo "Disables Bluetooth for the use of a RaZberry with Hassbian."
}

function razberry-show-long-info {
echo "Disables Bluetooth for the use of a RaZberry with Hassbian."
echo "This will disable the use of Bluetooth and BLE devices."
echo " "
echo "Original script from http://razberry.z-wave.me/install"
}

function razberry-show-copyright-info {
echo "Original script from http://razberry.z-wave.me/install"
}

function razberry-install-package {
razberry-show-short-info
razberry-show-copyright-info

echo "Checking for version of Raspberry Pi"
RPI_BOARD_REVISION=`grep Revision /proc/cpuinfo | cut -d: -f2 | tr -d " "`
if [[ $RPI_BOARD_REVISION == "a02082" || $RPI_BOARD_REVISION == "a22082" ]]
then
echo "Raspberry Pi 3 Detected. Disabling Bluetooth"
systemctl disable hciuart
if [[ ! `grep "dtoverlay=pi3-miniuart-bt" /boot/config.txt` ]]
then
echo "Adding 'dtoverlay=pi3-miniuart-bt' to /boot/config.txt"
echo "dtoverlay=pi3-miniuart-bt" >> /boot/config.txt
fi
fi

echo
echo "Installation done."
echo
echo "To continue have a look at https://home-assistant.io/components/emulated_hue/"
echo
echo "If you have issues with this script, please say something in the #Hassbian channel on Discord."
echo
return 0
}

[[ $_ == $0 ]] && echo "hassbian-config helper script; do not run directly, use hassbian-config install instead"

0 comments on commit 0a199bd

Please sign in to comment.