Showing posts with label home assistant. Show all posts
Showing posts with label home assistant. Show all posts

Wednesday, September 21, 2022

SYSTEM: Home Assistant First Run

 HOME ASSISTANT FIRST RUN

As we have HA already up and running it is time to configure it. To start this process we need to get IP address of HA instance. With Qnap we can do it in Virtualization Station



So the IP address for my HA is 192.168.18.139. We can proceed, typing http://192.168.18.139:8123 into web-browser.
Do not worry if you see this message:
It simply means HA is still starting. There is a lot of errands to run inside so it might take a while.


Once done, web gui will ask to create new user. I do recommend to create admin user, for example adm-ha. Try to avoid obvious names like Admin, Administrator.Do not worry about regular users, we will create them later. This specific user will be used only for administrative purposes and won't login on daily basis.

Set some strong password (12 chars, numbers and special chars included).
Next step - set your location, altitude (you can check it in google maps) and local formats:



On next screen you will be asked to share some diagnostic data. As HA is kinda trusted, I usually share some info with them. Check below:


On next screen you will see devices already discovered in your network. Here is example of mine:


At this point you can skip this step, we will dd those later. Now, our firs setup is done. We should see following web-interface:

Do not forget to check next posts - we will start adding integrations!


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.

A bit about the project.


On this blog you will find a description of my struggles with the smart-home system. It will be completely subjective, based on my personal experiences and conclusions.

I have been working with smart home for several years and I decided to help people like me who are at the beginning of their adventure with such systems. 

More and more manufacturers are placing "agitated" devices on the market. Not all of them are polished, not all are suitable for real use. And here you will find information on what and how to use.

The current state is already a working Home Assistant, but it is preparing to move to a new home, where I will do everything from scratch, using the experience from previous years. 

After several years of working with Home Assistant (and smart-systems), I know _ a little_ which are suitable for use, what errors to avoid and what is a good solution. 

Below are a few graphics so that you know what solutions I use (but these are not all - I try to constantly expand the system).

Home Assistant as an aggregator and control center. Also as a point of contact with Google Assistant and Alexa.


Lights, bulbs and switches


Communication protocol for devices - used by eg Fibaro


Communication protocol for devices. Used e.g. by Philips Hue but also by Aquara and IKEA.
Voice assistant. Unfortunately, he doesn't speak Polish at all. 


Asus is the manufacturer of the Wifi routers I use. It integrates well with the Home Assistant but also provides a very stable Wifi network - both in the 2.4MHz, 5MHz band and in the new 6MHz standard


Printer and scanner in one. In Home Assist, for example, I can see the level of toner consumption.


USB Dongle and Drivers for LED strips running on Zigbee


The entire ecosystem based on z-Wave


Cameras


Voice assistant. He can speak Polish (but only on tablets / phones). Dedicated devices do not work in our language yet


Great multi-room audio system. He talks to the Home Assistant.


Cameras with recognition of people / animals and vehicles.


Xiaomi is what everyone can see. Provides lights (yeelight) and the Aqara system

Integracja: Rekuperator Wanas | ModBUS | Zigbee

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