Showing posts with label vm. Show all posts
Showing posts with label vm. Show all posts

Tuesday, September 20, 2022

SYSTEM: Home Assistant installation | QNAP

HOME ASSISTANT INSTALLATION ON QNAP


As we have all components ready it is time to install and configure Home Assistant. I am goin gto setup it as virtual machine on my QNAP NAS, so in general, this should work on any VM system. I will describe it later on how to do it on different platforms (I am waiting for my Raspberry Pi4 hardware).

PREREQUISITIES

  1. QNAP NAS set up and Virtualization Station up and running;
  2. Home Assistant VMDK image downloaded from [images] and converted to img file (you can use converter embedded into Virtualization Station). 

STEP 1: creating of the VM

  1. Create folder to store your virtual hard drive and place converted image in it. I use separated resource on my QNAP (/VM) amd for this VM I have created ha folder. The VM share is mounted on my laptop as V: drive.

  2. Navigate to Virtualization Station and press "Create" button
  3. In new window choose settings as below. You need to adapt them depending on your hardware (mostly number of cores and RAM)



  4. Setup VNC password (bottom of the dialog window) and unselect "Restrict VM console access"
  5. VM is ready to create so press "OK".
  6. Once the machine is created, go to its setting and modify:

  7. Go to snapshots and delete (if any):

  8. G oto Storage and set disk size to 150GB and interface to VirtIO

  9. Connect USB devices


  10. Now, the system is ready to start. Press "ON" button to do so.



  11.  You can check IP address of your Home Assistant as shown below.



  12. We will need this IP to access web-interface of Home Assistant. Check my next post soon!

Monday, September 12, 2022

Hardware: Home Assistant host

Let's start - it's time to prepare the system.

Since I will be using smart systems from different suppliers at home, I need an aggregator that will enable communication between different environments. Currently, there are several such systems on the market: Open Hab, Home Assistant, Domoticz (these are just examples). 

I chose the Home Assistant for my Smart Home system - mainly because I already know and used it. In addition, I like the philosophy of Home Assistant and the way and amount of integration with various smart systems. It can work on various hosts - starting from MS Windows, through Docker and ending with VM and Raspberry. For me, it will run on Qnap NAS as a virtual machine.

The basis to run Home Assistant is the equipment on which it will run.

HARDWARE: SERVER

Requirements: good CPU (at least 4 CPUs), a lot of RAM. Necessarily USB ports (but they don't have to be 3.0+). It's good if it has several network cards - thanks to this, you can separate the smart-home traffic from the rest.

The server on which the Home Assistant will work is the heavily tuned QNAP TVS-872XT.

Technical data:

  • CPU: i5 8400T
  • RAM: 64 GB
  • GPU: Quadro K2200
  • Network: 
    • 2x1GbE connected as 2GbE in alb (active load balancing) - I use this card for VPN support
    • 1x5GbE (this is 10GbE connected to the 5Gb port on the switch) - used to transfer data to / from virtual machines
    • 1x10GbE - the main data network.
In this equipment, I replaced the RAM with 2x32GB (I found it on Amazon for ~ 900PLN). When I bought 8 discs, they cost me PLN 230 each. SSD drives (I have a Samsung EVO 980) cost about PLN 200 per piece also on Amazon. I bought the Nvidia card from Allegro for ~ 450 PLN.

Software:
  • OS: QTS Hero v5 with ZFS support
  • Native support for Virtualization Station

Disks:
  1. 8x2TB Seagate Iron Wolf configured in RAID6 - these are disks for storage. Here I keep movies, photos, other household stuff. Virtual machines land here as well.
  2. 2xNVME SSD 500GB - this is a RAID0 array, QTS Hero system and applications are installed on it
  3. 2xSATA SSD 500GB - these are drives for buffering data from the main matrix. Qnap has a pretty cool mechanism for storing your most-used data on fast SSDs.
Pros : quite powerful machine, allows you to run multiple virtual machines. It has two PCIe slots for additional expansion - in my case they are occupied by the NVIDIA K2200 card (used for AI support) and a 10GB + 2xSSD card. Additionally, you can throw 8 SATA disks and 2 NVME disks.

Cons : price. Basic set with i5 + 16GB of frame, without disks, costs about 10,000 PLN. Added to this is the cost of disks, network cards (but not necessary) of memory expansion. The equipment is quite large and heavy and will not fit everywhere. I currently have it (but it barely fits) in a 19 "rack.




Alternatives : 
  • Cheaper NAS models enabling virtual machines to work. It is important that they have at least 8GB of RAM and a decent processor. For the Home Assistant I allocate 6GB RAM and 6 processor cores. I used to have a QNAP (TS-435) with a Celeron and 8GB of RAM on it and it was fairly decent, but I noticed that the system is quite slow. With this configuration, we will not run anything else on the hardware.
  • RaspberryPI - The only reasonable option here is the RPi4 with 8 GB of RAM. This can be a good starter hardware, but requires you to buy an external drive (using an SD card is not a good idea for a Home Assistant);
  • The rest - for example, a VM for Windows is not a good idea because it requires a laptop / PC to be turned on all the time

I will post a description of the NAS configuration by the way - here I have a 10GbE network and a split AP (Asus ZenWifi 6E) and a Mikrotik router,

LINKS AND EXTERNAL RESOURCES

Alternative Resources
I do not throw in links to the promotion (although I recommend it - you can save a lot) because it is constantly changing.

Integracja: Rekuperator Wanas | ModBUS | Zigbee

Ekosystem: Modbus, Zigbee, Wanas, Netatmo, Z-wave Nazwa integracji Home Assistant: Modbus, Zigbee2MQTT Poziom skomplikowania: 3/5 | wymaga ...