Home Assistant Core -- TrueNAS CORE Community Plugin

Is anybody here using the ESPHome plugin and know how to compile software on FreeBSD?

Someone reported the toolchains need updated again and they need to be compiled.

I’m going to try and do it today but of all my plugins, ESPHome is the one I could really use the most help with, if it should continue to be available as a community plugin.

Well i tried updating with the said plugin menu, but somehow it deleted my whole installation…?

Building wheels for collected packages: yarl
  Building wheel for yarl (PEP 517) ... done
  Created wheel for yarl: filename=yarl-1.7.2-cp39-cp39-freebsd_12_2_release_p12_amd64.whl size=123811 sha256=4ccfb83763fa96320eb952b7dda4191714cc749d4cd8d667f264ba59abf34020
  Stored in directory: /tmp/pip-ephem-wheel-cache-_mphofsf/wheels/3e/e9/a4/bbd1e7a4e1fc40ad57fd56f9a0d51fffe8bbe47a4d90000e89
Successfully built yarl
Installing collected packages: pip, awesomeversion, httpx, yarl, requests, async-timeout, homeassistant
  Attempting uninstall: pip
    Found existing installation: pip 20.2.4
    Uninstalling pip-20.2.4:
      Successfully uninstalled pip-20.2.4
  Attempting uninstall: awesomeversion
    Found existing installation: awesomeversion 21.11.0
    Uninstalling awesomeversion-21.11.0:

Now i can’t seem to install it again even though all requirements are met:
Home assistant only supports Linux, OSX, Windows using WSL

What can i do to get it up and running again?

Sorry for the trouble @mainstream … I don’t think you deleted your installation, likely another problem.

Are you saying after you updated using the menu, you have the following error and Home Assistant is no longer starting?

Home assistant only supports Linux, OSX, Windows using WSL

This OS compatibility check was a breaking change introduced in Home Assistant 2022.2 and has now been addressed in this plugin. Running a Plugin Upgrade from the TrueNAS UI should help.

It didn’t delete my configs and settings. THe file editor is still running. It just removed all the packages and can’t be started anymore. Ill will try the solution you suggested, thanks for the fast reply! :smiley:

Let me know how it goes. I’ll be around for a few hours if you need help

You’re a life-saver: Thanks!



1) main_menu     4) upgrade       7) test_service
2) status        5) start         8) check_config
3) restart       6) stop          9) exit_menu

Select: 3
Home Assistant only supports Linux, OSX and Windows using WSL
Stopping homeassistant.
Home Assistant only supports Linux, OSX and Windows using WSL
Home assistant is running as pid 21036
Http://192.168.1.50:8123

So it seems to be installed again, still error messages, and not accessible for web interface...

give it some time if it says it’s running… during the first start after an update, Home Assistant may need to compile some extra packages depending on what integrations you’re using… depending on the number of integrations and specs of your NAS, this can some time. I give it maybe 10 minutes before you start to worry. Although the longest reported wait was almost an hour :sweat_smile:

The OS warning is unfortunately here to stay. Best we can do is tell Home Assistant to ignore it and try to run anyways…

There’s a few tricks we can try if the UI is not reachable shortly

1 Like

I tried it 2 more times, and now it workes again! :smiley: Im so happy! Thanks allot

1 Like

Glad it’s sorted!

FYI – looks they are going to move 12.2 plugins to the the 12.3-RELEASE after all

Keep in mind, you’ll still be using the 12.2-RELEASE (Host OS) kernel - Unfortunately can not say if this update is going to work for Home Assistant. If you are determined to run Home Assistant on TrueNAS CORE, you may need to wait for the 13.0-RELEASE.

1 Like

Strange, i don’t have the word configuratior with the trash icon here?

At me there is: “u heeft nog geen langdurige toegangstokens.”
Translated: There is no Long Lived Access Tokens
so how to make the token now? for configurator?

Hi @bonestaak - You just need to manually create your token

Just checking before I upgrade to 2022.7, whether the move to Python 3.10 will create an issue?

You can upgrade to 2022.7 without upgrading to python 3.10 The best would be to get the TrueNAS plugin to be updated with python 3.10 dependency and re-install the HA service which will recreate the venv with all required dependencies. Upgrading python is a bit painful otherwise (based on my experience)

1 Like

i tried and my installation is completely broken, posted here asking for any input; HA not starting after failed update from 2022.6.7

The plugin will never switch the python version automatically after it’s been installed – As @adorobis correctly points out, reinstalling the virtualenv can be a bit of a pain. The issue is usually (re)building the wheels for all the python packages used by the integrations you may have installed. Because jails use FreeBSD, very few prebuilt wheels are available for download so they must be compiled during installation. The time this takes will depend on the number of integrations and power of your NAS. I’ve had reports of people waiting almost an hour.

That said, I’ll add Python 3.10 to the plugin manifest and get a pull request submitted to ix-systems before the end of July. I expect it will take some time to make its way to the release branch. Most likely, the update will only apply to the TrueNAS Core 13 – You’ll still need to manually switch python versions and reinstall Home Assistant. Like before, I’ll give copy/paste commands to follow.


@deathstargunner – Sorry for the short answers, it’s a busy week. I’ll try to help you on your post.

1 Like

So here it goes, I’ve upgraded python to 3.10. It is not a smooth excersise, probably I’m doing something in sub-optimal way. For extra safety I have cloned the HA jail to a new one just to be able to revert to old one quickly. The process:

  1. shut down HA jail
  2. clone to a new one
    iocage clone ha_old --name ha_new
  3. iocage start ha_new
  4. iocage console ha_new
  5. service homeassistant stop
  6. pkg install python310 py310-sqlite3
  7. sysrc homeassistant_python=/usr/local/bin/python3.10
  8. service homeassistant reinstall homeassistant - this step took around 15 minutes
  9. service homeassistant start
    After that I’ve received error about missing pymysql python module as I’m using MariaDB for recorder component. Not sure why it does not get installed automatically so I’ve added it to the venv manually:
    source /usr/local/share/homeassistant/bin/activate.csh
    pip install pymysql
    deactivate
    service homeassistant restart
    After that the HA has started ok but it took a long time for the first start (something between 15 to 30 minutes before the web gui was showing up and even more time before all integrations loaded.
1 Like

Not really… Steps 5 through 9 are exactly correct! And I think it’s a great idea to clone the jail – This approach can really minimize downtime, especially if you’re using an external set for your configuration.

Pretty sure you’ll need to do this every time. I don’t see pymysql listed anywhere in the requirements file. I’m guessing that’s why it is never installed automagically.

Remember, you should be able to reinstall pymysql along with homeassistant

service homeassistant reinstall homeassistant pymysql

You can also install thing in the venv like this

service homeassistant install pymysql

It’s ok to go full-on manual mode as well. I just want to point out a few details for others that might be following along at home.

  1. It’s important, you must switch to user homeassistant before activating the virtualenv
  2. User homeassistant has default shell set to bash, you don’t need to activate.csh

So revised commands would look like this

su - homeassistant
source /usr/local/share/homeassistant/bin/activate
pip install pymysql
deactivate && exit
service homeassistant restart
1 Like

Great, many thanks for all those hints!
Btw, do you know if there is anything in the TrueNAS 13 that could break the HA plugin? As far as I know the base for a jail is not updated automatically on TrueNAS upgrade so in theory nothing should break. But this is the first time I an holding back with the upgrade…

I have just upgraded to TrueNAS 13. Was very smooth and no issues. All jails work fine. I have also learned that upgrading jails is not possible/not recommended so if someone wants to run latest freebsd release in a jail it has to be recreated.

1 Like