Setting up My Homelab

My Smart Home

Have you ever been interested in having your living room lights flash red twice and have your smart speaker play the song C.R.E.A.M. when there is motion detected at your front door between the hours of 8am and 5pm? If you're anything like my wife then definitely not, but for anyone else who is interested in learning how I automated my home then read on.

I've recently gone down the rabbit hole of converting my home to a smart home and have spent way more time researchiing and purchasing equipment to do this than my wife would have liked. So I thought I'd document the process in case I need to ever set it up again.

My Setup

It all starts with the brains of my operation, my homelab setup. My current homelab setup looks someting like this:

  • Operating System: Home Assistant
  • Virtual Environment: Proxmox Virtual Environment (PVE)
  • Home Server: HP EliteDesk 800 G3

Install Proxmox onto a Small Form Factor (SFF) Business PC

These are the steps to setup Proxmox Virtual Environment (PVE) onto a home server.

  1. Download the Proxmox installation file onto your computer

  2. Download balenaEtcher and use it to flash the Proxmox installation file onto a USB thumb drive

  3. Startup the HP Elitedesk 800 G3 while pressing F10 to enter the BIOS

  4. While in the BIOS, Navigate to: Advanced Tab > Secure Boot Configuration

    • Enable Legacy Support Enable and Secure Boot Disable
  5. F10 Save and exit

  6. Enter PIN to disable Secure Boot

Warning
Be sure to use keyboard numbers, NOT numpad keys, when entering PIN
  1. Press F9 to enter Boot Menu

  2. Select USB drive as boot disk

  3. Install Proxmox Virtual Environment (PVE)

    • Select appropriate Country and Timezone
    • Set Password and Email
    • Hostname: proxmox.local
    • IP Address: 192.168.68.100
    • Gateway: 192.168.68.1
    • DNS Server: 192.168.68.1
  4. Start Proxmox Navigate to: URL in browser: https://192.168.68.100:8006/

    • Username: root
    • Password: ********

Upgrade the latest Updates for Proxmox

  1. Navigate to: the proxmox node
  2. Navigate to: Updates > Repositories
  3. Select the repository https://enterprise.proxmox.com/debian/pve and click the Disable button. (unless you have a subscription)
  4. Click on the Add button and select No-Subscription from the dropdown options
  5. Click on Refresh and then click on Upgrade

Mapping NFS Storage on Proxmox

  1. Ensure that you have enabled NFS on a shared folder (named proxmox) in your NAS
  2. Navigate to: the Datacenter level
  3. Navigate to: Storage
  4. Click the Add button and select NFS

General Tab

  • ID: nastyNAS
  • Server: 192.168.68.180
  • Export: /volume1/proxmox
  • Content: Check All
  1. Click the Add button and you're done

Install Home Assistant onto a Proxmox Virtual Machine

  1. Click on the Create VM button

General

General Tab

  • Node: proxmox
  • VM ID: 101
  • Name: Home-Assistant
  • Check Advanced checkbox
  • Check Start at boot checkbox

OS

OS Tab

  • Select Do not use any media

System

System Tab

  • Machine: q35
  • BIOS: OVMF (UEFI)
  • EFI Storage local-lvm

Disks

Disks Tab

  • Next

CPU

CPU Tab

  • Cores: 4

Memory

Memory Tab

  • Memory (MiB): 4096
  • Minimum Memory: 2048

Network

Network Tab

  • Next

Confirm

Confirm Tab

  • Finish

  1. Navigate to: Updates

    • Click on Refresh
    • Click on Upgrade
  2. Go to the Home Assistant installation file webpage and download the image: KVM/Proxmox (.qcow2)

or

  1. Directly download the file here: KVM/Proxmox (.qcow2)
  2. Extract file from .xz file to .qcow2
  3. Open Terminal:
  • Run the following command to move the qcow2 file from the computer to the proxmox node
scp haos_ova-8.2.qcow2 root@192.168.68.100:
  1. Navigate to: the proxmox node:

  2. Navigate to: >_ Shell

  • The following command moves the qcow2 file from proxmox to 101 (Home-Assistant)
qm importdisk 101 /root/haos_ova-8.2.qcow2 local-lvm --format qcow2
  1. Navigate to: 101 (Home-Assistant) > Hardware
  • Move the haos_ova-8.2.qcow2 file to the boot disk on 101 (Home-Assistant)

    1. Shutdown the VM
    2. Select Hard Disk (scsi0) and click Detach
    3. Remove Unused Disk 1
    4. Add Unused Disk 0 (Home Assistant Installation file)
    5. Go to Options
    6. Double-click Boot Order
    7. Check enabled for scsi0 and drag to the top of the list
    8. Go to the Console
    9. Start the VM
    10. Hit ESC at Proxmox logo
    11. Device Manager > Secure Boot Configuration
      • Uncheck Attempt Secure Boot
      • Hit F10 to save
      • Esc back to Main Menu, click Reset

Copyright © 2023 Noah Wong. All rights reserved.

Copyright © 2023 Noah Wong. All rights reserved.