These instructions assume that you know how to install and navigate your OS on your device.
Install Debian 11 Bullseye 31 for the desktop PC or other variations depending on your hardware.
Initial setup of Debian 11 is easier with monitor keyboard and mouse hooked up local to your device.
Enable SSH in configuration, once you have enabled SSH then remote configuring is preferred for below instructions.
You can copy and paste below commands into the terminal, these
instructions assume you have knowledge on the ability to SSH into your
device.
Copy and paste is the easiest, and PuTTY 5 allows right click paste.
These steps use the default install instructions of home assistant and
the default user of MYUserName
, so if using different then what is default make changes as needed.
Debian 11 netinstall!
https://ftp.thm.de/debian-cd/debian-11.7.0-amd64-netinst.iso
(Note some stuff will not work fully until all the steps have been done IE shared folders won’t connect until that directory is made.)
This instruction will do the following:
-
Will allow network shares of certain folders for editing and backing up your configuration of Home assistant files and access to root directory.
((WARNING MESSING AROUND IN ROOT DIR CAN BREAK YOUR INSTALL)) -
Installs and enables sudo to use instead of Root for install.
-
Will allow Home assistant to restart after a reboot.
"DO NOT COPY AND PASTE STUFF IN QUOTES"
"LOG INTO THE TERMINAL
Log into your Terminal under the user name you select during install IE user “MYUserName”
su root
it will ask you for your password
cd
apt-get install sudo -y
Add the user name you chose replace the “MYUserName” with your user name if desired
sudo adduser MYUserName
sudo usermod -aG sudo MYUserName
id
MYUserName
You should see that the user user1 belongs to two groups: MYUserName
and sudo.
uid=1000(MYUserName
) gid=1000(MYUserName
) groups=1000(MYUserName
),27(sudo)
The next Step will determine if you did the sudo proper as it will not work if you don’t have sudo.
“STEPS BELOW INSTALLS HOME ASSISTANT.”
su
MYUserName
cd
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get autoremove -y
It may ask you for your password.
sudo apt-get install -y python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata
sudo useradd -rm homeassistant -G dialout
sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistant
sudo -u homeassistant -H -s
cd
mkdir .
homeassistant
cd /srv/homeassistant
version=3
python$version -m venv .
source bin/activate
python3 -m pip install wheel
pip install sqlalchemy
pip install fnvhash
pip3 install homeassistant
exit
cd
“STEPS BELOW ALLOWS SHARING OF FOLDERS OVER YOUR LOCAL NETWORK.”
sudo apt install samba -y
sudo nano /etc/samba/smb.conf
“CLEAR SCREEN BY HOLDING DOWN THE CTRL AND K KEYS.”
“COPY ALL BELOW THIS LINE DOWN TO NOT INCLUDING END.”
[global]
netbios name = HomeAssistant
server string = The HA File Center
workgroup = WORKGROUP
hosts allow =
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
remote announce =
remote browse sync =
[HOME MYUserName]
path = /home/MYUserName
comment = No comment
browsable = yes
read only = no
valid users =
writable = yes
guest ok = yes
public = yes
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =
[HOME ASSISTANT]
path = /home/homeassistant/.homeassistant/
comment = No comment
browsable = yes
read only = no
valid users =
writable = yes
guest ok = yes
public = yes
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =
[ROOT]
path = /
comment = No comment
browsable = yes
read only = no
valid users =
writable = yes
guest ok = yes
public = yes
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =
“END”
“PRESS CRTL+O (write out), ENTER, CTRL+X (exit).”
sudo smbpasswd -a
MYUserName
“ENTER THE PASSWORD IT WILL ASK TWICE.”
sudo service smbd restart
cd
sudo apt-get install bluetooth bluez blueman -y
“STEPS BELOW MAKES HOME ASSISTANT START ON REBOOT.”
sudo nano -w /etc/systemd/system/home-assistant@homeassistant.service
“COPY ALL BELOW THIS LINE DOWN TO NOT INCLUDING END.”
[Unit]
Description=Home Assistant
After=network-online.target
[Service]
Type=simple
ExecStartPre=/bin/sleep 10
User=%i
WorkingDirectory=/home/%i/.homeassistant
ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"
[Install]
WantedBy=multi-user.target
“END”
“PRESS CRTL+O (write out), ENTER, CTRL+X (exit).”
sudo systemctl --system daemon-reload
sudo systemctl enable home-assistant@homeassistant
sudo apt install xdotool unclutter sed -y
sudo apt install libbluetooth-dev
sudo pip3 install PyBluez
-----------------------------------------------------------------------------------------------------------
EXTRA Material
-----------------------------------------------------------------------------------------------------------
“MANUALLY START HOME ASSISTANT”
sudo -u homeassistant -H -s
cd /srv/homeassistant
version=3
python$version -m venv .
source bin/activate
hass
“GIVE IT ABOUT 10 MINS AND REBOOT THE SYSTEM.”
Copy
“STEP BELOW ALLOWS THE USE OF REMOTE DESKTOP THIS IS A OPTIONAL INSTALL”
“it has issues with the Gnome interface so unless you want to really fuss with it I would skip it”
sudo apt install xrdp -y
-----------------------------------------------------------------------------------------------------------
Not work need create my version for help my friends
Respect original Owner instruction
Comentarios
Publicar un comentario