Yocto open-embedded recipe for Home Assistant

I have searched around and I have not seen any initiative to have a yocto[1] recipe for home assistant so that home assistant can be deployed to linux embedded devices.

I do not like to use distributions for this kind of applications but rather custom reproducible images, which yocto allows.

Does anyone knows any existing effort I can join before starting work?

Regards
[1]: https://www.yoctoproject.org/

I don’t think that somebody is working on this.

Ok then, I have already started.

There is a working recipe for the home-assistant package itself but its dependencies are not yet satisfied.

I will post here when I have something to show, unless there is another preferred way.
Regards

There has been some good progress, all installation dependencies are satisfied, and the resulting image (as instance for a raspberry) is less than 200MB with a decent set of tools.

However there are some problems when executing. During this process HA attempts to install additional packages, for instance netdisco depends on netifaces which tries to compile at during installation, which fails because the image does not contain a complete toolchain.

Is there a way to manage these “execution” dependencies manually?
Can I tell HA to resolve these dependencies looking into the global python environment somehow? In this way I could provide them in advance at compile time.

I’m in the process of trying to get HA running under Yocto (v1.8) on a Phytec Wega board (variant 1).

Could you please point me to your recipe? I will see whether I can figure out the issue with additional installs. Ideally I’d like to be able to explicitly specify what is installed at build time and exclude stuff I’m not interested in, namely 95% of the built in components.

Hello,

I could resolve all the dependency problems I mentioned, and I have it running in a rPi B+, but being yocto, it would mean almost any board.
The images(~200MB) have all the required stuff to make HA run with the default configuration without reporting problems. Note on first run, additional packages are installed. So nothing additional at this point, I guess as soon as I start adding stuff which could demand more packages to be installed.

The big problem arises when a package needs to compile something (e.g. netdisco->netifaces).

I still have not published the recipes(there are plenty of additional python packages which as well need recipe), all is in a private bitbucket repo. I can hurry and make a github if you let me a couple of days. It would be great to get some help!

Note my work is based on yocto Krogoth 2.1.

Regards

1 Like

I’d really appreciate getting access to your recipes as soon as possible, thanks.

On Yocto v1.8, which was released by Phytec, I see they support python3 but not yet python3-setuptools. So I am a little bit stuck right now. However I see there may soon be support for Yocto 2.x for this board.

If it is this way, it might be a no go for yocto 1.8. For 2.1 at least I have:

./poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb
./poky/meta/recipes-devtools/python/python-setuptools.inc
./poky/meta/classes/setuptools3.bbclass

Which are essential for reaching the point I have got. You might add these manually to your layer, but I foresee additional problems might arise.

In any case, I rushed to publish the whole stuff to avoid replicating work, Take a look:

GitHub - urnenfeld/meta-widde: Yocto layer IoT components

After adding this layer to your bblayers file you should be able to add

IMAGE_INSTALL += "home-assistant"

to your image recipe or:

CORE_IMAGE_EXTRA_INSTALL += "home-assistant"

to your local.conf

Feedback appreciated :wink:

1 Like