Home Assistant current state on CORE.

victort

Guru
Joined
Dec 31, 2021
Messages
973
If this helps anyone, I found this flawless guide that installed HAOM on my TN Core system as a service:

I also have a script for this in my signature. :wink:

It basically this tutorial compiled in a script, with the addition of caddy as a web server to allow easy certificate management.
 
Last edited:

victort

Guru
Joined
Dec 31, 2021
Messages
973
It is unfortunate that this way of installing is not supported.

I tried reinstalling it in a jail, and am now getting more and more errors.

cloud, mobileapp, and stream configs are showing errors now

How is your install running?
 

SaltyCoffee

Dabbler
Joined
Nov 6, 2021
Messages
46
It is unfortunate that this way of installing is not supported.

I tried reinstalling it in a jail, and am now getting more and more errors.

cloud, mobileapp, and stream configs are showing errors now

How is your install running?
Agreed. I got the same errors, but the cloud and mobileapp errors went away. I've actualy got the mobile app running pretty well. Still have the stream error but it's due to having <Python 3.11. Which apparently has to be installed *before* installing HA. I also got HACS installed but when I tried to install the xiaomi module it gave some kind of permission error and couldn't download it.

I also learned that this method installs the Core version of HA which doesn't have the add-ons feature. The only way to get that inside of iocage is to install the supervised version which I was warned strongly against. And my installation is missing the backups feature as well for some reason, but didn't come across that as a known issue online. I did come across the official core install guide from HA which is slightly different than the guide we used:


I might try that. And if it doesn't work, I'm just going to call it on the TN install. I'd love to have everything running from the same machine, but unless I can get VM working again, it's probably not feasible. I have an old Lenovo thin client I can run the full OS on, which I'm told is the ideal setup. And apparently, these Lenovos are prized in the HA community, so that's a bonus.

EDIT: Backup has to be enabled by adding it to the config file. But the rub is that you can't restore backups in Core. They're only for migrations to HAOS - https://www.home-assistant.io/integrations/backup
 
Last edited:

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
it's due to having <Python 3.11. Which apparently has to be installed *before* installing HA.
Yes, because you need to use a supported Python version when creating the virtualenv for Home Assistant. For many years, the HA devs supported two versions of Python, but that has recently changed, and now only the latest version is supported.

The only way to get that inside of iocage is to install the supervised version
Impossible, iocage is running FreeBSD jails. The supervisor specifically requires Debian Linux.

Backup has to be enabled by adding it to the config file. But the rub is that you can't restore backups in Core
That should be enabled by default. Are you using the default config or some modified version? You can create backups with any installation method, but only HAOS (and possibly the supervisor) provides a way to restore them. The backups are just zip files anyway. You can still manually extract and restore them. If, for some reason, you decide to stick with this jail install, I recommend mounting an external dataset for the HA config.

I did come across the official core install guide from HA which is slightly different than the guide we used:
The HA plugin was based on a previous version of that guide. Not much has changed except the packages they require to install will likely be different (or have other names) in FreeBSD.

I have an old Lenovo thin client I can run the full OS on, which I'm told is the ideal setup. And apparently, these Lenovos are prized in the HA community, so that's a bonus.
If you want Home Assistant to work and spend time on your automations instead of maintaining the installation, I recommend HAOS. Your thin client is an excellent candidate, and will likely be many times better than an RPI4.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Impossible, iocage is running FreeBSD jails. The supervisor specifically requires Debian Linux.
What would keep you from running supervisord inside an iocage managed jail? iocage manages the jail as a whole, inside you can run whatever runs on FreeBSD. pkg install py39-supervisor (inside the jail!) and you are all set. I run multiple installations with supervisord.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
What would keep you from running supervisord inside an iocage managed jail? iocage manages the jail as a whole, inside you can run whatever runs on FreeBSD. pkg install py39-supervisor (inside the jail!) and you are all set. I run multiple installations with supervisord.

Sorry for the confusion, @Patrick M. Hausen - I'm using Home Assistant lingo. The supervisor I'm referring to is only for Home Assistant. In this context, I'm talking about what's typically referred to as the Supervised installation method. In HAOS, the supervisor is basically responsible for all the magic. (managing upgrades, installing addons, etc...)


Edit this is the link I was looking for ^^^
 
Last edited:

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
due to having <Python 3.11.

now only the latest version is supported


Here's the updated ADR explaining that. It is critical to understand if you will run Home Assistant in a jail (or virtualenv in general).

 

victort

Guru
Joined
Dec 31, 2021
Messages
973
While it would be nice to be able to maintain a jail installation, it's just not practical. It's much easier to dd the raw image and run homeassistant that way. It allows many many more features.

I switched to a VM install a while back, and will probably keep going with it. It's just not practical to run it in a jail really. Life has other more important problems to deal with.

I'll probably leave my resource and script up and tinker with it when I have time, but as of right now, I'm running HA in a VM.
 

SaltyCoffee

Dabbler
Joined
Nov 6, 2021
Messages
46
I learned later about the dependancy on Debian for supervised docker installs. I also discovered later that the version of python I had was determined by the guide I was using at the time (the one we used @victort). I just had to change py310 to py311 and I would have never learned about that. Anyway, I found a better guide that someone from the HA community sent me to and it worked perfectly. Still no add-ons due to only being able to run Core in iocage, but so far I don't seem to need them. HACS has everything you might need, and this guide was far less problematic and far more complete. Seems to be a serviceable solution when VM is not working and you want to consolidate services in your home.

I'll run this in tandem with HAOS which I'll have running on the thin client and see which one I give up on first.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
So that you know, the "better guide" is simply the fully manual guide to the "autostart and rc service" guide you initially followed. In 2020, I reworked the old HA plugin (which uses the rc script from the autostart guide) and the "better guide" to match each other. The exception is the rc script itself. The version in the "better guide" is stripped down to only run Home Assistant, while the rc script from the plugin repo can create default config/check config and install/upgrade Home Assistant as well. Basically, the idea was to ensure anything found in one of the manual guides would still apply to the scripted installation or HA plugin (when that was a thing).

Anyway, I'm glad you got it sorted. Good Luck moving forward!
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
@tprelog I only now understood you are the author of the first guide. I meant no disrespect. Thanks for your work.
I'm sorry @SaltyCoffee, I did not mean to come off that way. It's all good my friend, no disrespect taken. I really just wanted to point out that the scripted installation and plugin were built upon the manual guide.
 

riotbob

Cadet
Joined
Nov 7, 2023
Messages
4
I have zero experience using bhyve - hopefully, someone knowledgeable can help get your current setup back in check without reinstalling.

It's been almost a year since I last tried creating a Home Assistant jail, but if you have questions about the installation process, I may still be able to help.

If you ultimately decided on switching to HAOS on SCALE - This post might be helpful. The biggest issue I know of is USB passthrough, specifically for the ConBee II ZigBee USB Stick. It seems hit or miss for most people; solutions to get it working can seem hacky and are not guaranteed. As I understand, the ConBee II needs to be passed into the VM as a serial device. Known solutions are using a script to start the VM or using PCI passthrough of the USB hub to which the ConBee is connected.

I have no experience using the Home Assistant "Apps" also available on TrueNAS Scale
Hi tprelog,

I'm interested in running HAOS on CORE, any recommendation or guidance you can provide?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I did run HAOS on CORE. What are your question/problems?
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
Hi tprelog,

I'm interested in running HAOS on CORE, any recommendation or guidance you can provide?
Sorry, I don't have any experience with this but Patrick may be able to help.

EDIT: Not what you're asking, but FWIW I just tried installing Home Assistant in a 13.2-RELEASE jail and I can confirm it's no longer working correctly.
 
Last edited:

victort

Guru
Joined
Dec 31, 2021
Messages
973
Sorry, I don't have any experience with this but Patrick may be able to help.

EDIT: Not what you're asking, but FWIW I just tried installing Home Assistant in a 13.2-RELEASE jail and I can confirm it's no longer working correctly.
I can confirm the same. I actually stopped using it entirely because of the MyQ issue that arose recently.

When I was running it, I ran the VM version. Much better experience.

My scripted install is still up on GitHub, but I might remove it in the near future.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Use a VM and HAOS or an e.g. Ubuntu VM and docker compose.
 
Top