217 lines
6.9 KiB
Markdown
217 lines
6.9 KiB
Markdown
---
|
|
assigned: ''
|
|
created: 2024-01-06T01:25:36.065Z
|
|
progress: 0
|
|
tags:
|
|
- Duck
|
|
type: note
|
|
updated: 2024-11-05T00:05:31.000Z
|
|
---
|
|
|
|
# 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
|
|
|
|
```conf
|
|
192.168.0.11 adguard.phares.duckdns.org # 3002
|
|
192.168.0.11 baikal.phares.duckdns.org # 8013
|
|
192.168.0.11 free.file.sync.root # 22
|
|
192.168.0.11 gitea.phares.duckdns.org # 3000
|
|
192.168.0.11 immich.phares.duckdns.org # 8181
|
|
192.168.0.11 quartz.phares.duckdns.org # /
|
|
192.168.0.11 slideshow.phares.duckdns.org # /
|
|
192.168.0.11 vaultwarden.phares.duckdns.org # 3000
|
|
192.168.0.21 free.file.sync.k0308 # 22
|
|
192.168.0.31 adguard.affirm.duckdns.org # 3002
|
|
192.168.0.31 chat.affirm.duckdns.org # 5001
|
|
192.168.0.31 cockpit.affirm.duckdns.org # 9090
|
|
192.168.0.31 diskstation.affirm.duckdns.org # 5001
|
|
192.168.0.31 drive.affirm.duckdns.org # 5001
|
|
192.168.0.31 free.file.sync.media # 22
|
|
192.168.0.31 free.file.sync.media # 22
|
|
192.168.0.31 kuma.affirm.duckdns.org # 3001
|
|
192.168.0.31 phots.affirm.duckdns.org # 5001
|
|
192.168.0.31 pve.affirm.duckdns.org # 8006
|
|
192.168.0.31 quartz.affirm.duckdns.org # /
|
|
192.168.0.42 free.file.sync.room # 22
|
|
192.168.43.21 adguard.bchs.duckdns.org # 45158
|
|
192.168.43.21 baikal.bchs.duckdns.org # 8013
|
|
192.168.43.21 filebrowser.bchs.duckdns.org
|
|
192.168.43.21 firefly.bchs.duckdns.org
|
|
192.168.43.21 free.file.sync.loft # 22
|
|
192.168.43.21 glances.bchs.duckdns.org # 8086
|
|
192.168.43.21 grocy.bchs.duckdns.org
|
|
192.168.43.21 ha.bchs.duckdns.org # 8124
|
|
192.168.43.21 immich.bchs.duckdns.org # 8181
|
|
192.168.43.21 kuma.bchs.duckdns.org # 3001
|
|
192.168.43.21 nextcloud.bchs.duckdns.org
|
|
192.168.43.21 nginx.bchs.duckdns.org # 81
|
|
192.168.43.21 papermerge.bchs.duckdns.org # 8000
|
|
192.168.43.21 photoprism.bchs.duckdns.org # 2342
|
|
192.168.43.21 piwigo.bchs.duckdns.org
|
|
192.168.43.21 plex.bchs.duckdns.org
|
|
192.168.43.21 postgres.bchs.duckdns.org # 5432
|
|
192.168.43.21 traccar.bchs.duckdns.org # 8082
|
|
```
|
|
|
|
```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/
|
|
```
|