175 lines
5.2 KiB
Markdown
175 lines
5.2 KiB
Markdown
---
|
|
assigned: ''
|
|
created: 2024-01-06T01:25:36.065Z
|
|
progress: 0
|
|
tags:
|
|
- Duck
|
|
type: note
|
|
updated: 2024-11-11T19:25:37.024Z
|
|
---
|
|
|
|
# Home Assistant
|
|
|
|
- [hassio-addons](https://github.com/hassio-addons/repository/blob/master/example/config.yaml)
|
|
- [haos_generic-x86-64-12.4.img.xz](https://www.home-assistant.io/installation/generic-x86-64/)
|
|
|
|
```bash
|
|
sudo -i
|
|
python3 --version
|
|
apt install software-properties-common
|
|
add-apt-repository ppa:deadsnakes/ppa
|
|
[enter]
|
|
apt update
|
|
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 libturbojpeg0-dev tzdata ffmpeg liblapack3 liblapack-dev libatlas-base-dev
|
|
apt install python3.12 -y
|
|
ls /usr/bin/python3*
|
|
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
|
|
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 2
|
|
update-alternatives --config python3
|
|
[enter]
|
|
python3 --version
|
|
apt install libpython3.12-dev -y
|
|
apt-cache rdepends python3.12
|
|
|
|
|
|
apt install python3.12-venv -y
|
|
|
|
|
|
apt-get install libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev -y
|
|
apt install pkg-config -y
|
|
useradd -rm homeassistant
|
|
mkdir /srv/homeassistant
|
|
chown homeassistant:homeassistant /srv/homeassistant
|
|
passwd homeassistant
|
|
exit
|
|
exit
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Home-Assistant "Ubuntu\Ubuntu-Home-Assistant-003.tar"
|
|
wsl --unregister Ubuntu-Home-Assistant
|
|
wsl --import Ubuntu-Home-Assistant Ubuntu-Home-Assistant "Ubuntu\Ubuntu-Home-Assistant-003.tar"
|
|
```
|
|
|
|
```bash
|
|
sudo -u homeassistant -H -s
|
|
cd /srv/homeassistant
|
|
python3 -m venv .
|
|
source bin/activate
|
|
pip install --upgrade pip
|
|
python3 -m pip install wheel
|
|
pip3 install homeassistant
|
|
pip3 install homeassistant
|
|
pip install av
|
|
pip install ha-av
|
|
exit
|
|
exit
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Home-Assistant "Ubuntu\Ubuntu-Home-Assistant-004.tar"
|
|
wsl --unregister Ubuntu-Home-Assistant
|
|
wsl --import Ubuntu-Home-Assistant Ubuntu-Home-Assistant "Ubuntu\Ubuntu-Home-Assistant-004.tar"
|
|
```
|
|
|
|
```bash
|
|
sudo -u homeassistant -H -s
|
|
cd /srv/homeassistant
|
|
python3 -m venv .
|
|
source bin/activate
|
|
```
|
|
|
|
- [your-http-integration-is-not-set-up-for-reverse-proxies](https://community.home-assistant.io/t/your-http-integration-is-not-set-up-for-reverse-proxies/553939)
|
|
|
|
```bash
|
|
systemctl status homeassistant
|
|
nano /root/.homeassistant/configuration.yaml
|
|
systemctl restart homeassistant
|
|
```
|
|
|
|
```bash Sun Jul 28 2024 08:44:18 GMT-0700 (Mountain Standard Time)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wget -O - https://get.hacs.xyz | bash -
|
|
```
|
|
|
|
## Sub-tasks
|
|
|
|
- [x] Code Server
|
|
- [x] DuckDNS
|
|
- [x] ADGuard
|
|
- [ ] Traccar
|
|
|
|
## Manage add-on repositories
|
|
|
|
- [integrations](https://www.home-assistant.io/integrations/)
|
|
- [HA Add-ons by alexbelgium](https://github.com/alexbelgium/hassio-addons)
|
|
|
|
## Addons
|
|
|
|
```bash Sun Nov 03 2024 20:51:53 GMT-0700 (Mountain Standard Time)
|
|
cd /etc/
|
|
mkdir /etc/duckdns
|
|
cd /etc/duckdns
|
|
nano duck.sh
|
|
```
|
|
|
|
```conf Sun Nov 03 2024 20:51:53 GMT-0700 (Mountain Standard Time)
|
|
echo url="https://www.duckdns.org/update?domains=bchs&token=1d3fc707-7052-4459-a624-fb01250f00b9&verbose=true&ip=" | curl -k -o /etc/duckdns/duck.log -K -
|
|
```
|
|
|
|
```bash Sun Nov 03 2024 20:51:53 GMT-0700 (Mountain Standard Time)
|
|
chmod 700 duck.sh
|
|
./duck.sh
|
|
cat duck.log
|
|
```
|
|
|
|
```bash Sun Nov 03 2024 20:51:53 GMT-0700 (Mountain Standard Time)
|
|
apk add openssl
|
|
apk add socat
|
|
# https://www.snbforums.com/threads/duckdns-with-letsencrypt.86114/
|
|
curl https://get.acme.sh | sh -s email=mikepharesjr@msn.com
|
|
cd /root/.acme.sh
|
|
export DuckDNS_Token=1d3fc707-7052-4459-a624-fb01250f00b9
|
|
echo $DuckDNS_Token
|
|
./acme.sh --register-account -m mikepharesjr@msn.com
|
|
./acme.sh --set-default-ca --server letsencrypt
|
|
# ./acme.sh --issue --dns dns_duckdns -d '*.phares.duckdns.org' --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
./acme.sh --issue --dns dns_duckdns -d bchs.duckdns.org --debug --home /root/.acme.sh --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
./acme.sh --issue --dns dns_duckdns -d '*.bchs.duckdns.org' --debug --home /root/.acme.sh --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
host -t txt bchs.duckdns.org
|
|
dig bchs.duckdns.org TXT
|
|
```
|
|
|
|
```bash Sun Nov 03 2024 20:51:53 GMT-0700 (Mountain Standard Time)
|
|
crontab -e
|
|
```
|
|
|
|
```conf Sun Nov 03 2024 20:51:53 GMT-0700 (Mountain Standard Time)
|
|
11 13 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
|
|
```
|
|
|
|
```bash
|
|
echo url="https://www.duckdns.org/update?domains=bchs&token=1d3fc707-7052-4459-a624-fb01250f00b9&txt={YOURVALUE}[&verbose=true][&clear=true]" | curl -k -o /etc/duckdns/duck.log -K -
|
|
mkdir -p /var/www/certbot/.well-known/acme-challenge/smwqgmeNx04tA3HC05I8_gtpqLTkjRAotHdfp0E5LnM
|
|
curl --slient --dump-header /root/.acme.sh/http.header -L --trace-ascii /tmp/tmp.iFkIEL -g
|
|
```
|
|
|
|
```bash
|
|
cd /tmp
|
|
git clone https://github.com/acmesh-official/acme.sh.git
|
|
cd /tmp/acme.sh
|
|
./acme.sh --install -m mikepharesjr@msn.com
|
|
export DuckDNS_Token=1d3fc707-7052-4459-a624-fb01250f00b9
|
|
echo $DuckDNS_Token
|
|
./acme.sh --register-account -m mikepharesjr@msn.com
|
|
./acme.sh --set-default-ca --server letsencrypt
|
|
./acme.sh --issue --dns dns_duckdns -d '*.bchs.duckdns.org' --debug --home /root/.acme.sh --dnssleep 120 --days 90 --ecc --server https://acme-v02.api.letsencrypt.org/directory
|
|
# https://intodns.com/
|
|
```
|