Håvard O. Nordstrand 5 anni fa
parent
commit
5d1e2f29f3

+ 1 - 32
config/linux-server/applications.md

@@ -176,38 +176,7 @@ This setup requires pubkey plus MFA (if configured) plus password.
 
 ## Home Assistant
 
-**TODO** Non-core setup. Core is uselesss.
-
-### Core Setup
-
-- See [Installation on Docker (Home Assistant)](https://www.home-assistant.io/docs/installation/docker/).
-- Use [secrets](https://www.home-assistant.io/docs/configuration/secrets/) to store keys in the YAML configuration files.
-
-### Telldus Live Integration
-
-**TODO** Fix. Maybe use the TellStick add-on.
-
-See [Telldus Live (Home Assistant)](https://www.home-assistant.io/integrations/tellduslive/).
-
-These instructions use the local API, which is superior to the cloud API for devices that support it. TellStick Net v2 and ZNet lite v1/v2 (and possibly more) support the local API.
-
-1. Make sure the device has a static IP address (use DHCP reservations).
-1. Set up the device with Telldus Live.
-    - The website is absolutely terrible, use the app when possible.
-1. Add the configuration snippet below to `configuration.yml` containing the IPv4 address of the device.
-    - This is required for using the local API.
-    - While it does request an IPv6 address, its services don't seem to listen to IPv6.
-1. Restart Home Assistant.
-1. Open Home Assistant and open the page to add integrations. "Telldus Live" should appear as discovered.
-1. Configure the discovered integration using the Telldus device, not the cloud API.
-    - If it fails and the discovered integration disappears, then restart Home Assistant again.
-    - It will take you to both Telldus Live and the device to authenticate the integration.
-
-```yaml
-# ...
-tellduslive:
-    host: <ipv4-or-hostname>
-```
+See [Home Assistant](../home-assistant/).
 
 ## ISC DHCP Server
 

+ 59 - 0
config/linux-server/home-assistant.md

@@ -0,0 +1,59 @@
+---
+title: Home Assistant
+breadcrumbs:
+- title: Configuration
+- title: Linux Servers
+---
+{% include header.md %}
+
+## Installation (Proxmox)
+
+These steps are for installing the Home Assistant image in Proxmox. There is also a "Core" variant which can be installed as a Docker image, but don't doesn't include the add-on store.
+
+1. Create the VM in Proxmox:
+    - It must use OVMF (UEFI).
+    - The main hard drive doesn't matter, it will be removed later.
+    - Enable QEMU agent.
+1. Download the VMDK image from [Installing Home Assistant](https://www.home-assistant.io/hassio/installation/) to the Proxmox host.
+1. Import the image to the VM: `qm importdisk <vmid> hassos.vmdk <storage> -format <qcow2|raw>`
+1. Detach and remove the existing main disk for the VM.
+1. Attach the newly imported disk for the VM (by double clicking it).
+1. Start the VM and make sure it boots properly.
+1. Open the web wizard to configure it.
+    - It uses port 8123.
+    - To find its IP address, log in from console (see below) and run `ipconfig`. It only listens on IPv4.
+1. (Optional) Setup DHCP reservations to make its IP addresses static.
+1. (Optional) If you need to configure something from console, log in as root with no password.
+    - Type `login` to open a shell.
+1. (Optional) Install some useful add-ons:
+    - "File editor"
+
+## Integrations and Add-Ons
+
+### Telldus Live Integration
+
+**TODO** Make this work.
+
+See [Telldus Live (Home Assistant)](https://www.home-assistant.io/integrations/tellduslive/).
+
+These instructions use the local API (supported by TellStick Net v2, ZNet Lite v1/v2 and possibly more) insetad of the cloud API for devices that support it. This does not require the [TellStick add-on](https://www.home-assistant.io/integrations/tellstick/).
+
+1. Make sure the device has a static IP address (use DHCP reservations).
+1. Set up the device with Telldus Live.
+    - The website is absolutely terrible, use the app when possible.
+1. Add the configuration snippet below to `configuration.yml` containing the IPv4 address of the device.
+    - This is required for using the local API.
+    - While it does request an IPv6 address, its services don't seem to listen to IPv6.
+1. Restart Home Assistant.
+1. Open Home Assistant and open the page to add integrations. "Telldus Live" should appear as discovered.
+1. Configure the discovered integration using the Telldus device, not the cloud API.
+    - If it fails and the discovered integration disappears, then restart Home Assistant again.
+    - It will take you to both Telldus Live and the device to authenticate the integration.
+
+```yaml
+# ...
+tellduslive:
+    host: <ipv4-or-hostname>
+```
+
+{% include footer.md %}

+ 44 - 0
config/linux-server/unifi.md

@@ -0,0 +1,44 @@
+---
+title: Ubiquiti UniFi Controller (Debian)
+breadcrumbs:
+- title: Configuration
+- title: Linux Servers
+---
+{% include header.md %}
+
+### Using
+{:.no_toc}
+
+- Controller v5 on Debian 9 (Stretch)
+- AP AC Lite
+- AP AC LR
+
+## Installation (Debian 9)
+
+UniFi 5 is the latest version and does only officially support Debian 9 (Stretch) and Ubuntu Desktop/Server 16.04 for Linux. It requires Java 8 and other stuff which is an absolute pain to install on later versions of Debian. There is also the official physical Cloud Key device and multiple unofficial Docker images and installation packages for Linux servers.
+
+Official installation instructions: [UniFi: How to Install & Upgrade the UniFi Network Controller Software](https://help.ubnt.com/hc/en-us/articles/360012282453-UniFi-How-to-Install-Upgrade-the-UniFi-Network-Controller-Software)
+
+1. Install Debian 9 (yes, 9).
+1. Configure it: See [Debian Server](../debian/) (for Debian 10).
+1. Allow the following incoming ports (see [UniFi - Ports Used](https://help.ubnt.com/hc/en-us/articles/218506997-UniFi-Ports-Used)):
+    - TCP 8080: Device-controller communication (for devices)
+    - TCP 8443: GUI/API (for admins)
+    - TCP 8880: HTTP portal (for guests)
+    - TCP 8843: HTTPS portal (for guests)
+    - TCP 6789: Mobile speedtest (for admins)
+    - UDP 1900: L2 adoption (for devices, optional)
+    - UDP 3478: STUN (for devices)
+    - UDP 10001: Device discovery (for devices)
+1. (Optional) NAT port 443 to 8443 in IPTables: `iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443`
+1. Go to the UniFi downloads page and download for Linux/Debian.
+1. Install: `apt install <?>.deb`
+1. Configure:
+    - File: `/var/lib/unifi/system.properties`
+    - (Optional) Reduce the pre-allocated memory size: `unifi.xms=256`
+1. (Optional) Check the logs:
+    - UniFi: `/usr/lib/unifi/logs/server.log`
+    - MongoDB: `/usr/lib/unifi/logs/mongod.log`
+1. Set up UniFi in the web UI.
+
+{% include footer.md %}

+ 4 - 28
config/network/unifi.md

@@ -1,8 +1,8 @@
 ---
-title: Ubiquiti UniFi Controller
+title: Ubiquiti UniFi
 breadcrumbs:
 - title: Configuration
-- title: Linux Servers
+- title: Network
 ---
 {% include header.md %}
 
@@ -13,33 +13,9 @@ breadcrumbs:
 - AP AC Lite
 - AP AC LR
 
-## Installation (Debian 9)
+## Controller
 
-UniFi 5 is the latest version and does only officially support Debian 9 (Stretch) and Ubuntu Desktop/Server 16.04 for Linux. It requires Java 8 and other stuff which is an absolute pain to install on later versions of Debian. There is also the official physical Cloud Key device and multiple unofficial Docker images and installation packages for Linux servers.
-
-Official installation instructions: [UniFi: How to Install & Upgrade the UniFi Network Controller Software](https://help.ubnt.com/hc/en-us/articles/360012282453-UniFi-How-to-Install-Upgrade-the-UniFi-Network-Controller-Software)
-
-1. Install Debian 9 (yes, 9).
-1. Configure it: See [Debian Server](../debian/) (for Debian 10).
-1. Allow the following incoming ports (see [UniFi - Ports Used](https://help.ubnt.com/hc/en-us/articles/218506997-UniFi-Ports-Used)):
-    - TCP 8080: Device-controller communication (for devices)
-    - TCP 8443: GUI/API (for admins)
-    - TCP 8880: HTTP portal (for guests)
-    - TCP 8843: HTTPS portal (for guests)
-    - TCP 6789: Mobile speedtest (for admins)
-    - UDP 1900: L2 adoption (for devices, optional)
-    - UDP 3478: STUN (for devices)
-    - UDP 10001: Device discovery (for devices)
-1. (Optional) NAT port 443 to 8443 in IPTables: `iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443`
-1. Go to the UniFi downloads page and download for Linux/Debian.
-1. Install: `apt install <?>.deb`
-1. Configure:
-    - File: `/var/lib/unifi/system.properties`
-    - (Optional) Reduce the pre-allocated memory size: `unifi.xms=256`
-1. (Optional) Check the logs:
-    - UniFi: `/usr/lib/unifi/logs/server.log`
-    - MongoDB: `/usr/lib/unifi/logs/mongod.log`
-1. Set up UniFi in the web UI.
+For setting up the controller on a Debian server, see [Ubiquiti UniFi Controller (Debian)](../../linux-server/unifi/).
 
 ## Access Points
 

+ 3 - 1
index.md

@@ -22,6 +22,8 @@ Random collection of config notes and miscellaneous theory. Technically not a wi
 
 - [Debian Server](config/linux-server/debian/)
 - [Proxmox VE](config/linux-server/proxmox-ve/)
+- [Ubiquiti UniFi Controller (Debian)](config/linux-server/unifi/)
+- [Home Assistant](config/linux-server/home-assistant/)
 - [Linux Server Storage](config/linux-server/storage/)
 - [Linux Server Applications](config/linux-server/applications/)
 
@@ -62,7 +64,7 @@ Random collection of config notes and miscellaneous theory. Technically not a wi
 - [Linksys LGS Switches](config/network/linksys-lgs/)
 - [Linux Switching & Routing](config/network/linux/)
 - [pfSense](config/network/pfsense/)
-- [UniFi](config/network/unifi/)
+- [Uniquiti UniFi](config/network/unifi/)
 
 ### Power