move to project lifecycle structure

This commit is contained in:
2024-07-21 02:20:48 -04:00
parent fd1fde499d
commit e6aff894e8
121 changed files with 6234 additions and 196 deletions

View File

@@ -0,0 +1,39 @@
# Home Assistant
- [Home Assistant](#home-assistant)
- [Setup and Configuration](#setup-and-configuration)
- [Door Lock](#door-lock)
- [Philips Hue Lights](#philips-hue-lights)
- [Shelly](#shelly)
## Setup and Configuration
### Door Lock
1. Install Z-wave
2. Install z-wave JS module
3. Add device -> How do you want to add your device -> Legacy Secure
4. Enter programming pin on lock -> 0
### Philips Hue Lights
1. I configure all philips hue lights through zigbee directly connected to HA
hue lights support color_temp in mireds, here are some mired-kelvin conversions:
| Kelvin | Mired |
| ------ | ----- |
| 6000 | 167 |
| 4000 | 250 |
| 2600 | 385 |
### Shelly
1. Outbound Websocket `wss://homeassistant.reeseapps.com/api/shelly/ws`
Shelly devices can act as "passive" or "active" bluetooth scanners. Both of these configurations
allow home assistant to proxy bluetooth connections through shelly devices, significantly extending
the range of your home assistant's bluetooth capabilities. Active scanning uses more power but
is quicker to pick up and transmit device information. Note that "gateway mode" is not required,
just enable bluetooth and rpc or select "active" from the configuration menu for the shelly
device.

View File

@@ -0,0 +1,96 @@
# VPN
## Raspberry Pi Setup
You'll need to configure systemd-networkd to not use ipv6 privacy extensions
/etc/systemd/network/05-end0.conf
```conf
[Match]
Name=end0
[Network]
DHCP=yes
IPv6PrivacyExtensions=false
IPv6AcceptRA=true
```
## Pihole
<https://github.com/pi-hole/pi-hole/#one-step-automated-install>
If you install pihole first pivpn will discover it automatically.
```bash
curl -sSL https://install.pi-hole.net | bash
```
## PiVPN
<https://www.pivpn.io/>
```bash
curl -L https://install.pivpn.io | bash
# PiVPN can sometimes have issues after install. Run debug to fix them:
pivpn -d
```
## Cloudflared (DOH)
<https://docs.pi-hole.net/guides/dns/cloudflared/>
```bash
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64
sudo mv -f ./cloudflared-linux-arm64 /usr/local/bin/cloudflared
sudo chmod +x /usr/local/bin/cloudflared
cloudflared -v
sudo useradd -s /usr/sbin/nologin -r -M cloudflared
sudo vim /etc/default/cloudflared
# Commandline args for cloudflared, using Cloudflare DNS
CLOUDFLARED_OPTS=--port 5053 --upstream https://1.1.1.1/dns-query --upstream https://1.0.0.1/dns-query
sudo chown cloudflared:cloudflared /etc/default/cloudflared
sudo chown cloudflared:cloudflared /usr/local/bin/cloudflared
sudo vim /etc/systemd/system/cloudflared.service
[Unit]
Description=cloudflared DNS over HTTPS proxy
After=syslog.target network-online.target
[Service]
Type=simple
User=cloudflared
EnvironmentFile=/etc/default/cloudflared
ExecStart=/usr/local/bin/cloudflared proxy-dns $CLOUDFLARED_OPTS
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
sudo systemctl enable cloudflared
sudo systemctl start cloudflared
sudo systemctl status cloudflared
dig @127.0.0.1 -p 5053 google.com
```
Finally, configure Pi-hole to use the local cloudflared service as the upstream DNS server by
specifying 127.0.0.1#5053 as the Custom DNS (IPv4)
```bash
sudo vim /etc/cron.weekly/cloudflared-updater
#!/bin/bash
cloudflared update
systemctl restart cloudflared
sudo chmod +x /etc/cron.weekly/cloudflared-updater
sudo chown root:root /etc/cron.weekly/cloudflared-updater
```

View File

@@ -0,0 +1,12 @@
# Shelly Devices
## Shelly Plug US
1. Connect to WiFi
2. Set password for AP
3. Disable AP
4. Set password for device authentication
5. Set Restore last known state of output/relay
6. Set Device Name
7. Enable Bluetooth Gateway
8. Update Firmware