-
-
Save dale3h/340c49ab8295876db2db73c40f99ae93 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
########################################################### | |
########################################################### | |
## ## | |
## THIS SCRIPT SHOULD ONLY BE RUN ON A RASPBERRY PI 3 B+ ## | |
## ## | |
########################################################### | |
########################################################### | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root." | |
echo "Please try again with:" | |
echo " sudo $0" | |
exit 1 | |
fi | |
requirements=("socat" "jq" "curl" "avahi-daemon" "dbus-daemon") | |
missing= | |
for cmd in ${requirements[@]}; do | |
package="$cmd" | |
[[ "$cmd" == "dbus-daemon" ]] && package="dbus" | |
[[ $(command -v "$cmd") ]] || missing="$missing$package " | |
done | |
if [[ -n "$missing" ]]; then | |
echo "Attempting install of: $missing" | |
apt-get update | |
apt-get install -y $missing | |
fi | |
if [[ ! $(command -v docker) ]]; then | |
curl -sSL https://get.docker.com | sh | |
fi | |
requirements=("docker" "bash" "socat" "jq" "curl" "avahi-daemon" "dbus-daemon") | |
missing= | |
echo "Checking for all requirements..." | |
for cmd in ${requirements[@]}; do | |
package="$cmd" | |
[[ "$cmd" == "dbus-daemon" ]] && package="dbus" | |
[[ $(command -v "$cmd") ]] || missing="$missing$package " | |
done | |
if [[ -n "$missing" ]]; then | |
echo "Could not install requirements: $missing" | |
echo "Please install manually and run this script again." | |
exit 1 | |
else | |
echo "All requirements found!" | |
fi | |
echo "Installing Hass.io..." | |
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m raspberrypi3 | |
echo | |
echo "Done." |
Error message:
main: line 40: /etc/hostname: Permission denied,
sed: -e Expression #1, char8 unknown Option to 's'.
Run on naked Raspbian Stretch Light with 'root'
@ergo4444 I ran into this same issue. How I resolved it was:
curl the installer and save it to a file
modify the file and comment out the "update_hostname" function and comment out where it is called on line 89
sudo nano /etc/hostname - set it to hassio
sudo nano /etc/hosts - update raspberrypi to hassio
/sbin/shutdown -r now
On startup your device should now be "hassio", and you should be able to run the script you saved in the beginning without any issue.
@dale3h I'm running ok now, but I'm getting tons of these messages on startup and also cannot connect to Home Assistant Cloud (Unable to reach the Home Assistant cloud.)
018-05-25 10:10:18 ERROR (MainThread) [homeassistant.components.sensor.yr] Retrying in 17 minutes: Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:True [Try again]
2018-05-25 10:10:23 ERROR (MainThread) [homeassistant.components.cloud] Error fetching Cognito keyset: Cannot connect to host cognito-idp.us-east-1.amazonaws.com:443 ssl:True [Try again]
2018-05-25 10:10:34 ERROR (MainThread) [homeassistant.components.cloud] Error fetching Cognito keyset: Cannot connect to host cognito-idp.us-east-1.amazonaws.com:443 ssl:True [Try again]
2018-05-25 10:10:45 ERROR (MainThread) [homeassistant.components.cloud] Error fetching Cognito keyset: Cannot connect to host cognito-idp.us-east-1.amazonaws.com:443 ssl:True [Try again]
2018-05-25 10:10:56 ERROR (MainThread) [homeassistant.components.cloud] Error fetching Cognito keyset: Cannot connect to host cognito-idp.us-east-1.amazonaws.com:443 ssl:True [Try again]
2018-05-25 10:11:07 ERROR (MainThread) [homeassistant.components.cloud] Error fetching Cognito keyset: Cannot connect to host cognito-idp.us-east-1.amazonaws.com:443 ssl:True [Try again]
2018-05-25 10:11:18 ERROR (MainThread) [homeassistant.components.cloud] Error fetching Cognito keyset: Cannot connect to host cognito-idp.us-east-1.amazonaws.com:443 ssl:True [Try again]
2018-05-25 10:11:29 ERROR (MainThread) [homeassistant.components.cloud] Error fetching Cognito keyset: Cannot connect to host cognito-idp.us-east-1.amazonaws.com:443 ssl:True [Try again]
@dale3h Ignore that last... site was being blocked @ work.. works fine at home now! Any word on Bluetooth for 3 B+?
sorry but im new at this how do install this? thanks
Thanks for the script.
I have successfully installed hass.io on my raspberry pi 3B+
But now I cannot access my hass.io remotely (duckdns + letsencrypt)
Can anyone point me to a right direction?
thanks
bwid
I have managed to get the install done like you. I also run into issues with the whole duckdns and lets encrypt issue. This is my third time of flashing from the start. I don't have any logs to show or any real idea on the intricacies of linux sorry. I'm learning.
I get the problem each time I do the router port forwarding with duckdns enabled, lets encrypt enabled (key files in right ssl folder) and trying to use owntracks.
Each time I get a crash when I do my last edit on the config.yaml file to reflect the mqtt setup.
If I find an answer I'll try and explain how i did it
Van anybody explain how to install this?
Thnx for the script. It worked super. But i have a little question. What user is running hassio once the script is installed?
greetings justin
Hey!
Tried the script and it installed fine, but the issue I get is that, after preparing the HASSio installation for 25 mins, it times out whenever I go to the IP address:8123. The Pi is on WiFi, and I have no access to an Ethernet plug. What can I try to fix that?
Thnx for the script. It worked super. But i have a little question. What user is running hassio once the script is installed?
greetings justin
systemctl start hassio-supervisor.service
can anyone help me?
getting this
Installing Hass.io...
bash: line 1: 404:: command not found
Done.
can anyone help me?
getting this
Installing Hass.io...
bash: line 1: 404:: command not foundDone.
the install script is deprecated.
needs to be replaced with this:
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m raspberrypi3
I tried the script and worked like a charm! Thanks!