Recently I have been tasked with discovering and understanding the Home Assistant open source projet. The objective is to make it run on the Toradex Verdin SoM.
I am very new to home automation, I lived in rented apartments all my life... 😢 But if I were to own a house then home assistant will surely be my pick.
Simply because privacy is one of the top concerns of the home assistant contributors https://www.home-assistant.io/blog/2016/01/19/perfect-home-automation/
I also think that the projet features a nice architecture which makes great use of Docker containers. Smart choice, as it enables them to run on large variety of platforms, on GNU/Linux servers, on NASes or any appliance that supports OCI containers.
Home assistant is split into components, here are the main ones:
core - which is the central container, provides the web UI that is accessible on port 8123
and provides many integrations out of the box, Zigbee, KNX, etc..
supervisor - It sits in between the core container and the operating system, the core container communicates with the supervisor container over HTTP. The supervisor communicates with the services over Dbus.
operating system - The operating system is built with buildroot and is extended with external packages provided by the home assistant contributors. The kernel is also compiled by buildroot, popular ARM boards are supported Raspberry Pi, ODROID and the Asus Tinker board.
I've used the generic aarch64 configuration everything compiled without errors and it took around 2 hours. It was then very straight forward to get it to run in QEMU mainly due to the developer documentation being of good quality and pleasant to read. https://developers.home-assistant.io/docs/architecture_index
Upon first boot, I was surprised to see that the GRUB bootloader is used by default, which has an entry for A slot and the B slot. However, our objective at EDGEMTech is to use it with TorizonOS so the home assistant operating system will only be used as a reference.
The next step was to understand the scripts in buildroot-external/package/hassio which make use of the skopeo utility to fetch the container images and save them as tarballs.
Didn't know about the skopeo utility, it allows to inspect containers without needlessly pulling the image, copy images between image stores, convert images. It is worth exploring further if one works with docker often.
Stay tuned for more news about home assistant on TorizonOS in a couple of weeks
