Showing posts with label hardware. Show all posts
Showing posts with label hardware. Show all posts

Wednesday, September 28, 2022

SYSTEM: Home Assistant Installation | Raspberry Pi

 

HOME ASSISTANT INSTALLATION ON RASPBERRY PI


Another alternative to QNAP is installation on Raspberry. The latest release of this board provides enough RAM and CPU power to run HA smoothly. I got RPi4 with 4GB of memory so it should be enough. In addition I have added 128GB SD card so my storage will be also enough.

Raspberry Pi 4 model B with heat sink

SD Card i use (128GB)

Raspberry Pi 4 with LCD touch display attached. This will be future setup with touch interface.






PREREQUISITIES

  1. Raspberry Pi with proper power supply. For my system I use the one providing 5V with 3A (15W in total);
  2. SD card big enough to hold HA and its system. 32 is the minimum, I use 128GB
  3. Balena software installed from this link (it will write our SD card with Hassio image)

INSTALLATION

Installation procedure is copied from https://www.home-assistant.io/installation/raspberrypi#write-the-image-to-your-boot-media:

WRITE THE IMAGE TO YOUR BOOT MEDIA

  1. Attach the Home Assistant boot media (SD card) to your computer
  2. Download and start Balena Etcher. (You may need to run it with administrator privileges on Windows).
  3. Select “Flash from URL” 

  4. Get the URL for your Raspberry Pi:

Raspberry Pi 4 64-bit: https://github.com/home-assistant/operating-system/releases/download/9.0/haos_rpi4-64-9.0.img.xz

  1. Paste the URL for your Raspberry Pi into Balena Etcher and click “OK” 

  2. Balena Etcher will now download the image, when that is done click “Select target” 

  3. Select the SD card you want to use for your Raspberry Pi 

  4. Click on “Flash!” to start writing the image 

  5. When Balena Etcher is finished writing the image you will get this confirmation 

START UP YOUR RASPBERRY PI

  1. Insert the boot media (SD card) you just created.
  2. Attach an Ethernet cable for network.
  3. Attach the power cable.
  4. In the browser of your Desktop system, within a few minutes you will be able to reach your new Home Assistant on homeassistant.local:8123.
  • If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at homeassistant:8123 or http://X.X.X.X:8123 (replace X.X.X.X with your Raspberry Pi’s IP address).

With the Home Assistant Operating System installed and accessible you can continue with onboarding.



Monday, September 19, 2022

HARDWARE: USB to Serial

HARDWARE: USB TO SERIAL

Some of the hardware I use (and going to use at my Smart Home) require firmware modification. The usual way it OTA (Over-the-air) and can be done in pure software manner, hoever, some require flashing of the firmware.
Most of the equipment has on-board serial (RS-232) connector so I can easily connect to it and flash it's software. To do so I need serial-2-usb dongle as I do not have any serial interface on my laptop.

After short research I decided to go with simple usb2ser interface: USB TO TTL. This allows to use either 3.3V or 5V (be careful, setting this incorrectly can destroy the hardware you are trying to modify). The cost is super low - no more than few euros on Amazon or other portal.
To make my life easier I soldered wires to the pins so I can use them in much more flexible way later.

Another equipment is usb-extension cord and - obviously - soldering station.





LINKS AND EXTERNAL RESOURCES

Friday, September 16, 2022

Hardware: BLUETOOTH DONGLE

 

HARDWARE: BLUETOOTH HUB


Some of the devices at my home are bluetooth so I also need the bluetooth dongle. As there is no bug deal with it I decided to go with Baseus model mini-bt4, however in few days I replace it with same make, newer model 5.0 (BA-04). Older model (4.0) was working flawlesly so far. Price is really low - around 6€.

The device landed in the USB hub I wrote about in the previous post.

The configuration and integration will be described once we have the system up and running.


Baseus BA-04 


Thursday, September 15, 2022

Hardware: ZIGBEE DONGLE

HARDWARE: ZIGBEE HUB


Another protocol (or basically the standard) that I use in my Smart Home is zigbee. It is widely used, for example, in the Philips Hue ecosystem. I offer, like z-wave, a mesh network (i.e. each device is also a network extender) and quite a good range at 868MHz, 915MHZ and 2.4GHz.

The first idea with this protocol was to plug and integrate all zigbee devices into the Philips Hue gateway that I use. Unfortunately, it was not a good idea - not all devices could be added (e.g. gas sensor) and some, despite adding to the network and proper communication, were not visible (e.g. IKEA remotes). 

To solve this problem, I decided to separate the Hue system from the rest of the zigbee network. I left the lights and remotes and the Philips motion sensor on the Hue bridge (more on this in the post) and the rest: IKEA remotes, Heiman sensors and the rest I connected to a separate zigbee gate.

I found a lot of possibilities on the Internet, but I focused on compatibility with the Home Assistant. After a short research, I decided to use the Dresden Electronics Conbee2 hub.

The choice was based on compatibility with Home Assistant and previous experiences with Dresden Electronik equipment. Additionally - it can work locally and does not need a cloud to operate. The price is quite decent - now you can buy less than 50€.

The device landed in the USB hub I wrote about in the previous post.

The configuration and integration will be described once we have the system up and running.

LINKS AND EXTERNAL RESOURCES

Wednesday, September 14, 2022

Hardware: Z-WAVE DONGLE

EQUIPMENT: HUB Z-WAVE


One of the protocols that is used in my ecosystem is z-wave. After several years of experience, I can confirm that it is very stable and capable. Creating a mesh network is especially useful - it means that each device connected to the z-wave network is a transmitter and a receiver for others. This allows for a significant increase in the range of communication.

This protocol is also used by other systems that I have in my home Smart-Home - an example is Fibaro. However, I decided to use an additional hub: despite the possibility of connecting virtually any devices to the Fibaro control panel, I noticed that not all functionalities are supported (or their activation requires a lot of work).

After a short research, I decided to go with the Aeotec Gen5 + hub.

The choice was justified by nice functionalities: own battery power supply and S2 security support (more on this in a separate post). The price is quite decent - now you can buy less than PLN 45€.
I have been using it for about 2 years and it has never caused any problems.

The device landed in the USB hub I wrote about in the previous post.

The configuration and integration will be described once we have the system up and running.




LINKS AND EXTERNAL RESOURCES


Tuesday, September 13, 2022

Hardware: USB Hub

I needed a USB hub to connect additional devices. It should provide additional power (i.e. it must be of the active type). Due to the fact that I have USB3 on the NAS, I also wanted to decide on one.

My first choice was LogiLink model UA0149. It looks really pro, has a metal casing and mounting holes. Additionally, when mounted on the wall, placing the dongle will ensure good RF range.




Provides 4 USB 3.0 ports and additional power. Unfortunately, the distance between the ports turned out to be too small and I couldn't plug in all the USB dongs.

The next choice was also Logilink ad different model UA0112A: 



Like the previous model, it provides 4 ports and power. The spaces between the USB ports are sufficient here to connect all dongle.


This is the model I have chosen. I connected it to the NAS via the USB3 port.




LINKS AND EXTERNAL RESOURCES

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

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 ...